fix(ci): dispatch orb-beta-release against the tag, not the floating main ref - #4680
Merged
Merged
Conversation
…main ref The "Dispatch the ORB release build" step fired release-selfhost.yml via --ref main -- the floating branch -- rather than the beta tag it had just created and pushed one step earlier in the same job. Any commit landing on main in the gap between the tag-push step and the dispatch actually being processed by GitHub resolves github.sha inside the dispatched run to that newer commit, while the tag (already pushed, immutable) still points at the older one it was cut for -- tripping release-selfhost.yml's own TAG_SHA-must-equal-RELEASE_SHA fail-safe and aborting the release. Observed live: orb-v0.4.0-beta.21 was tagged at 347ada8, but by dispatch time main had moved to e984eef from a concurrent merge, aborting that day's scheduled beta release (safely -- no bad image was built). Dispatch against the tag instead: immutable once pushed, so github.sha resolves to exactly the commit the tag points to by construction, closing the race regardless of how many commits land on main afterward. Fixes #4679
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4680 +/- ##
=======================================
Coverage 94.14% 94.14%
=======================================
Files 435 435
Lines 38566 38566
Branches 14060 14060
=======================================
Hits 36308 36308
Misses 1599 1599
Partials 659 659 🚀 New features to boost your workflow:
|
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.
What broke
orb-beta-release.yml's "Dispatch the ORB release build" step firesrelease-selfhost.ymlvia--ref main— the floating branch — instead of the beta tag it had just created and pushed one stepearlier in the same job.
Observed live:
orb-v0.4.0-beta.21was tagged at347ada8ec. By the time the dispatch fired, aconcurrent merge had moved
maintoe984eef7c. The dispatched run resolvedgithub.shatoe984eef7c(from--ref main), while the tag it was supposed to release still pointed at347ada8ec—tripping
release-selfhost.yml's ownTAG_SHA-must-equal-RELEASE_SHAfail-safe and aborting. Thefail-safe worked correctly (no bad image built/published), but that day's scheduled beta release was
skipped.
Fix
Dispatch against
$TAGinstead ofmain. The tag is immutable once pushed, sogithub.shainside thedispatched run resolves to exactly the commit the tag points to, by construction — closes the race
regardless of how many commits land on
mainafterward.Verification
No
src/**code touched — this is a.github/workflows/*.ymltrigger-logic fix, not unit-testablewithout actually triggering a real release (out of scope here). Verified via
npm run actionlint(clean)and manual reasoning about
gh workflow run --ref's dispatch semantics.Fixes #4679