Skip to content

fix: harden the release workflow - #3283

Open
DrakeLin wants to merge 6 commits into
delta-io:mainfrom
DrakeLin:fix/release-process-reliability
Open

fix: harden the release workflow#3283
DrakeLin wants to merge 6 commits into
delta-io:mainfrom
DrakeLin:fix/release-process-reliability

Conversation

@DrakeLin

@DrakeLin DrakeLin commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

Harden the Kernel release workflow:

  • allow maintainers to select an alternate Cargo registry without editing release.sh
  • add an idempotent changelog refresh command plus CI verification so PRs merged while a release
    PR is open cannot be silently omitted
  • restrict Kernel release boundaries to semantic-version tags so artifact tags such as
    v0.0.1_dat cannot truncate the changelog

Changelog verification uses git-cliff's own filtered commit context and reachable branch tags,
runs only on release/ branches, and fails closed if its tooling cannot resolve the release range.
A failed refresh restores the existing changelog.

This complements #3066, which handles independently versioned UC crates. Its suffixed per-crate
tags are deliberately excluded from Kernel changelog boundaries.

How was this change tested?

  • .github/scripts/test-release.sh with git-cliff 2.10.1, covering alternate-registry forwarding,
    artifact and divergent tags, late PRs, skipped release commits, idempotent refresh, and failure
    restoration
  • ./release.sh verify-changelog
  • bash -n and ShellCheck 0.10.0
  • actionlint 1.7.7
  • cargo +nightly fmt -- --check
  • cargo doc --workspace --all-features --no-deps

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.34%. Comparing base (6dd5a96) to head (a85375a).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3283      +/-   ##
==========================================
+ Coverage   90.28%   90.34%   +0.05%     
==========================================
  Files         251      250       -1     
  Lines       88562    89131     +569     
  Branches    88562    89131     +569     
==========================================
+ Hits        79960    80524     +564     
+ Misses       5718     5672      -46     
- Partials     2884     2935      +51     

☔ 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.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Benchmark results: ✅ Pass

Summary: 🚀 0  ·  ✅ 10  ·  ☑️ 4  ·  🚧 1  ·  ❌ 0

Per-benchmark results (15 rows)
Test Change Base PR
clustered/readMetadataLatestPredicate/serial ✅ 1.01x faster 103.2±1.86ms 101.7±1.27ms
crcLatest/snapshotLatest ✅ 1.00x 10.6±0.27ms 10.6±0.29ms
crcMissing/snapshotLatest ☑️ 1.01x slower 25.0±0.66ms 25.2±0.74ms
crcSlightlyStale/snapshotLatest ☑️ 1.01x slower 11.4±0.32ms 11.5±0.33ms
crcVeryStale/snapshotLatest ✅ 1.00x 17.3±0.35ms 17.3±0.39ms
partitioned/readMetadataLatestPredicate/serial ☑️ 1.02x slower 57.9±1.32ms 59.1±2.44ms
v1Checkpoint/readMetadataLatest/serial ✅ 1.00x 12.8±0.13ms 12.8±0.17ms
v1Checkpoint/snapshotLatest ✅ 1.01x faster 871.4±40.68µs 859.7±40.58µs
v2Checkpoint/readMetadataLatest/parallel2 ✅ 1.00x 9.3±0.45ms 9.3±0.51ms
v2Checkpoint/readMetadataLatest/serial ✅ 1.00x 15.0±0.12ms 15.0±0.17ms
v2Checkpoint/snapshotLatest ✅ 1.02x faster 887.6±8.32µs 870.6±38.25µs
wideSchemaJsonStats/readMetadataLatestPredicate/serial ☑️ 1.01x slower 77.0±0.71ms 77.9±0.78ms
wideSchemaJsonStats/snapshotLatest ✅ 1.00x 2.4±0.08ms 2.4±0.04ms
wideSchemaStructStats/readMetadataLatestPredicate/serial ✅ 1.00x 33.3±0.43ms 33.2±0.37ms
wideSchemaStructStats/snapshotLatest 🚧 1.05x slower 2.2±0.04ms 2.3±0.05ms

Legend: 🚀 ≥1.15x faster  · ✅ faster or unchanged  · ☑️ ≤1.03x slower  · 🚧 1.03x-1.15x slower  · ❌ ≥1.15x slower
Commit: a85375a · Trigger: auto-push · Tags: base · Updated: 2026-09-11 15:01 PDT

@nicklan nicklan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, this will help a lot I think. left some comments

Comment thread release.sh Outdated
Comment thread release.sh Outdated
Comment thread release.sh Outdated
Comment thread release.sh Outdated
Comment thread release.sh Outdated
Comment thread release.sh
Comment thread release.sh Outdated
@DrakeLin
DrakeLin requested a review from nicklan September 11, 2026 21:49

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review (draft - human review required)

Show review

No blocking issues. This is a well-scoped hardening of the release tooling: the subcommand dispatcher, the fail-closed changelog verification, the semver-only tag pattern, and the backup/restore on a failed refresh all hold up. Two candidate correctness concerns (pipeline failure propagation through the latest_kernel_release_tag command substitution, and the single-PR-token match in verify_release_changelog) were checked and dismissed: bash command substitutions inherit pipefail, and the last-token match deliberately mirrors what cliff.toml renders. The notes below are non-blocking.

Summary

The change is sound and no blocking issues were found; the notes above are maintainability and coverage suggestions. Coverage was reduced: the maintainer-claude-reviewer pass stalled and did not return after one retry, so this review reflects the maintainer-codex, architecture, test-coverage, and docs reviewers plus a disprove gate that dismissed both candidate blockers.


Automated review - workflow run

Comment thread release.sh
printf -v RELEASE_CHANGELOG_HEADING '## [v%s]' "$version"
}

release_changelog_section() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit1 The changelog format now has two authors. cliff.toml's Tera template owns rendering, but release.sh independently re-decodes it: the ## [v...] heading via printf/awk, the [#N]: back-reference via grep -Fq "[#$pr]:" (line 180), and cliff's last-token PR extraction via regex; release_changelog_section and strip_release_changelog_section (196-204) also encode the same section boundary twice. A template edit can silently desync the parsers, causing phantom 'missing PR' failures or a false pass. Raised by: architecture-reviewer, maintainer-codex-reviewer. Suggested fix: derive the rendered [#N]: set from the same git cliff --context output instead of re-deriving cliff's link rule, and share one section-boundary helper between the two awk programs.

Comment thread release.sh

release_changelog_heading() {
local version="$1"
printf -v RELEASE_CHANGELOG_HEADING '## [v%s]' "$version"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit2 release_changelog_heading mutates the file-scope RELEASE_CHANGELOG_HEADING global, while every sibling helper returns on stdout for $(...) capture. The hidden 'call, then read the global' dependency is not visible at the call site and does not compose. Raised by: architecture-reviewer. Suggested fix: release_changelog_heading() { printf '## [v%s]' "$1"; } and let callers do heading=$(release_changelog_heading "$version").

Comment thread release.sh
log_warning "No prior Kernel release tag found"
return 1
fi
if [[ "$previous_tag" == "v$version" ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit3 Several new guard branches are untested by test-release.sh: this already-tagged equal-version early return (160-163), the empty-section guard (166-169), the main() unknown-command/argument-count errors, and the handle_release_branch abort when verify_release_changelog fails (252-254). The release_changelog_subjects failure branch (171-174) is also unreachable in the harness because latest_kernel_release_tag fails first. Raised by: test-coverage-reviewer. Suggested fix: add cases that tag the release and assert this path exits 0, request a version with no section and assert failure, and drive an unknown command / missing argument.

Comment thread cliff.toml
postprocessors = []

[git]
# Only plain semver tags mark Kernel releases. Artifact-specific tags such as v0.0.1_dat must not

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit4 This comment (and RELEASING.md) say only 'plain semantic-version tags such as v0.28.0' act as release boundaries, but tag_pattern also admits pre-release tags such as v0.29.0-rc.1. Wording nuance, not a functional error. Raised by: docs-reviewer. Suggested fix: say 'plain or pre-release semver tags', or tighten the pattern if pre-releases should not be boundaries.

@nicklan nicklan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, although i think the nits added by the bot mostly make sense to do. thanks!

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