Skip to content

ci: automate Apache release candidate staging - #8347

Merged
Aias00 merged 6 commits into
apache:masterfrom
yuluo-yx:feat/ci-release-automation
Nov 13, 2026
Merged

Aias00 merged 6 commits into
apache:masterfrom
yuluo-yx:feat/ci-release-automation

Conversation

@yuluo-yx

@yuluo-yx yuluo-yx commented Nov 7, 2026

Copy link
Copy Markdown
Member

Problem

The Apache ShenYu release candidate flow currently requires a maintainer workstation to build and validate artifacts, import the signing key, sign Maven and SVN files, upload and close Nexus staging, and publish the SVN candidate directory. This makes the flow difficult to repeat and makes the resulting coordinates easy to lose between steps.

Changes

  • Add a manual release-candidate workflow that accepts a protected <version>-release ref, release version, candidate label, Sonatype profile, signing fingerprint, and signed-tag choice.
  • Reuse the existing full ci.yml release-candidate matrix and wait for all candidate checks before any signing or external publication.
  • Keep LDAP and GPG secrets out of the build and test steps; inject them only for signing, Nexus settings, and SVN import.
  • Sign every Maven primary artifact, generate Maven SHA-1/MD5 sidecars, and prepare canonical Apache Admin, Bootstrap, and source distribution names with PGP and SHA-512 files.
  • Upload and close the Nexus staging repository with auto-release disabled, import the candidate into Apache dist/dev, optionally push a signed candidate tag, and write Maven/SVN coordinates to the workflow summary and evidence artifact.
  • Document required repository secrets, one-click inputs, generated outputs, and post-vote manual gates.

Validation

  • node --test .github/scripts/test-ci-workflows.mjs
  • python3 -m py_compile .github/scripts/prepare-release-candidate.py
  • git diff --check
  • Ruby YAML parse of .github/workflows/release-candidate.yml
  • Offline GPG smoke test for Maven signing, SHA-1/MD5 generation, canonical SVN files, SHA-512 generation, and manifest output

The workflow intentionally stops at a closed Maven staging repository and dist/dev; promotion and final announcement remain Apache community vote gates.

@codecov-commenter

codecov-commenter commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.84%. Comparing base (1748a0e) to head (493b2df).
⚠️ Report is 1361 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #8347       +/-   ##
=============================================
+ Coverage     61.49%   71.84%   +10.34%     
- Complexity     8818    18230     +9412     
=============================================
  Files          1261     1773      +512     
  Lines         39273    68801    +29528     
  Branches       3725     8060     +4335     
=============================================
+ Hits          24151    49427    +25276     
- Misses        12952    15211     +2259     
- Partials       2170     4163     +1993     
Flag Coverage Δ
admin 75.55% <ø> (?)
client-register-registry 54.39% <ø> (?)
core 65.67% <ø> (?)
dist-extra 61.78% <ø> (?)
gateway-runtime 83.70% <ø> (?)
plugin-ai 76.60% <ø> (?)
plugin-base 79.79% <ø> (?)
plugin-logging 76.65% <ø> (?)
plugin-proxy 77.37% <ø> (?)
starters 74.40% <ø> (?)
starters-agent 93.65% <ø> (?)
sync 65.59% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yuluo-yx
yuluo-yx requested review from Aias00 and a balanced review from Copilot November 7, 2026 03:26

Copilot AI 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.

🟡 Changes recommended

Critical release-workflow defects break CI dispatch, permit incomplete or stale artifacts to be staged, and expose signing credentials without enforcing branch protection.

7 open issues
What changed in this PR

Adds manual release-candidate staging automation for Apache ShenYu, moving signing and publication from maintainer workstations into GitHub Actions while keeping final promotion behind community vote gates.

Changes:

  • Adds a workflow to dispatch CI, stage Maven and SVN artifacts, optionally sign a candidate tag, and report release coordinates.
  • Adds artifact signing, checksum generation, and canonical distribution naming.
  • Documents required secrets, workflow inputs, outputs, and post-vote steps.
File Description
docs/​release-ci.md Documents candidate staging and manual promotion gates.
.github/​workflows/​release-candidate.yml Orchestrates CI dispatch, signing, publication, tagging, and evidence collection.
.github/​scripts/​prepare-release-candidate.py Prepares signatures, checksums, distribution files, and a manifest.

Review effort: Balanced

Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved

@Aias00 Aias00 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.

Stream Agent analysis

#8347 adds three files to automate Apache release-candidate staging: .github/scripts/prepare-release-candidate.py (signs/checksums Maven + SVN artifacts), .github/workflows/release-candidate.yml (manual dispatch workflow), and docs/release-ci.md. The signing, checksum, Nexus staging-close (autoReleaseAfterClose=false), SVN import, optional signed tag, and evidence-artifact logic are internally coherent, and the consumed artifact name (shenyu-local-maven-repository) and tarball layout (repository.tar.gz -> org/apache/shenyu) match the existing ci.yml build_local_repo job. However, the workflow's core orchestration step depends on a ci.yml contract that does not exist in the reviewed head.

Evidence

  • release-candidate.yml:123 dispatches gh workflow run ci.yml ... -f release_candidate=true.
  • ci.yml:18-20 declares bare on.workflow_dispatch: with no inputs:; a repository-wide search for release_candidate returns matches only in release-candidate.yml and docs/release-ci.md, never in ci.yml.
  • Full diff read across 4 pages (has_more=false); artifact name shenyu-local-maven-repository (release-candidate.yml:146) and tarball layout (repository.tar.gz -> org/apache/shenyu) are consistent with ci.yml:199/203.

Recommended next steps

  • Add the release_candidate boolean input to ci.yml's on.workflow_dispatch: (or remove the -f release_candidate=true flag) so the dispatch at release-candidate.yml:123 succeeds.
  • Make docs/release-ci.md:33 accurately describe the ci.yml behavior present in the reviewed version, or land the ci.yml RC matrix in the same change.
  • Re-run the release-candidate workflow against a real <version>-release ref after fixing the dispatch contract; attached CI checks are currently in_progress/pending and not passing.

Scope: captured diff and GitHub check metadata only; no local tests were executed.

Task: 09c0c910-2aee-4663-b93f-948910b1fe7a · Commit: a7031175af9ea0d304ac5a40176394e4643009a8

Review verdict: NEEDS_CHANGES

CRITICAL contract break: release-candidate.yml:123 passes release_candidate=true to ci.yml, which defines no such workflow_dispatch input; the dispatch will fail with HTTP 422, blocking the entire candidate-staging flow. The docs (release-ci.md:33) also describe a ci.yml RC matrix/behavior not present in the reviewed head. CI checks in the attachment are in_progress/pending (passed=false), so the change also does not satisfy a passing-CI requirement.

Publication: REQUEST_CHANGES (VERIFIED_BLOCKING_FINDINGS)

  • .github/workflows/release-candidate.yml:123 [RIGHT] Dispatches gh workflow run ci.yml --ref "$RELEASE_REF" -f release_candidate=true, but the reviewed ci.yml declares bare on.workflow_dispatch: with no inputs:. A repository-wide search finds release_candidate only in the new files. GitHub's workflow_dispatch API rejects unknown inputs (HTTP 422), so this first publishing step fails and no candidate is ever staged.
  • docs/release-ci.md:33 [RIGHT] Documentation claims the workflow dispatches ci.yml with release_candidate=true and waits for a complete RC matrix including artifact legal-file checks, source rebuild, Java 17/21 tests, RAT and integration checks. The reviewed ci.yml exposes no such input or RC-specific matrix; the description is counterfactual for the pinned version.

Review details

The PR's release-candidate workflow cannot start its core path. At release-candidate.yml:123 it runs gh workflow run ci.yml --ref "$RELEASE_REF" -f release_candidate=true, but the reviewed ci.yml declares bare workflow_dispatch: with no inputs: and a repo-wide search shows release_candidate exists only in the new files. GitHub's workflow_dispatch API rejects unknown inputs (HTTP 422), so the first staging step fails and no candidate is ever produced. The docs (release-ci.md:33) also describe a ci.yml RC matrix that is not present. These must be fixed (add the release_candidate input to ci.yml or drop the flag, and correct the docs) before merge. Separately, the attached CI is still in_progress/pending and not passing.

@yuluo-yx
yuluo-yx requested review from Aias00 and a balanced review from Copilot November 7, 2026 04:39

Copilot AI 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.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved
Comment thread .github/workflows/release-candidate.yml Resolved

@Aias00 Aias00 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.

Stream Agent analysis

PR #8347 (head 1493515) adds automated Apache release-candidate staging: a new manual release-candidate.yml workflow that validates a protected -release branch, dispatches the existing ci.yml with a release_candidate flag, signs Maven artifacts, closes a Nexus staging repo, imports dists into SVN dev, and optionally pushes a signed tag. It adds three helper scripts (check-release-artifacts.py, collect-release-licenses.py, prepare-release-candidate.py), extends ci.yml with a release build path + source_release_check job, tweaks restore-shenyu-local-repo.sh, updates shenyu-admin/pom.xml and two assembly descriptors for dashboard legal materials, and adds docs/release-ci.md. Full diff read: 57132 chars, 9 files, has_more=false on the final page.

Evidence

  • Frozen diff fully read: 57132 chars across 9 files (ci.yml, release-candidate.yml, 3 new scripts, restore-shenyu-local-repo.sh, docs/release-ci.md, script/source-release.xml, shenyu-admin/pom.xml, shenyu-src-dist/source.xml); resource_diff returned has_more=false on the final page (offset 56000->57132).
  • CI evidence: check_count=90, complete=true, passed=false; the build check is completed/failure while e2e and all e2e-case jobs succeeded.
  • release-candidate.yml validates release_ref against ^[0-9]+.[0-9]+.[0-9]+-release$, requires protected branch + required_reviewers env rule, rejects SNAPSHOT POMs and existing tags/SVN dirs before signing/publishing.

Recommended next steps

  • Fix or re-run the failing build CI check and attach build logs to determine if the failure is caused by the modified ci.yml build step or is environmental.
  • Confirm in a real dispatch that release-candidate.yml's run-title correlation (displayTitle 'Release candidate <dispatch_id>') reliably matches the dispatched ci.yml run.
  • Verify the apache-release-candidate GitHub Environment is configured with at least one required reviewer and the -release branches are protected before relying on the workflow's preconditions.

Scope: captured diff and GitHub check metadata only; no local tests were executed.

Task: 6c9c6b98-e826-40cf-8c7b-6e50d03f1341 · Commit: 1493515f0f67812c7d0779912802fc9e73f3ffb2

Review verdict: INCONCLUSIVE

Full text coverage of the diff was achieved (9 files, 57132 chars, all pages read, final page has_more=false). The PR content is coherent release-automation work. However, the review policy requires passing CI for PASS, and the frozen CI evidence reports the build check as failure (passed=false across 90 checks). The evidence contains no build logs, so no concrete HIGH/CRITICAL defect can be anchored to a specific diff path/line/side, which prevents issuing NEEDS_CHANGES. A definitive PASS or NEEDS_CHANGES verdict therefore cannot be finalized; the review is inconclusive pending a green build and/or logs explaining the failure.

Publication: COMMENT (INCONCLUSIVE_REVIEW)

Review details

I reviewed the complete diff for #8347. The release-automation code is internally coherent: release-candidate.yml enforces a protected -release branch, a non-empty required_reviewers environment rule, non-SNAPSHOT POM, and rejects pre-existing candidate tags/SVN dirs before any signing or publishing; ci.yml reuses the existing matrix and adds artifact/license/source-rebuild gates. However, the CI evidence reports the build check as failed (passed=false across 90 checks). Because PASS requires a passing CI and the evidence contains no build logs to anchor a concrete HIGH/CRITICAL defect to a specific diff line, I cannot finalize PASS or NEEDS_CHANGES. Please provide a green build (or logs proving the failure is unrelated) before this can be recommended for merge.

@Aias00
Aias00 merged commit 23dc1bd into apache:master Nov 13, 2026
90 checks passed
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.

4 participants