Fix stale Java release preparation - #2543
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 617fe660-3b53-47f4-a7a6-a62b24c0589e
stephentoub
approved these changes
Sep 4, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Retries can use a newer POM while retaining a stale automatically derived release version.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
.github/workflows/java-publish-maven.yml — When releaseVersion is omitted, VERSION is derived from the POM before this loop. This reset… |
What changed in this PR
Updates Java release preparation to operate safely against live main.
Changes:
- Checks out and retries against current
main. - Records rollback identities only after a successful documentation push.
| File | Description |
|---|---|
.github/workflows/java-publish-maven.yml |
Adds live-branch checkout, retry logic, and safer rollback outputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 617fe660-3b53-47f4-a7a6-a62b24c0589e
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.

Summary
mainbranch when preparing Java releases instead of the workflow dispatch SHAmainadvancesRoot cause analysis
Actions run 33810120846 failed differently on its two attempts:
39c027b0, pushed documentation commit70fa5d31, and created Maven release commitd6791fcd. The Maven release plugin then failed when GitHub rejected thejava/v1.0.13-preview.6tag push withremote: fatal error in commit_refs. The guarded rollback succeeded and pushed18fba144and81ffc2a7, reverting the release and documentation commits.39c027b0. The Java workflow used the defaultactions/checkoutref, so it checked out that old commit even thoughmainhad advanced through the rollback commits and Update @github/copilot to 1.0.83-4 #2507 to184e504c. Its new documentation commit3bdce0b6was therefore rejected as a non-fast-forward push.docs_commit_shabefore the failed push, which triggered rollback. However,pre_prepare_commitwas recorded by the following step, which never ran. The rollback received an empty base SHA and failed withRecorded pre-prepare commit does not exist.Regression provenance
main. A rerun after any partial release rollback could therefore start from the original run SHA rather than currentmain.pre_prepare_commitonly after the documentation push.mainbetween attempts and exposed the stale checkout; it did not break Java.The original attempt-1 GitHub tag rejection is separate from this workflow regression. This change makes release preparation and reruns safe after that or any similar partial failure.
Fix
mainfor release preparationmainadvancesValidation
cd java && ./scripts/test-update-documentation-versions.shmain(no new findings)