Skip to content

Commit b2418a1

Browse files
authored
fix: properly remove activities in workflow remove if catalog is corrupt (#3729)
1 parent ed58a8d commit b2418a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

renku/infrastructure/gateway/activity_gateway.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ def _index_activity(activity: Activity, database: Database):
272272

273273
def _unindex_activity(activity: Activity, database: Database):
274274
"""Add an activity to database indexes and create its up/downstream relations."""
275+
# there are cases where the activity catalog can be corrupt and removing activities doesn't actually remove them
276+
# here we reindex them so removal works as expected
277+
reindex_catalog(database)
278+
275279
upstreams = set()
276280
downstreams = set()
277281

0 commit comments

Comments
 (0)