-
Notifications
You must be signed in to change notification settings - Fork 95
Fix platform subshell evaluating more than once for tasks triggered in paused workflow #7035
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
base: 8.6.x
Are you sure you want to change the base?
Changes from 6 commits
8cc913a
23749b4
1d0fa35
57e5931
7ebd02b
dfcdcab
9401a1a
a3ddfc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fixed platform subshell expression evaluating more than once for tasks triggered in paused workflow. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1341,7 +1341,7 @@ def release_tasks_to_run(self) -> bool: | |
| """ | ||
| pre_prep_tasks: Set['TaskProxy'] = set() | ||
| if ( | ||
| self.stop_mode is None | ||
| not self.stop_mode | ||
| and self.auto_restart_time is None | ||
| and self.reload_pending is False | ||
| ): | ||
|
|
@@ -1350,36 +1350,30 @@ def release_tasks_to_run(self) -> bool: | |
| pre_prep_tasks.update(self.pool.tasks_to_trigger_now) | ||
| self.pool.tasks_to_trigger_now = set() | ||
|
|
||
| if self.is_paused: | ||
| # finish processing preparing tasks | ||
| pre_prep_tasks.update({ | ||
| itask for itask in self.pool.get_tasks() | ||
| if itask.state(TASK_STATUS_PREPARING) | ||
| }) | ||
| else: | ||
| if not self.is_paused: | ||
MetRonnie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # release queued tasks | ||
| pre_prep_tasks.update(self.pool.release_queued_tasks()) | ||
|
|
||
| elif ( | ||
| ( | ||
| # Need to get preparing tasks to submit before auto restart | ||
| self.should_auto_restart_now() | ||
| and self.auto_restart_mode == AutoRestartMode.RESTART_NORMAL | ||
| ) or ( | ||
| # Need to get preparing tasks to submit before reload | ||
| self.reload_pending | ||
| ) | ||
| if ( | ||
| # Manually triggered tasks will be in preparing state and should | ||
| # be submitted even if paused (unless stopping). | ||
| self.is_paused and not self.stop_mode | ||
| ) or ( | ||
| # Need to get preparing tasks to submit before auto restart | ||
| self.should_auto_restart_now() | ||
| and self.auto_restart_mode == AutoRestartMode.RESTART_NORMAL | ||
| ) or ( | ||
| # Need to get preparing tasks to submit before reload | ||
| self.reload_pending | ||
| ): | ||
| # finish processing preparing tasks first | ||
| pre_prep_tasks = { | ||
| itask for itask in self.pool.get_tasks() | ||
| pre_prep_tasks.update({ | ||
| itask | ||
| for itask in self.pool.get_tasks() | ||
| if itask.state(TASK_STATUS_PREPARING) | ||
| } | ||
| and itask.waiting_on_job_prep | ||
| }) | ||
|
Comment on lines
1369
to
1373
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oliver-sanders This PR pre-dated #7054 and had basically the same fix. However #7054 missed L1376 - I have consolidated the two in this PR. One difference here is that I did not delete the check for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK now waiting on @oliver-sanders to check that.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think there's any need to have |
||
|
|
||
| # Return, if no tasks to submit. | ||
| else: | ||
| return False | ||
|
|
||
| if not pre_prep_tasks: | ||
| return False | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.