Skip to content
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

Merged
merged 1 commit into from
Mar 8, 2017

Conversation

jmchilton
Copy link
Member

Fixes #3236.

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)
Copy link
Contributor

@guerler guerler Jan 8, 2017

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.

Copy link
Member Author

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

Copy link
Contributor

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.

@bgruening
Copy link
Member

@galaxybot test this

@bgruening
Copy link
Member

@guerler up to you to merge this PR :)

@jmchilton jmchilton modified the milestones: 17.05, 17.01 Jan 12, 2017
@jmchilton
Copy link
Member Author

Re-targeting for 17.05 - not an important fix. I'll research the error handling a bit more to answer the above question.

@guerler
Copy link
Contributor

guerler commented Feb 9, 2017

Yeah that would be good to know. It's not a big deal tho. Thanks for the fix.

@guerler
Copy link
Contributor

guerler commented Mar 7, 2017

Is this WIP?

@jmchilton
Copy link
Member Author

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.

@guerler
Copy link
Contributor

guerler commented Mar 7, 2017

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.

@jmchilton
Copy link
Member Author

@guerler Okay - I removed the WIP label.

@guerler guerler merged commit b9c1abd into galaxyproject:dev Mar 8, 2017
@guerler
Copy link
Contributor

guerler commented Mar 8, 2017

Thanks for the fix @jmchilton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants