Repository navigation
fix(release): harden nightly release automation - #5957
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe PR updates nightly release dispatch and eligibility logic. It adds documentation URL generation to automatic changelog entries, including PR file retrieval, slug handling, path normalization, deduplication, and tests. ChangesNightly release workflow
Changelog documentation links
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubPRFilesAPI
participant fetchPR
participant DocumentationURLCollector
participant ChangelogEntry
fetchPR->>GitHubPRFilesAPI: retrieve changed PR files
GitHubPRFilesAPI-->>fetchPR: return filenames
fetchPR->>DocumentationURLCollector: derive documentation URLs
DocumentationURLCollector->>ChangelogEntry: append deduplicated links
sequenceDiagram
participant GitHubActionsDispatch
participant NightlyReleaseWorkflow
participant ReleaseStep
GitHubActionsDispatch->>NightlyReleaseWorkflow: provide release_version
NightlyReleaseWorkflow->>NightlyReleaseWorkflow: check unreleased changelog content
NightlyReleaseWorkflow->>ReleaseStep: pass dry-run and optional version
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/nightly-release-v3.yml:
- Around line 101-110: Update the changelog-check step and its conditional flow
around has_unreleased_content so an operational error from --check-only
propagates as a workflow failure instead of being treated as no unreleased
content. Preserve the existing successful false result and skip-release behavior
when the check completes successfully with empty content, while allowing only
that result to set has_changes=false and should_continue=false.
In `@v3/scripts/auto-changelog_test.go`:
- Line 1: Update the CI workflow to explicitly run the ignored tests in
auto-changelog_test.go from the v3 directory using a file-list go test command,
while preserving the existing auto-changelog.go execution. Alternatively, move
the tests into a discoverable package so go test ./... includes them.
In `@v3/scripts/auto-changelog.go`:
- Around line 171-178: Update the changed-file response struct and iteration in
the relevant changelog function to unmarshal each file’s status, then skip
entries whose status is "removed" before appending filenames or reading
frontmatter. Preserve processing for all non-removed files so documentation URLs
continue to be collected.
- Around line 164-165: Update fetchPRFiles to retrieve up to 30 pages, or
continue by following GitHub API pagination links, so all pull-request files are
considered. In documentationURLForFile, skip changed documentation files that
are missing from the checkout while continuing to generate links for other
available files.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a985a1a-46f2-4456-9e73-0ac4bafdc92a
📒 Files selected for processing (3)
.github/workflows/nightly-release-v3.ymlv3/scripts/auto-changelog.gov3/scripts/auto-changelog_test.go
There was a problem hiding this comment.
Pull request overview
This PR hardens the v3 nightly release automation by basing release decisions strictly on unreleased changelog content, adding an explicit version input for ad-hoc releases, and enriching AI-generated changelog entries with deterministic documentation links derived from docs source paths.
Changes:
- Generate deterministic documentation URLs from changed docs files (including
indexroutes and optional frontmatterslug) and append them to relevant changelog entries. - Extend the nightly release workflow to (a) gate releases solely on unreleased changelog content and (b) support an explicit
release_versionfor ad-hoc beta releases. - Add unit tests for the documentation URL path/slug mapping logic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| v3/scripts/auto-changelog.go | Adds doc URL derivation and PR “changed files” fetching to append deterministic documentation links to generated changelog entries. |
| v3/scripts/auto-changelog_test.go | Adds tests covering docs path → URL mapping, including index handling, locale prefixes, and slug overrides. |
| .github/workflows/nightly-release-v3.yml | Gates scheduled releases on unreleased changelog content and adds an optional release_version input forwarded to the release task. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| docURL, err := documentationURLForFile(file) | ||
| if err != nil { | ||
| return nil, err | ||
| } |
| // Documentation is still being built when this job runs, so the public URL | ||
| // must be derived from the source path rather than checked against the live | ||
| // site. Only Added entries get the link; the generated prose remains model | ||
| // controlled, while the URL is deterministic and cannot be hallucinated. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/nightly-release-v3.yml (1)
18-22: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAllow
release_versionto bypass the changelog gate.When
release_versionis set withoutforce_release=true, the workflow exits before passing--versiontorelease.go. Include the explicit-version input in the continuation conditions, or document that callers must also setforce_release=true.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/nightly-release-v3.yml around lines 18 - 22, Update the workflow’s release continuation conditions to allow a non-empty release_version to proceed without requiring force_release=true, ensuring the explicit version reaches release.go via --version while preserving existing behavior for other release paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/nightly-release-v3.yml:
- Around line 18-22: Update the workflow’s release continuation conditions to
allow a non-empty release_version to proceed without requiring
force_release=true, ensuring the explicit version reaches release.go via
--version while preserving existing behavior for other release paths.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ab445010-a292-4c01-a7a5-983ceaf9e146
📒 Files selected for processing (4)
.github/workflows/auto-changelog-v3.yml.github/workflows/nightly-release-v3.ymlv3/scripts/auto-changelog.gov3/scripts/auto-changelog_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/scripts/auto-changelog.go
…nightly release automation
* fix(release): gate nightly releases on changelog content * fix(release): address review feedback * fix(release): allow explicit versions through workflow gate
… harden nightly release automation
Summary
release_versioninput for ad-hoc beta releases.Why
The nightly workflow previously treated arbitrary commits after the latest release tag as release evidence. That could create an unnecessary release after release bookkeeping or automation commits. Documentation links are now calculated from the checked-out docs source before deployment, including index routes, locale prefixes, and frontmatter slug overrides.
Validation
go test scripts/auto-changelog.go scripts/auto-changelog_test.gogo test ./internal/changelog ./tasks/releasegit diff --checkSummary by CodeRabbit
New Features
Bug Fixes
Tests