-
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
Don't release from runahead if paused. #4617
Conversation
If starting the #4278 example paused, task pool logging now shows only one task
i.e. we before the preparing stage, so all good. The initial task pool looks different because subsequent |
Integration tests fixed and extended. This could break func tests, if any, that check the task pool at paused start-up. Hopefully there are none, gotta go ... 👋 |
Damn it, one integration test is failing here, but I can't get it to fail locally. That's me done for now though. |
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 also get test_filter_task_proxies[Task state]
passing locally. I think the reason it might fail is because you've changed it so it is no longer paused at start, and the GHA runner must be quicker than our local machines, so the tasks get released and are no longer waiting when the mod_run
fixture shuts down?
cylc-flow/tests/integration/utils/flow_tools.py
Lines 78 to 105 in 072acd3
async def _run_flow( | |
run_dir: Path, | |
caplog: Optional[pytest.LogCaptureFixture], | |
scheduler: Scheduler, | |
level: int = logging.INFO | |
): | |
"""Start a scheduler.""" | |
contact = (run_dir / scheduler.workflow / WorkflowFiles.Service.DIRNAME / | |
WorkflowFiles.Service.CONTACT) | |
if caplog: | |
caplog.set_level(level, CYLC_LOG) | |
task = None | |
started = False | |
await scheduler.install() | |
try: | |
task = asyncio.get_event_loop().create_task(scheduler.run()) | |
started = await _poll_file(contact) | |
yield caplog | |
finally: | |
if started: | |
# ask the scheduler to shut down nicely | |
async with timeout(5): | |
scheduler._set_stop(StopMode.REQUEST_NOW_NOW) | |
await task | |
if task: | |
# leave everything nice and tidy | |
task.cancel() |
@@ -1455,7 +1455,7 @@ async def main_loop(self): | |||
tinit = time() | |||
|
|||
# Useful for debugging core scheduler issues: | |||
# self.pool.log_task_pool(logging.CRITICAL) | |||
self.pool.log_task_pool(logging.CRITICAL) |
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 assume you'll want to re-comment-out this?
self.pool.log_task_pool(logging.CRITICAL) | |
# self.pool.log_task_pool(logging.CRITICAL) |
) -> None: | ||
"""Test TaskPool.filter_task_proxies(). | ||
|
||
The NOTE before EXAMPLE_FLOW_CFG above explains which tasks should be |
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.
Does the note need updating?
cylc-flow/tests/integration/test_task_pool.py
Lines 28 to 29 in 24147ea
# NOTE: foo & bar have no parents so at start-up (even with the workflow | |
# paused) they are spawned out to the runahead limit. |
+# NOTE: foo & bar have no parents so at start-up they are
+spawned out to the runahead limit (only when not paused at start-up).
@@ -1470,7 +1470,7 @@ async def main_loop(self): | |||
|
|||
self.process_command_queue() | |||
|
|||
if self.pool.release_runahead_tasks(): | |||
if not self.is_paused and self.pool.release_runahead_tasks(): |
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.
Hmm, this would appear to be the reverse of a previous commit:
22e7a20#diff-90711b005fe27b9f894e6cd09f08816d847dcf853518894c6b7e2139784cbcb8R1444
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 think runahead tasks should still be released in "paused" mode, but that the "paused" state should stop them from running.
I.E. as implemented in #4436
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.
Good spotting! Admittedly this attempted fix was done in a desperate rush.
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.
Closing this, then (if needs be can reopen) |
These changes close #4278
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.