Skip to content

Commit 94c1506

Browse files
committed
Further restrict the restarters ability to restart manually canceled jobs
1 parent 169b4be commit 94c1506

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/libcxx-restart-preempted-jobs.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ jobs:
3232
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
3333
with:
3434
script: |
35-
const failure_regex = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)/
35+
// The "The run was canceled by" message comes from a user manually canceling a workflow
36+
// the "higher priority" message comes from github canceling a workflow because the user updated the change.
37+
// And the "exit code 1" message indicates a genuine failure.
38+
const failure_regex = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)|(The run was canceled by)/
3639
const preemption_regex = /(The runner has received a shutdown signal)|(The operation was canceled)/
3740
3841
const wf_run = context.payload.workflow_run
@@ -167,7 +170,7 @@ jobs:
167170
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
168171
with:
169172
script: |
170-
const FAILURE_REGEX = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)/
173+
const FAILURE_REGEX = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)|(The run was canceled by)/
171174
const PREEMPTION_REGEX = /(The runner has received a shutdown signal)|(The operation was canceled)/
172175
173176
function log(msg) {

0 commit comments

Comments
 (0)