Skip to content

fix(release): let a retry ignore the attempt it is retrying - #41

Merged
stuffbucket merged 1 commit into
mainfrom
fix/release-retry-after-a-failed-attempt
Sep 3, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
fix/release-retry-after-a-failed-attempt

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

Found while retrying v0.5.0-rc.3 after stuffbucket/macos-builder#26.

RELEASING.md says to recover a failed release by re-running the workflow with the same tag, and every job is idempotent for exactly that. The CI assertion was not.

It dropped check runs belonging to the current run, by GITHUB_RUN_ID, so this workflow's own in-progress jobs did not read as unfinished CI. An earlier attempt on the same commit was not dropped — and a release run that was cancelled or timed out leaves its jobs behind as check runs with conclusion=cancelled/failure:

::error::Non-success checks on 92a985af: await + verify dmg=cancelled

So the documented recovery path stopped working at the exact moment it was needed: the second attempt was always refused, whatever went wrong in the first. This is not specific to a cancel — a collect timeout, the failure mode the recovery path was written for, does the same thing.

The change

Filter by workflow id: drop every run of this workflow on the commit, current and earlier. Resolved through the API rather than by naming the workflow file or its job names, so this step does not become a second owner of either.

Verified

Against the real check runs on 92a985a, which now carry two prior release attempts:

check runs on the commit 14
dropped as belonging to release.yml 8, including await + verify dmg = cancelled
kept as real CI 6, all success
exit 0

Before the change the same input exits 1. A stubbed genuinely-failing CI check is still rejected, so the step still does the job it exists for.

RELEASING.md tells you to recover a failed release by re-running the
workflow with the same tag, and every job is built to be idempotent for
exactly that. The CI assertion was not.

It dropped check runs belonging to the CURRENT run, by GITHUB_RUN_ID, so
that this workflow's own in-progress jobs did not read as unfinished CI.
An EARLIER attempt on the same commit was not dropped. A release run that
was cancelled or timed out leaves its jobs behind as check runs with
conclusion=cancelled or failure, and the retry then read the previous
attempt as failed CI and refused:

  ::error::Non-success checks on 92a985a: await + verify dmg=cancelled

So the documented recovery path stopped working at the exact moment it was
needed — the second attempt was always refused, whatever went wrong in the
first.

Now filtered by workflow id: every run of THIS workflow on the commit is
dropped, the current attempt and any earlier one. Resolved through the API
rather than by naming the workflow file or its jobs, so this step does not
become a second owner of either.

Verified against the real check runs on 92a985a, which carry two prior
release attempts: 14 check runs in, the 8 belonging to release.yml dropped
(including await + verify dmg=cancelled), the 6 real CI checks kept, exit
0. A stubbed genuinely-failing CI check is still rejected.
@stuffbucket
stuffbucket merged commit 73bf269 into main Sep 3, 2026
6 checks passed
@stuffbucket
stuffbucket deleted the fix/release-retry-after-a-failed-attempt branch September 3, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant