Skip to content

fix(release): push no intermediate tag and name deb/rpm assets without '~' - #1031

Merged
jbachorik merged 1 commit into
developfrom
claude/amazing-fermat-9u5o7j
Nov 17, 2026
Merged

jbachorik merged 1 commit into
developfrom
claude/amazing-fermat-9u5o7j

Conversation

@jbachorik

@jbachorik jbachorik commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this change do?

Two problems seen in the 3.0.0-RC1 release (run 26):

Internal tag left behind. prepare-release pushed vX.Y.Z_RC so the later jobs could check the release commit out, and finalize-tag deleted it with || true. The repository's tag rules refuse the deletion (GH013: Repository rule violations found for refs/tags/v3.0.0-RC1_RC ... Cannot delete this tag). So v3.0.0-RC1_RC stayed behind, every release would leave another, and the job still reported success.

The workflow now pushes no tag before the smoke tests:

  • prepare-release bundles the release commit (git bundle create release-commit.bundle <commit_sha>..HEAD) and uploads it as the release-commit artifact.
  • The jobs that checked out the intermediate tag or release_sha (stage-maven, publish-gradle-plugins, build-distributions, release-smoke, finalize-tag, publish-container-images) check out commit_sha, fetch the bundle, and detach at release_sha, asserting they are on it.
  • finalize-tag tags release_sha and pushes only the final vX.Y.Z tag, which carries the commit with it.
  • The leftover-_RC checks are removed from the workflow and scripts/release.sh.
  • cleanup deletes the new artifact.

deb/rpm asset names. The packages are versioned X.Y.Z~RCn so that package managers sort a candidate before X.Y.Z, and their file names follow that version. GitHub rewrites ~ in asset names, so RC1 was published as btrace_3.0.0.RC1-1_all.deb and btrace-3.0.0.RC1-1.noarch.rpm, which matches neither the release notes nor the release version.

  • create-github-release renames them to btrace_X.Y.Z-RCn-1_all.deb and btrace-X.Y.Z-RCn-1.noarch.rpm before upload. The version inside the packages is unchanged, and final releases have no ~, so their names don't change.
  • The asset check asserts those exact names.
  • The RC1 notes file now gives the names that were actually published.

Related issue

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

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, scripts/release.sh and docs only. The leftover v3.0.0-RC1_RC tag still needs deleting by a maintainer the tag rules allow; it does not block RC2 or 3.0.0.

Testing

  • Unit tests (no code change)
  • Integration tests (no code change)
  • spotlessCheck (not affected)
  • Documentation/link or sample verification (if applicable)

Commands and results:

python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"   -> parses
bash -n scripts/release.sh                                                       -> ok
DRY_RUN=true ./scripts/release.sh rc develop   -> Release Version: v3.0.0-RC2 (RC1 exists), no _RC check
Local simulation of the hand-off (bare clone as the remote):
  prepare: commit on commit_sha, git bundle create ... commit_sha..HEAD, git bundle verify  -> ok
  consumer: fresh clone, checkout commit_sha, git fetch <bundle>, checkout --detach release_sha
            -> "consumer reached release commit <sha>"
  finalize: git tag -a vX <release_sha>; git push origin refs/tags/vX -> remote has the commit
Rename loop on btrace_3.0.0~RC1-1_all.deb, btrace-3.0.0~RC1-1.noarch.rpm, btrace_3.0.0-1_all.deb
  -> btrace_3.0.0-RC1-1_all.deb, btrace-3.0.0-RC1-1.noarch.rpm, final name unchanged
python3 scripts/guardrails/check_agent_config.py / check_doc_commands.py / check_doc_versions.py -> OK

Not verified: a real release run. The next candidate (RC2) or 3.0.0 is the end-to-end check.

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:

  • The RC1 GitHub release body still shows the ~ names; paste the corrected lines from .github/release-notes/v3.0.0-RC1.md into it.
  • Delete v3.0.0-RC1_RC (needs a maintainer allowed by the tag rules).

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 by Claude Code


This change is Reviewable

…t '~'

- Internal tag: prepare-release pushed vX.Y.Z_RC so later jobs could
  check the release commit out, and finalize-tag deleted it with
  '|| true'. The repository's tag rules refuse deletion (run 26: 'GH013
  ... Cannot delete this tag'), so v3.0.0-RC1_RC was left behind and
  every release would leave another. The release commit now travels as a
  one-commit git bundle artifact (release-commit); the jobs that used the
  tag check out commit_sha, fetch the bundle and detach at release_sha.
  finalize-tag pushes only the final vX.Y.Z tag, which carries the
  commit. The checks for a leftover _RC tag go from the workflow and
  scripts/release.sh.
- Asset names: GitHub rewrites '~' in asset names, so RC1's
  btrace_3.0.0~RC1-1_all.deb was published as btrace_3.0.0.RC1-1_all.deb,
  matching neither the notes nor the release version. The deb and rpm are
  renamed to btrace_X.Y.Z-RCn-1_all.deb / btrace-X.Y.Z-RCn-1.noarch.rpm
  before upload (the version inside stays X.Y.Z~RCn), and the asset check
  asserts those exact names. The RC1 notes now give the names actually
  published.

Tested locally: bundle create/verify, a fresh checkout of commit_sha
fetching the bundle and reaching release_sha, a tag push carrying the
commit to the remote, and the rename on RC and final file names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qr5KuiEbTbQMuGQTUU4FhF
@jbachorik
jbachorik merged commit 3797b3a into develop Nov 17, 2026
22 checks passed
@jbachorik
jbachorik deleted the claude/amazing-fermat-9u5o7j branch November 17, 2026 14:15
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