Repository navigation
fix(ci): validate, tag and publish a release from the commit it was computed from - #606
Merged
Merged
Conversation
…omputed from prepare-release re-reads main before computing the version, so a queued run releases what main holds when its turn comes. validate-release and publish-release still checked out the triggering commit, so a queued or re-run release computed its version from current main while validating, tagging and building an older commit. Re-running the release for #581 failed its Unreleased check on the original commit for exactly this reason. Record the commit prepare-release read and use it for every later checkout, the tag, and the revision stamped into binaries and images.
Contributor
PR Quality ReportCompared against base branch Coverage and tests
Compatibility
Performance smokePerformance smoke was skipped for this PR because no perf-sensitive paths changed. State
|
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.
The failure
The release run for #581 (
228dd827) failed withUnreleased changelog section is empty. That was correct at the time: #581 had been merged while behindmain, and its entries had landed inside[1.88.0](repaired in #605). After #605 merged, re-running the release still failed the same way.Why the re-run could not succeed
#593 made releases queue instead of cancelling each other, and made
prepare-releasere-readmainbefore computing the version. But the two jobs after it still checked out the commit that triggered the run:prepare-releasemain(re-read)validate-releasepublish-releasegit tag "$TAG" "$GITHUB_SHA", and binaries and the image recordgithub.shaSo any queued or re-run release computed its version and notes from one commit and validated, tagged and built another. The re-run read
main(which has #581's entries under[Unreleased]) and decided to release, thenvalidate-releasechecked[Unreleased]on228dd827, where it was empty.The same split can also misattribute a normal queued release: the version is computed after an earlier release's metadata landed, but the tag points at the older triggering commit.
The change
prepare-releaserecords the commit it read asrelease_sha.validate-releaseandpublish-releasecheck out that commit, the tag is created on it, and it is the revision stamped into the release binaries and the container image. No job usesgithub.shaany more. The metadata branch was already created from the checked-out commit, so it follows automatically.actionlintpasses.After merge
This push is CI-only, so the bot will not release from it. The pending
[Unreleased]entries (#581) are released either by the next merged fix, or immediately by dispatchingAuto Releasemanually, which now reads and releases from the same commit.