Skip to content

Commit

Permalink
Ensure that platforms for skip and simulation contain default
Browse files Browse the repository at this point in the history
values for ___retry_delays, as the lack of these causes failure on
task retry or re-triggering.
  • Loading branch information
wxtim committed Oct 3, 2024
1 parent df10dca commit 30d50bf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cylc/flow/run_modes/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def submit_task_job(
'hosts': ['localhost'],
'disable task event handlers':
rtconfig['simulation']['disable task event handlers'],
'submission retry delays': [],
'execution retry delays': []
}
itask.summary['job_runner_name'] = RunMode.SIMULATION.value
itask.summary[task_job_mgr.KEY_EXECUTE_TIME_LIMIT] = (
Expand Down
4 changes: 3 additions & 1 deletion cylc/flow/run_modes/skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def submit_task_job(
'hosts': ['localhost'],
'disable task event handlers':
rtconfig['skip']['disable task event handlers'],
'execution polling intervals': []
'execution polling intervals': [],
'submission retry delays': [],
'execution retry delays': []
}
itask.summary['job_runner_name'] = RunMode.SKIP.value
itask.run_mode = RunMode.SKIP.value
Expand Down
32 changes: 32 additions & 0 deletions tests/integration/run_modes/test_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,35 @@ async def test_prereqs_marked_satisfied_by_skip_mode(
bar = schd.pool.get_task(IntegerPoint(1), 'bar')
satisfied_message, = bar.state.prerequisites[0]._satisfied.values()
assert satisfied_message == 'satisfied by skip mode'


async def test_outputs_can_be_changed(one_conf, flow, start, scheduler, validate):

schd = scheduler(flow(one_conf), run_mode='live')
async with start(schd) as log:
# Broadcast the task into skip mode, output failed and submit it:
schd.broadcast_mgr.put_broadcast(
["1"],
["one"],
[
{"run mode": "skip"},
{"skip": {"outputs": "failed"}},
],
)
schd.task_job_mgr.submit_task_jobs(
schd.workflow,
schd.pool.get_tasks(),
None,
None
)

# Broadcast the task into skip mode, output succeeded and submit it:
schd.broadcast_mgr.put_broadcast(
['1'], ['one'], [{'skip': {'outputs': 'succeeded'}}]
)
schd.task_job_mgr.submit_task_jobs(
schd.workflow,
schd.pool.get_tasks(),
None,
None
)

0 comments on commit 30d50bf

Please sign in to comment.