Attempt to fix over-keen restarter.

The restarter will restart jobs that were canceled by a newer change,
causing the new and old change to fight it out.

This change attempts to address this by treating the "canceled" message
as an error.
This commit is contained in:
Eric Fiselier
2025-06-28 12:57:45 -04:00
parent 372c808217
commit 169b4bea87

View File

@@ -32,7 +32,7 @@ jobs:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
script: |
const failure_regex = /Process completed with exit code 1./
const failure_regex = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)/
const preemption_regex = /(The runner has received a shutdown signal)|(The operation was canceled)/
const wf_run = context.payload.workflow_run
@@ -167,7 +167,7 @@ jobs:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
script: |
const FAILURE_REGEX = /Process completed with exit code 1./
const FAILURE_REGEX = /(Process completed with exit code 1.)|(Canceling since a higher priority waiting request)/
const PREEMPTION_REGEX = /(The runner has received a shutdown signal)|(The operation was canceled)/
function log(msg) {