Skip to content

[improvement](release) Improve release helper workflow#65488

Open
morningman wants to merge 4 commits into
apache:masterfrom
morningman:fix-release-tools
Open

[improvement](release) Improve release helper workflow#65488
morningman wants to merge 4 commits into
apache:masterfrom
morningman:fix-release-tools

Conversation

@morningman

@morningman morningman commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The release helper scripts covered packaging and vote preparation, but the workflow did not include a completion step for publishing a passed release candidate, and the README was not structured enough for a release manager or AI agent to turn a version such as Doris 4.0.7 into concrete next steps. This PR adds a release completion script, updates the release configuration for final SVN artifact paths, and rewrites the README as a step-by-step runbook with clear boundaries for source artifacts, convenience binaries, manual emails, and PMC-only release SVN publishing.

Release note

None

Check List (For Author)

  • Test: No need to test (release tooling and documentation only)
    • Manual test: git diff --check upstream-apache/master..HEAD
    • Manual test: bash -n tools/release-tools/01-check-env.sh tools/release-tools/02-package-sign-upload.sh tools/release-tools/03-vote-mail.sh tools/release-tools/04-release-complete.sh
  • Behavior changed: No
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The release helper scripts stopped after generating the vote email. After a release vote passes, the release manager still had to manually copy source artifacts from dev SVN to release SVN, remove the RC suffix from release file names, and draft the announce email. This adds a fourth helper script that prepares the final release SVN artifacts from the voted RC, recomputes the checksum file with the final name, verifies the detached signature, removes the dev RC folder after the release commit succeeds, and writes the announce email draft.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - bash -n tools/release-tools/01-check-env.sh tools/release-tools/02-package-sign-upload.sh tools/release-tools/03-vote-mail.sh tools/release-tools/04-release-complete.sh
    - git diff --check -- tools/release-tools/README.md tools/release-tools/release.env tools/release-tools/04-release-complete.sh
    - tools/release-tools/04-release-complete.sh --help
    - printf 'https://github.com/apache/doris/releases\n' | tools/release-tools/04-release-complete.sh --mail-only
- Behavior changed: No
- Does this need documentation: Yes, included in tools/release-tools/README.md
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The release tools README described the helper scripts, but it did not give an AI agent enough structure to turn a request such as starting the Doris 4.0.7 release into a concrete release-manager checklist. This change rewrites the README around the release workflow, explains how to map a version and RC to the tag and release.env fields, and calls out manual boundaries around SVN publishing, source-only vote artifacts, convenience binaries, and public emails.

### Release note

None

### Check List (For Author)

- Test: No need to test (documentation-only change); ran git diff --check for the README.
- Behavior changed: No
- Does this need documentation: No
@morningman morningman changed the title [improvement](release) Add release completion script [improvement](release) Improve release helper workflow Jul 12, 2026
@morningman

Copy link
Copy Markdown
Contributor Author

skip buildall

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review found one blocking issue in the release completion tooling.

Critical checkpoint conclusions:

  • Goal/test: The PR adds a step-04 release completion script and rewrites the release-tool runbook. The script is syntactically valid, but the final published checksum sidecar is not verifier-compatible after the artifact rename.
  • Scope: The change is focused on release helper scripts and documentation.
  • Concurrency/lifecycle: No Doris runtime concurrency, lock, lifecycle, or static-initialization behavior is involved.
  • Configuration: release.env propagates the new final artifact basename and release SVN directory into step 04; the checksum bug is in how the existing step-02 sidecar is reused after that basename change.
  • Compatibility: Release artifact consumers expect .sha512 files to verify beside the published tarball. The accepted inline issue covers the incompatible checksum content.
  • Parallel paths: The vote upload path and completion path were both checked; the issue is at their boundary.
  • Testing: bash -n passes for all release-tool scripts. CI is otherwise green except this pending review job. I could not run an end-to-end SVN publish because svnmucc is not installed in this runner and the public SVN mutation must not be exercised during review.
  • Observability, transactions, and data writes: No Doris service observability or transaction path is involved. The public SVN write is intentionally atomic via svnmucc, but it would publish an invalid checksum sidecar as written.
  • Performance: No performance issue found.
  • User focus: No additional user-provided review focus was supplied.

Subagent conclusions: OPT-1 was accepted as MAIN-1 and submitted as the inline comment below. TSC-1 duplicated the same checksum issue and was merged. The remaining checked points were dismissed with evidence in the shared ledger. Convergence round 2 ended with both optimizer-rewrite and tests-session-config reporting NO_NEW_VALUABLE_FINDINGS for the final ledger/comment set.

mv "$src_tar" "${RELEASE_SVN_DIR}/${dst_tar}" \
mv "$src_asc" "${RELEASE_SVN_DIR}/${dst_asc}" \
mv "$src_sha512" "${RELEASE_SVN_DIR}/${dst_sha512}" \
rm "$DEV_SVN_DIR"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The final checksum sidecar still contains the RC filename. Step 02 writes ${PKG_BASE}.tar.gz.sha512 with sha512sum "$f", so the file content names apache-doris-${TAG}-src.tar.gz. Here step 04 only renames that sidecar to ${dst_tar}.sha512 while moving the tarball to apache-doris-${VERSION}-src.tar.gz and removing the dev RC folder. A normal sha512sum --check apache-doris-${VERSION}-src.tar.gz.sha512 in the release directory will then look for the old RC tarball name and fail. Please regenerate or rewrite the checksum content for ${dst_tar} before publishing it, and verify the final sidecar against the final basename.

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The release completion script moved the RC source checksum sidecar to the final release filename without updating the filename stored inside the sidecar. As a result, running sha512sum --check against the final release checksum looked for the removed RC tarball name and failed. This change regenerates the final checksum from the dev SVN source tarball using the RC-free release filename, verifies it locally, and uploads that regenerated sidecar in the atomic svnmucc release transaction. The release-tools README now documents that behavior, and a shell regression test covers the checksum publishing flow with fake SVN commands.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - bash -n tools/release-tools/01-check-env.sh tools/release-tools/02-package-sign-upload.sh tools/release-tools/03-vote-mail.sh tools/release-tools/04-release-complete.sh tools/release-tools/tests/test-release-complete-checksum.sh
    - bash tools/release-tools/tests/test-release-complete-checksum.sh
- Behavior changed: No
- Does this need documentation: No
@morningman

Copy link
Copy Markdown
Contributor Author

/review

@morningman

Copy link
Copy Markdown
Contributor Author

skip buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two release-tooling issues that should be fixed before this workflow is relied on for a real release.

Critical checkpoint conclusions:

  • Goal: add a release-completion step and runbook for publishing a passed RC. The overall shape is clear, but step 04 does not yet prove the published bytes are the voted RC before regenerating the final checksum.
  • Scope/focus: the change is focused on release tooling and docs; no FE/BE/cloud runtime path, concurrency, storage format, transaction, or config-propagation concern applies.
  • Parallel paths: step 01 is the readiness gate for the release workflow, but it was not updated for the new step-04 svnmucc dependency.
  • Tests: bash -n and the new checksum test pass locally, but the test currently covers the final checksum filename rewrite and misses the voted-RC sidecar validation gap and the step-01 dependency check.
  • Existing review context: the earlier checksum-sidecar thread is not duplicated here; it covered the final sidecar retaining the RC filename, while the new inline comment covers validating the source artifacts before regenerating that sidecar.

Subagent conclusions:

  • optimizer-rewrite found no optimizer/rewrite-specific candidates for this release-tooling PR.
  • tests-session-config reported TSC-1, merged into MAIN-1, and TSC-2, accepted as MAIN-2.
  • Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same final ledger/comment set.

Validation performed: bash -n tools/release-tools/01-check-env.sh tools/release-tools/02-package-sign-upload.sh tools/release-tools/03-vote-mail.sh tools/release-tools/04-release-complete.sh tools/release-tools/tests/test-release-complete-checksum.sh; bash tools/release-tools/tests/test-release-complete-checksum.sh. The checkout is grafted/shallow and thirdparty/installed is absent, so no full Doris build was attempted; this PR is release tooling only.


checksum_dir="$(mktemp -d)"
final_sha512_file="${checksum_dir}/${dst_sha512}"
svn cat "${svn_auth[@]}" "$src_tar" > "${checksum_dir}/${dst_tar}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 04 should verify the tarball bytes it is about to publish against the checksum and signature sidecars that voters approved before generating the RC-free checksum. Right now ${src_asc} and ${src_sha512} are only checked with svn info; the script then svn cats ${src_tar} and writes a new ${dst_sha512} from those bytes. If the dev SVN tarball was corrupted or replaced after the vote while the original sidecars remained, this path would publish the changed bytes and create a matching final checksum, so the release SVN artifacts would no longer be proven to be the voted RC. Please fetch ${src_sha512} and ${src_asc} into checksum_dir, verify the downloaded ${PKG_BASE}.tar.gz with sha512sum --check and gpg --verify, and only then rewrite/regenerate the final sidecar with ${dst_tar}.

local src_tar src_asc src_sha512 dst_tar dst_asc dst_sha512 checksum_dir final_sha512_file

require_tool svn
require_tool svnmucc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since step 04 now requires svnmucc, please add it to the required-tool loop in 01-check-env.sh as well. The README tells release managers to run ./01-check-env.sh before the release flow and lists svnmucc as a prerequisite, but that script still checks only git gpg svn sha512sum curl gzip. Without this, an RM can get environment looks READY, publish the RC vote, and only discover after the vote passes that the release-completion tool is unavailable.

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Step 04 of the release helper workflow requires svnmucc to publish final release artifacts, but 01-check-env.sh did not verify that svnmucc was available. A release manager could complete the preflight check and RC vote flow, then only discover the missing tool after the vote passed. This change adds svnmucc to the required tool check and adds a shell regression test for the required-tool list.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - bash -n tools/release-tools/01-check-env.sh tools/release-tools/02-package-sign-upload.sh tools/release-tools/03-vote-mail.sh tools/release-tools/04-release-complete.sh tools/release-tools/tests/test-release-complete-checksum.sh tools/release-tools/tests/test-check-env-required-tools.sh
    - bash tools/release-tools/tests/test-check-env-required-tools.sh
    - bash tools/release-tools/tests/test-release-complete-checksum.sh
- Behavior changed: No
- Does this need documentation: No
@morningman

Copy link
Copy Markdown
Contributor Author

/review

@morningman

Copy link
Copy Markdown
Contributor Author

skip buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one remaining release-tooling issue on the current head, separate from the already-open checksum/signature validation thread.

Critical checkpoint conclusions:

  • Goal: the PR adds a release-completion step and rewrites the runbook. The overall flow is clear, but the new step 04 still has one path-default bug that can target the wrong release SVN hierarchy.
  • Scope/focus: this change is limited to tools/release-tools; no FE/BE/cloud runtime, optimizer, transaction, storage, concurrency, or persistence path applies.
  • Parallel/config paths: step 01 now checks svnmucc, and the final checksum filename regeneration is covered by a shell test. The script fallback for RELEASE_SVN_DIR does not match release.env or the README.
  • Existing review context: I did not duplicate the existing line-164 thread about validating the tarball against the voted .sha512 and .asc sidecars. The older svnmucc preflight and final checksum filename comments are addressed by the current patch.
  • Tests/validation: bash -n passed for the changed scripts/tests, both added shell tests passed, and shellcheck -e SC2250 passed for the new step 04 script and tests. The checkout is shallow/grafted and lacks thirdparty/installed; real svn/svnmucc clients are also unavailable here, so I could not run a full Doris build or exercise the actual SVN commit.

Subagent conclusions:

  • optimizer-rewrite found no optimizer/Nereids issues and recorded the line-164 sidecar validation concern as a duplicate of existing thread discussion_r3565719663.
  • tests-session-config proposed TSC-1, which I verified and accepted as inline comment MAIN-1.
  • Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same final ledger/comment set.

User focus: no additional user-provided review focus was supplied.

[[ -n "${ASF_PASSWORD:-}" ]] && svnmucc_auth+=(-p "$ASF_PASSWORD")

RELEASE_PKG_BASE="${RELEASE_PKG_BASE:-apache-doris-${VERSION}-src}"
RELEASE_SVN_DIR="${RELEASE_SVN_DIR:-${RELEASE_SVN_BASE}/${VERSION}}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fallback does not match the release SVN layout that the new release.env and README document. If RELEASE_SVN_DIR is unset or empty in a custom/older env, step 04 falls back to ${RELEASE_SVN_BASE}/${VERSION}; for 4.0.7 that publishes under release/doris/4.0.7 instead of the intended release/doris/4.0/4.0.7. Please derive RELEASE_SERIES="${RELEASE_SERIES:-${VERSION%.*}}" here and use ${RELEASE_SVN_BASE}/${RELEASE_SERIES}/${VERSION} for the fallback, or fail when RELEASE_SVN_DIR is missing so the script cannot silently target the wrong release directory.

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