-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cycle detection for single node workflows. #3374
Conversation
input_index = steps_to_index[conn.input_step] | ||
# self connection - a cycle not detectable by topsort function. | ||
if output_index == input_index: | ||
raise CycleError([], 0, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just raise the CycleError without keywords here? Overall it is a good fix. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They don't look optional to me I guess.
class CycleError(Exception):
def __init__(self, sofar, numpreds, succs):
Exception.__init__(self, "cycle in constraints",
sofar, numpreds, succs)
self.preds = None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why its raised without keywords in the other two cases within this module.
@galaxybot test this |
@guerler up to you to merge this PR :) |
Re-targeting for 17.05 - not an important fix. I'll research the error handling a bit more to answer the above question. |
Yeah that would be good to know. It's not a big deal tho. Thanks for the fix. |
Is this WIP? |
Very slow progress - I haven't touched this since opening it. Feel free to just close it or look into changing the error handling yourself if you are eager. |
It looks good to me and I think you are raising the error in the correct way. I will merge it when the WIP flag is taken off. |
@guerler Okay - I removed the WIP label. |
Thanks for the fix @jmchilton |
Fixes #3236.