fix(release): run generate_changelog after update_major_tag - #515
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe release workflow now requires ChangesRelease and changelog updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔍 PR Validation Summary✅ PR Mergeable — no blocking failures
|
🔍 Lint Analysis
|
🛡️ CodeQL Analysis ResultsLanguages analyzed: ✅ No security issues found. 🔍 View full scan logs | 🛡️ Security tab |
…ngelog@v1 resolves to current code
…der plain section headers
1cf283b to
5b7958a
Compare
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 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/release.yml:
- Around line 327-328: The generate_changelog job is being unintentionally gated
by update_major_tag through its needs list, which can skip changelog generation
when enable_major_tag is false. Update generate_changelog in release.yml so it
only depends on the release publishing/status jobs required for changelog
creation, and remove the implicit dependency on update_major_tag while keeping
the existing enable_changelog and release_published condition.
🪄 Autofix (Beta)
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.yml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ffd27879-06b0-4e94-b185-1c09416bddbf
📒 Files selected for processing (2)
.github/workflows/release.ymlsrc/changelog/gptchangelog/action.yml
GitHub Actions Shared Workflows
Description
generate_changelogandupdate_major_tagboth depended only on[publish_release, publish_release_status], so they ran in parallel. This caused a race condition:generate_changelogstarts and resolvesgptchangelog@v1→ fetches the composite code at the currentv1tag (pointing to the previous release)update_major_tagruns concurrently and movesv1to the new release commitThis explains why the
jq: error: Could not open file /tmp/api_response.jsonkept appearing even after the fix was merged:gptchangelog@v1was resolved beforeupdate_major_taghad a chance to update the tag.Fix: add
update_major_tagtogenerate_changelog'sneedsto enforce sequencing. The changelog now always runs with the latestv1code.Evidence: https://github.com/LerianStudio/github-actions-shared-workflows/actions/runs/28143374372/job/83345332942
Type of Change
feat: New workflow or new input/output/step in an existing workflowfix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)perf: Performance improvement (e.g. caching, parallelism, reduced steps)refactor: Internal restructuring with no behavior changedocs: Documentation only (README, docs/, inline comments)ci: Changes to self-CI (workflows under.github/workflows/that run on this repo)chore: Dependency bumps, config updates, maintenancetest: Adding or updating testsBREAKING CHANGE: Callers must update their configuration after this PRBreaking Changes
None.
generate_changelogstill runs under the same conditions — it just waits forupdate_major_tagto complete first. Total wall-clock time increases by at most the duration ofupdate_major_tag(~30 s).Testing
update_major_tagresult is accessible in thegenerate_changelogif:context (it referencespublish_release_status.outputs.release_published, notupdate_major_tagoutputs)Summary by CodeRabbit