-
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
cylc pause #4076
cylc pause #4076
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4e821b5
to
1e0cbb6
Compare
Before I go through any more tests, can I ask @oliver-sanders and/or @hjoliver to review the changes to |
Looks sensible to me, nice. The only thing I'm unsure about is whether is_paused should cause |
@hjoliver What do you say? cylc-flow/cylc/flow/scheduler.py Lines 1549 to 1596 in 5a71c4d
I'm not sure what the side effects of this method are |
(I still need to think about that question, ran out of time today sorry) |
Cross-posting from element, here's the cylc-flow/cylc/flow/scheduler.py Lines 1210 to 1237 in 5a71c4d
Here's my suggestion: def process_task_pool(self):
"""Process ALL TASKS whenever something has changed that might
require renegotiation of dependencies, etc"""
LOG.debug("BEGIN TASK PROCESSING")
time0 = time()
if self._get_events_conf(self.EVENT_INACTIVITY_TIMEOUT):
self.set_suite_inactivity_timer()
if not self.is_paused and self.stop_mode is None and self.auto_restart_time is None:
# ^ skip all this stuff if paused
# ...
self.broadcast_mgr.expire_broadcast(self.pool.get_min_point())
self.xtrigger_mgr.housekeep()
self.suite_db_mgr.put_xtriggers(self.xtrigger_mgr.sat_xtrig)
LOG.debug("END TASK PROCESSING (took %s seconds)" % (time() - time0)) This would allow the other things in that function to work as I think they currently would for a "held" workflow. |
Yep, I agree with @oliver-sanders 👍 |
1e0cbb6
to
c37e228
Compare
In this cylc-flow/cylc/flow/scheduler.py Lines 157 to 165 in c6fd91b
cylc-flow/cylc/flow/network/resolvers.py Lines 650 to 659 in a582f22
Should I change them to diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py
index 4bb79bfa0..027a2374c 100644
--- a/cylc/flow/scheduler.py
+++ b/cylc/flow/scheduler.py
@@ -156,8 +156,7 @@ class Scheduler:
# Dependency negotiation etc. will run after these commands
PROC_CMDS = (
- 'release_suite',
- 'release_tasks',
+ 'release',
'kill_tasks',
'force_spawn_children', |
c37e228
to
95691de
Compare
I think so, yes, but want to look at the associated code tomorrow... |
95691de
to
02b4748
Compare
Now: - cylc pause/play pauses/resumes the workflow - cylc hold/release holds/releases tasks pause/play is decoupled from hold/release, i.e. they don't affect task states
Should have been cycle point instead of time
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.
Approving after a somewhat rushed review, but LGTM 🎉
This comment has been minimized.
This comment has been minimized.
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.
Code review good, going to do some end-to-end testing, not expecting any issues.
Co-authored-by: Oliver Sanders <[email protected]>
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.
All good on the end-to-end testing 👍.
One small conflict and MyPy is a bit angry since recent changes?
Yes, the attribute declarations like |
data_store_mgr: DataStoreMgr | ||
suite_db_mgr: SuiteDatabaseManager | ||
broadcast_mgr: BroadcastMgr | ||
xtrigger_mgr: XtriggerManager |
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.
If making these attributes without defaults, they have to be before attributes with defaults in an @dataclass
class
Strange that
Suite log:
There is no Whereas on my local VLD I get
@oliver-sanders can you take a look? |
Sure. |
That's because it sets This should do it - https://github.com/cylc/cylc-flow/pull/4136/files |
Shouldn't be any need to re-run the tests |
Fair'nough |
These changes close #3897
cylc pause
cylc play
resumes a paused workflowcylc hold/release
from workflow state, so they only hold/release tasks (or set/remove the hold cycle point for all tasks*)*The
[scheduling]hold after cycle point
,cylc hold --after
andcylc play --hold-after
have remained pretty much the way they were, contrary to some of the discussion in #3897. However, they no longer affect the status of the task pool or scheduler, it just sets a point and if a spawned task is beyond that point it will be heldRequirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.