Skip to content

fix(release): hand the release commit to later jobs without an internal tag - #1030

Closed
jbachorik wants to merge 2 commits into
developfrom
claude/happy-allen-50e6ka
Closed

jbachorik wants to merge 2 commits into
developfrom
claude/happy-allen-50e6ka

Conversation

@jbachorik

@jbachorik jbachorik commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this change do?

Stops the release workflow from creating its internal vX.Y.Z_RC tag.

Why the tag existed. Prepare Release commits the version change. The jobs between Prepare Release and Finalize Release Tag need that commit before the final tag names it: Stage to Maven Central, Publish Gradle Plugins, Build Distributions, the release smoke test and the container images. A release candidate has no branch to carry it, so the commit was parked under vX.Y.Z_RC.

Why it has to go. Finalize Release Tag deletes the internal tag, but the repository's tag rules forbid deleting tags. For 3.0.0-RC1 (run 44069366261) the push was rejected:

remote: error: GH013: Repository rule violations found for refs/tags/v3.0.0-RC1_RC.
remote: - Cannot delete this tag
 ! [remote rejected]   v3.0.0-RC1_RC (push declined due to repository rule violations)
Deleted RC tag v3.0.0-RC1_RC

|| true hid the error and the step still logged "Deleted RC tag". Every release would leave one of these tags behind.

The replacement:

  • Prepare Release bundles the commits GitHub does not have (git bundle create … HEAD --not --remotes=origin) and uploads the bundle as the release-commit artifact. This runs before the release-branch push, which would otherwise leave nothing to bundle.
  • Each job that needs the release commit checks out commit_sha with full history, so the bundle's prerequisites are present, then fetches the bundle and checks out release_sha, failing unless HEAD equals it.
  • Finalize Release Tag pushes the final tag, which also uploads the commit.
  • Dry runs take the same path, so Build Distributions no longer needs a separate dry-run checkout.
  • The cleanup job deletes the new artifact.
  • Build Distributions loses its "Update version for dry run" step (eb43f023). It only re-applied the version when dry runs built the bare commit_sha; the release commit already carries it.

The _RC leftover checks are removed from validate and scripts/release.sh. docs/releasing.md and docs/ReleaseChecklist.md drop the internal tag; the existing v3.0.0-RC1_RC can be ignored.

Related issue

N/A. Found in the 3.0.0-RC1 release run.

Scope and compatibility

  • I identified the affected module(s) and kept unrelated changes out of this PR.
  • This preserves the supported Java/runtime compatibility tiers, or the change is documented below.
  • This does not change the masked-JAR layout, class-loader boundary, or wire protocol.
  • If it does, I updated the relevant architecture documentation and verification plan.

Compatibility or migration notes: release workflow and release script only, for every release type.

Testing

  • Unit tests
  • Integration tests (if applicable)
  • spotlessCheck
  • Documentation/link or sample verification (if applicable)

Commands and results:

# Bundle mechanics, locally
release commit on a detached base, git bundle create f HEAD --not --remotes=origin  -> 585-byte bundle, "is okay"
fresh full clone at the base: git fetch <bundle>; git checkout --detach <release_sha> -> HEAD == release_sha
depth-1 clone of the base, same fetch, then git push of a tag on the release commit  -> remote has the tag at release_sha
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"     -> parses
bash -n scripts/release.sh                                                           -> ok
grep RC_TAG .github/workflows/release.yml                                            -> no matches
# Release dry runs of this branch's release.yml (workflow_dispatch; release_type=rc, release_version=3.0.0-RC2, commit_sha=0d3e489b, dry_run=true)
Run 44076720162 (Release #27, 05b5f21c) -> success
  Prepare Release: Bundle the release commit -> success; Upload the release commit -> success
                   Push release branch -> skipped (rc); no tag created
  Build Distributions: Download the release commit -> success; Check out the release commit -> success (HEAD == release_sha)
  Validate, Build and Test, Integration Tests JDK 8/11/17/21/25/27/28-ea -> success
Run 44079324043 (Release #28, eb43f023, final head) -> success

Documentation and release impact

  • User-facing documentation is updated, or no documentation change is needed.
  • Release notes/changelog are updated, or no release-note entry is needed.
  • Samples, distribution contents, or published coordinates are updated if affected.
  • This change is safe to merge independently of a release, or the dependency is explained below.

Release notes / follow-up work: a dry run skips Stage to Maven Central, Publish Gradle Plugins, the release smoke test, Finalize Release Tag and the container images. They use the same checkout steps; the next real release is their first run.

Final checklist

  • I reviewed the complete diff and removed unrelated changes.
  • New or changed behavior has appropriate tests, or the reason for not adding them is explained above.
  • User-facing behavior, APIs, samples, and documentation are consistent with this change.
  • I did not include generated build output, local configuration, credentials, or other accidental files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qr5KugNMySpdUw3Uivh4UB


This change is Reviewable

…al tag

Prepare Release tagged the version commit vX.Y.Z_RC so that later jobs
(Stage to Maven Central, Publish Gradle Plugins, Build Distributions,
Release smoke, Finalize Release Tag, container images) could check it out
before the final tag exists; a release candidate has no branch to carry
it. Finalize Release Tag then deleted the internal tag, but the
repository's tag rules forbid that: for 3.0.0-RC1 (run 44069366261) the
push was rejected with "GH013 ... Cannot delete this tag", `|| true`
hid it, and v3.0.0-RC1_RC stayed behind. Every release would leave one.

Prepare Release now bundles the commits GitHub does not have
(`git bundle create ... HEAD --not --remotes=origin`), before the release
branch push, and uploads the bundle as the release-commit artifact. The
jobs that need the release commit check out commit_sha with full history
(so the bundle's prerequisites are present), fetch the bundle, and check
out release_sha. Finalize Release Tag pushes the final tag, which uploads
the commit. Dry runs use the same path, so Build Distributions no longer
needs a separate dry-run checkout.

Removes the leftover-_RC-tag checks from validate and release.sh, and the
internal tag from the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qr5KugNMySpdUw3Uivh4UB
Dry runs used to build commit_sha, which lacks the version commit, so
Build Distributions re-applied the version. Every run now builds the
release commit from the release-commit bundle, which already carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qr5KugNMySpdUw3Uivh4UB

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #1031, which landed the same fix on develop: the release commit travels as a release-commit bundle artifact, no internal vX.Y.Z_RC tag is created, and the _RC checks are gone. The two leftovers this PR had beyond #1031, the dead "Update version for dry run" step in Build Distributions and the "RC tag" row in docs/ReleaseChecklist.md, go into a separate follow-up PR.


Generated by Claude Code

@jbachorik jbachorik closed this Nov 17, 2026
jbachorik pushed a commit that referenced this pull request Nov 17, 2026
develop gained #1031, which replaces the internal vX.Y.Z_RC tag with a
release-commit bundle, the same fix as the closed #1030; this merge takes
develop's version of every file. Two leftovers remain and are removed:

- Build Distributions' "Update version for dry run" step. Dry runs used to
  build commit_sha, which lacks the version commit; every run now checks
  out the release commit from the bundle, which already carries it, and
  no later step reads the VERSION_FILE it exported.
- The "RC tag" row of the release checklist's candidate identity, now the
  release commit that Prepare Release outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qr5KugNMySpdUw3Uivh4UB
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.

2 participants