Key release concurrency on the commit, not the branch - #9
Merged
Conversation
Every push to main shared one group, and GitHub keeps only the newest pending run in a group, so merging several packages in quick succession cancelled the runs in between — and each was the only thing that would ever release its package. The serialisation that was wanted is per package and version, which is now on the release job itself.
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.
Package
None — this is CI infrastructure.
What this fixes
Merging six package PRs in quick succession released one of them. The other four merged into
mainand never got a release, so nothing could install them, and there was no failure anywhere to say so.concurrency.groupwasrelease-${{ github.ref }}, so every push tomainshared one group. GitHub keeps only the newest pending run in a group and cancels the rest — and a cancelled run takes its package's release with it, becausedetectworks from that push's owngithub.event.before. The surviving run only releases what its own commit changed.The failure is silent by construction: the merge succeeds, the run is "cancelled" rather than failed, and nobody learns the release is missing until an install comes up empty.
Changes
github.sha. A push is its own unit of work and must never supersede another push's run.slug+version. This is the serialisation that was actually wanted — it stops two pushes touching the same package racing past the tag-exists check to create the same tag.cancel-in-progress: false, because the loser still has work to do.Note on the four missed releases
Already recovered by re-running the cancelled runs one at a time — each replays with its own
beforeSHA, and the leg is idempotent against an existing tag. All five in-repo packages now have releases and the catalog lists them. This PR is so it does not happen again.