Rebase before pushing snapshot bump to avoid push race - #162
Merged
Conversation
The release build can take many minutes. By the time the snapshot-bump script reaches its final push, master may have moved forward, causing a 'fetch first' rejection. Rebase onto the latest origin/master right before pushing so the push succeeds. Ref: failing Release run 32475984093.
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.
Problem
The Bump SNAPSHOT version on master (final release only) step of the Release workflow failed with exit code 1 (run
32475984093).CI/bump-snapshot.shpullsmasterat the start of the script, before the ~14 minute build/deploy/javadoc phases. By the time it reaches the final push,mastermay have moved forward, so:set -eaborts the whole release at that point. The version bump commit is created locally but never reaches GitHub.Fix
Rebase onto the latest
origin/masterright before pushing:git commit -m "Bump version to ${NEXT_SNAPSHOT}" git pull --rebase origin master git push origin masterThe script already pulls at the top for the initial checkout; re-pulling immediately before the push avoids the stale remote, so the final push fast-forwards.
Notes