Repository navigation
Conversation
Cancel superseded in-progress builds so the newest master commit wins the deploy race. Scoped per ref, so PR/staging/prod builds stay independent. Fixes #3733. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3734 +/- ##
=======================================
Coverage 76.80% 76.80%
=======================================
Files 71 71
Lines 2522 2522
Branches 360 360
=======================================
Hits 1937 1937
Misses 455 455
Partials 130 130 🚀 New features to boost your workflow:
|
oalders
marked this pull request as ready for review
September 18, 2026 20:14
ranguard
approved these changes
Sep 18, 2026
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.
Closes #3733
Problem
build-container.ymlhad noconcurrencygroup, so two overlapping master builds could finish seconds apart with the slower one deploying an older commit — rolling back a newer deploy.Change
Added a workflow-level
concurrencyblock:group: ${{ github.workflow }}-${{ github.ref }}— one group per ref, so overlapping master pushes share a group and cancel each other while PR/staging/prod builds stay independent.cancel-in-progress: true— supersedes older in-progress builds; the newest commit to enter the group wins the deploy.Used
${{ github.workflow }}-${{ github.ref }}(GitHub idiom) instead of a hardcodedbuild-container-prefix so it survives a workflow rename; behavior is identical.Tradeoff
Intermediate master commits in a burst no longer get images (superseded builds are cancelled). Rollbacks target previously deployed tags, which are unaffected. This only makes the race rare; the ordering guarantee belongs in set-image.yml (metacpan/metacpan-k8s#206).
Verification
on:triggers (push/pull_request/workflow_dispatch) intact.cancel-in-progresscan only cancel older in-progress runs, never the newest, and the single-job workflow leaves no half-deployed state.Not auto-marked ready: touches
.github/workflows/**, so it is left in draft for a human review.🤖 Generated with Claude Code · Opus 4.8