-
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
Allow manual trigger when workflow paused. #6192
base: master
Are you sure you want to change the base?
Conversation
4c577e0
to
e43bc72
Compare
I would prefer to have a clean separation of play/pause and hold/release rather than crossing the concepts. I'm also not convinced by the "operational blocker" statement, especially as there is a documented workaround (i.e. this is a preference not a requirement). However, I am quite happy to concede if this is desired. Removing the question label. This change shouldn't really go into a bugfix release, but it's small enough that I think it's ok to sneak it in if we really want to. |
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.
From a quick functional test, this works as expected:
cylc trigger
causes a task to submitcylc set --pre=all
does not.
if ( | ||
itask.state.is_held or | ||
(is_paused and not itask.is_manual_submit) | ||
): |
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.
We would expect this functionality to work the same across all queue implementations, so we could really do with abstracting it into the base class rather than relying on each queue to implement it separately.
Note: If we could bypass the queue entirely that would be ideal.
Idea (for future work), write some abstract tests that should hold for all queue implementations.
@@ -1225,8 +1225,7 @@ def release_queued_tasks(self) -> bool: | |||
|
|||
""" | |||
if ( | |||
not self.is_paused | |||
and self.stop_mode is None | |||
self.stop_mode is 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.
there's nothing wrong with defining workflow pause as pausing all automatic job submission
This has gone a little further than that one word change above as we are now continuing to process the queues whilst the workflow is paused making the paused state a little more dynamic than before.
I don't think we actually need to process the entire queue to achieve this, we just need to skip any manually triggered tasks through the queue (ideally bypassing the queue itself if possible).
If we pass self.is_paused
through to release_queued_tasks
we could reduce the scope of this override such that it only impacts manually triggered tasks.
Needs tests (could do with covering the behaviour w/ |
(Will undraft again soon, once I've tried your suggestion re queue processing @oliver-sanders ) |
(Damn it, thought I had completed this ... it's wanted at NIWA ... coming back to it soon). |
Close #5963
I've added the "question" label because there's some disagreement on the issue itself:
@oliver-sanders has argued that manual triggering (i.e., with immediate effect) should only be allowed with
cylc hold */*
(hold all tasks individually) and notcylc pause
(pause the workflow).However:
cylc hold */*
yet, and it may not be trivial to do it+13/-7
code lines without tests) so at the very least it provides a working interim solutionCheck List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.