Prepare RC: push the RC tag only after staging succeeds - #3787
Open
RussellSpitzer wants to merge 1 commit into
Open
Prepare RC: push the RC tag only after staging succeeds#3787RussellSpitzer wants to merge 1 commit into
RussellSpitzer wants to merge 1 commit into
Conversation
prepare-rc.sh created and pushed the RC tag at step 5, then did the work that can actually fail -- Nexus deploy, source tarball, SVN staging -- in steps 6-8. Every failure in that window left a published tag and consumed an RC number; 1.19.0 accumulated eight orphaned tags (rc0-rc7, all on the same commit) that way, and cancel-rc.sh cannot clean them up because it requires a live staging repository. Keep `git tag -a` at step 5 so local consumers still resolve it -- step 7 reads it via `git rev-list -1` and `git archive`, both local -- and move only `git push origin <tag>` to step 9, immediately before the GitHub pre-release that needs it on the remote. A failure in steps 6-8 now leaves the tag only on the runner, so a retry reuses the same RC number with no ref surgery. The branch push stays at step 5: it publishes the version-bump commit, is idempotent, and is what lets a retry skip the version update. Trade-off: staged artifacts are briefly visible before the tag exists, and a tag push failing after staging succeeds leaves a staged RC with no tag. Recovery there is one idempotent `git push origin <tag>`, which is cheaper than deleting a published ref. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wgtmac
approved these changes
Sep 11, 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.
Rationale for this change
In the release automation we pushed the tag before we were sure the staging artifacts were successfully pushed. This means we were burning an RC even if the stage failed.
What changes are included in this PR?
Tag is still created before staging, but not pushed until after staging.
Are these changes tested?
No
Are there any user-facing changes?
No