Skip to content

Rebase before pushing snapshot bump to avoid push race - #162

Merged
vpelikh merged 1 commit into
masterfrom
fix/release-push-race
Aug 21, 2026
Merged

Rebase before pushing snapshot bump to avoid push race#162
vpelikh merged 1 commit into
masterfrom
fix/release-push-race

Conversation

@vpelikh

@vpelikh vpelikh commented Aug 21, 2026

Copy link
Copy Markdown
Owner

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.sh pulls master at the start of the script, before the ~14 minute build/deploy/javadoc phases. By the time it reaches the final push, master may have moved forward, so:

! [rejected]  master -> master (fetch first)
error: failed to push some refs
Updates were rejected because the remote contains work that you do not have locally.

set -e aborts the whole release at that point. The version bump commit is created locally but never reaches GitHub.

Fix

Rebase onto the latest origin/master right before pushing:

git commit -m "Bump version to ${NEXT_SNAPSHOT}"
git pull --rebase origin master
git push origin master

The 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

  • The rest of the pipeline (deploy, tag, draft release) had already succeeded before this step; nothing else needed changing.

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.
@vpelikh vpelikh changed the title fix: rebase before pushing snapshot bump to avoid push race Rebase before pushing snapshot bump to avoid push race Aug 21, 2026
@vpelikh
vpelikh merged commit b097cea into master Aug 21, 2026
5 checks passed
@vpelikh
vpelikh deleted the fix/release-push-race branch August 21, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant