Skip to content

Commit

Permalink
Response to review.
Browse files Browse the repository at this point in the history
Fix no-submission retry delays bug.

undo unecessary thing

add get methods to allow for lack of default submission time limit

clarify the changelog entry
  • Loading branch information
wxtim committed Jan 17, 2024
1 parent 79712dc commit 3bae035
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion changes.d/fix.5712.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fixed a bug preventing simulation of task retries if job submission unset.
Fixed a bug preventing simulation of task retries if `submission retry delays` unset.
7 changes: 3 additions & 4 deletions cylc/flow/task_events_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ def _process_message_check(

if (
itask.state(TASK_STATUS_WAITING)
and itask.tdef.run_mode == 'live'
and
(
(
Expand All @@ -804,13 +803,13 @@ def _process_message_check(
f"[{itask}] "
f"{self.FLAG_RECEIVED_IGNORED}{message}{timestamp}"
)

else:
return False
elif flag == self.FLAG_POLLED_IGNORED:
LOG.warning(
f"[{itask}] "
f"{self.FLAG_POLLED_IGNORED}{message}{timestamp}"
)
return False
return False

severity = cast(int, LOG_LEVELS.get(severity, INFO))
# Demote log level to DEBUG if this is a message that duplicates what
Expand Down
9 changes: 3 additions & 6 deletions cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ def _set_retry_timers(
rtconfig = itask.tdef.rtconfig

submit_delays = (
rtconfig['submission retry delays']
or itask.platform['submission retry delays']
rtconfig.get('submission retry delays', [])
or itask.platform.get('submission retry delays', [])
)

for key, delays in [
Expand All @@ -1000,10 +1000,7 @@ def _simulation_submit_task_jobs(self, itasks, workflow):
itask.waiting_on_job_prep = False
itask.submit_num += 1
self._set_retry_timers(itask)
itask.platform = {
'name': 'SIMULATION',
'submission retry delays': [1]
}
itask.platform = {'name': 'SIMULATION'}
itask.summary['job_runner_name'] = 'SIMULATION'
itask.summary[self.KEY_EXECUTE_TIME_LIMIT] = (
itask.tdef.rtconfig['job']['simulated run length']
Expand Down

0 comments on commit 3bae035

Please sign in to comment.