How to resolve circular workflows?

I have looked at your repository and for some reason the index in the local database for workflow connections was in a weird state. renku workflow revert deleted the activity in question but the library we used for the index didn’t actually delete if (but also didn’t raise an error). I do not know why but could confirm that deleting it didn’t actually change the index.
Our code that deletes the activity still worked, so you ended up in a situation where the index thought there was an activity but it didn’t actually exist anymore, hence the key error.

I made a “fix” (really, I just rebuild the index from scratch when deleting an activity, which solves it): renku · PyPI

Note that you need to git reset to before you ran the renku workflow revert -m -f ... command and run the revert command again. Also note that there’s two circular dependencies, so you need to revert one, then you will get another error about the second set of circles and revert that as well (both lists of circles have a single activity responsible, just pick the one that’s common to all circles). After that, everything should work. At least it did when I tested it locally with your repo on my end :crossed_fingers: .

1 Like