-
Notifications
You must be signed in to change notification settings - Fork 94
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
Require completion of at least one optional output #5423
Comments
Agreed, but I think we need this to apply only to internal outputs. (Note succeed and fail are already treated as special, because they are mutually exclusive). Consider the case where success and failure are optional as well:
The intention here would be that IF But If success is optional we can't just demand that one or more optional outputs must be completed, because then it would be OK for And if success/fail is (necessarily) treated as special, then I think its OK not to require explicit handling of :fail in this case:
(Note that |
Sadly I think mutual exclusion cases are simply not something we can handle with the global optional outputs logic as it stands. I think this may have come up in the proposal, I've gotta feeling that sub-graphs were touted as the answer e.g:
For now I wonder whether requiring at least one optional output to be generated would make it harder to make mistakes with graph branching. |
I agree, but note I was not talking about mutual exclusion cases there. ("at least one of", not "exactly one of". My only point is just that we should not count |
Superseded by #5640 |
Pasted from @oliver-sanders on Element chat:
E.G. here's the example I presented yesterday:
I said that Cylc would follow one of three possible pathways through the graph, but of course that's a bit of a lie. Cylc may follow zero pathways through the graph and shutdown as it is possible that a could succeed without generating any of the x, y or z outputs.
The awkward workaround is to force a stall with a pseudo dependency:
So our current interpretation of this:
Is that "zero or more of x, y & z MUST be output"
However, it would be possible to interpret that as "one or more of x, y & z MUST be output" by making the assertion that when optionals (?) are used, at least one of them MUST be output. I think this is the user's intention for 99% of cases. The outliers being cases like this:
Under this logic all pathways must be explicitly defined (explicit is better than implicit - PEP8), so we would have to explicitly state the error handling for the fail case here something like this:
The text was updated successfully, but these errors were encountered: