From ab539008c62e44510d271af0ff58de061015205a Mon Sep 17 00:00:00 2001 From: Ralf Grubenmann Date: Thu, 11 Jul 2024 15:58:37 +0200 Subject: [PATCH] fix: properly remove activities in workflow remove if catalog is corrupt --- renku/infrastructure/gateway/activity_gateway.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renku/infrastructure/gateway/activity_gateway.py b/renku/infrastructure/gateway/activity_gateway.py index 7e8d970890..d9f24ddf75 100644 --- a/renku/infrastructure/gateway/activity_gateway.py +++ b/renku/infrastructure/gateway/activity_gateway.py @@ -272,6 +272,10 @@ def _index_activity(activity: Activity, database: Database): def _unindex_activity(activity: Activity, database: Database): """Add an activity to database indexes and create its up/downstream relations.""" + # there are cases where the activity catalog can be corrupt and removing activities doesn't actually remove them + # here we reindex them so removal works as expected + reindex_catalog(database) + upstreams = set() downstreams = set()