Repository navigation
fix(ci): stop release-tagging from racing itself on concurrent merges - #4361
Merged
Merged
Conversation
The release-tagging job pushes a `[release]:` version-bump commit straight to main. Two merges landing seconds apart (e.g. #4357 and #4360) each triggered a run, and the second lost the push with `! [rejected] (fetch first)`. Re-running can't recover it: the job checks out the original trigger commit, which is now behind main, so the push is a permanent non-fast-forward. Two fixes: - concurrency group (cancel-in-progress: false) serializes runs so bumps queue instead of racing. - the push rebases its bump onto the latest main and retries (up to 5x) instead of failing on non-fast-forward. The bump only touches version manifests, so it rebases cleanly over unrelated merges (the actual failure here: #4360 touched a Helm chart, not package.json). A genuine same-manifest conflict still fails loudly rather than guessing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
release-taggingpushes a[release]:version-bump commit directly tomain. When two PRs merge within seconds of each other, both runs trigger and the second push is rejected:(Seen just now: #4357 and #4360 merged back-to-back — failed run.) Re-running doesn't help — the job checks out the original trigger commit, which is now behind
main, so it's a permanent non-fast-forward.Fix
concurrencyguard (cancel-in-progress: false) serializes release-tagging runs so bumps queue instead of racing.mainand retry (up to 5×) rather than hard-failing. The bump only touches version manifests, so it rebases cleanly over unrelated merges (the actual trigger here: chore(sandbox-env): bump chart to 0.9.2 to publish the golden cache template #4360 changed a Helm chart, notpackage.json). A real same-manifest conflict still fails loudly.actionlint clean; YAML validated.
Note on the incident it fixes
No damage from that failure — the daemon image build is a separate workflow and published fine (
sha-beee678); the golden feature is off by default so prod is unaffected. This just stops the red run from recurring.Summary by cubic
Prevents
release-taggingfrom racing on back-to-back merges by serializing runs and rebasing before push, so version bumps reliably land onmain. Stops permanent non-fast-forward failures and the resulting red runs.concurrencygrouprelease-tagging-mainwithcancel-in-progress: falseto queue runs instead of racing.HEAD:main, on rejection fetch/rebase ontoorigin/mainand retry up to 5 times; fail loudly on real conflicts.Written for commit b1c1bdb. Summary will update on new commits.