feat: add changelog fragments workflow#11572
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
|
✅ All required changelog fragments are present. |
🔒 Container Security ScanImage: 📊 Vulnerability Summary
2 package(s) affected
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
2 package(s) affected
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
16 package(s) affected
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
9 package(s) affected
|
- Validate changelog compile target branches - Use an explicit master checkout for forward sync - Cover changelog attribution edge cases
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11572 +/- ##
==========================================
- Coverage 94.02% 93.50% -0.53%
==========================================
Files 241 277 +36
Lines 35705 37164 +1459
==========================================
+ Hits 33573 34750 +1177
- Misses 2132 2414 +282
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Context
Prowler currently keeps unreleased entries in shared
CHANGELOG.mdblocks. That makes changelog edits the hottest conflict point in the repository: the migration research measured 400 of 673 recentmastercommits touching a changelog, with the SDK changelog alone touched 230 times. When two PRs append to the same section, GitHub cannot auto-merge the second one, so contributors rebase, resolve a mechanical conflict, and re-run CI. Backports hit the same problem on release branches.This PR migrates Prowler to per-PR changelog fragments while preserving the existing per-component
CHANGELOG.mdfiles and the release notes format consumed byprepare-release.yml. The core idea is simple: contributors write one small fragment file per changelog entry, and release managers compile those fragments into stamped changelog sections at release time.Description
This introduces the fragment workflow across SDK, API, UI and MCP Server:
<component>/changelog.d/directories,towncrier.tomlconfigs and a shared Towncrier template that renders the same Keep a Changelog structure, emoji section names and PR links used today.(Prowler UNRELEASED)blocks, and adds a stable<!-- changelog: release notes start -->insertion marker to every component changelog..github/scripts/changelog_attribution.py, which resolves each fragment's PR from git history and the GitHub API before compilation, so contributors do not need to know or write the PR number in the filename or entry text.Tools: Compile Changelogsworkflow. It is manually dispatched withprowler_versionandtarget_branch, auto-derives component versions from the latest stamped changelog heading plus pending fragment types, runs Towncrier, and opens ano-changelogcompile PR for review.master, inserting the same stamped patch block and deleting the consumed fragments there so the next minor release cannot publish those entries again.Tools: Check Changelogto require fragments for touched components, validate fragment filenames, reject hand-written PR links, keep theno-changelogopt-out, and temporarily accept directCHANGELOG.mdedits during the migration grace period.CHANGELOG.mdedits.Developer flow after this PR:
<slug>is author-chosen,<type>is one ofadded,changed,deprecated,removed,fixedorsecurity, and the file content is one changelog entry line without a PR link or trailing period. A PR that needs multiple entries adds multiple fragment files.Release flow after this PR:
Tools: Compile Changelogsagainstmaster, review and merge the compile PR, then cut thev5.Xbranch and runprepare-release.ymlas usual.v5.X; dispatch the compile workflow againstv5.X, review and merge the release-branch compile PR, then review and merge the automatically opened master forward-sync PR.prepare-release.ymlremains unchanged.The workflow fails loudly instead of producing incomplete release notes: it rejects invalid version inputs, empty compiles, missing insertion markers, leftover hand-written
(Prowler UNRELEASED)blocks, andremovedfragments without an explicit major version decision.Steps to review
Review the migration of existing unreleased entries:
prowler/CHANGELOG.mdtoprowler/changelog.d/.api/CHANGELOG.mdtoapi/changelog.d/.ui/CHANGELOG.mdtoui/changelog.d/.Review the contributor-facing contract:
<slug>.<type>.md.Review
.github/workflows/pr-check-changelog.ymlfor parity with the current gate:no-changelogescape hatch.Review
.github/workflows/compile-changelogs.ymlas the replacement for the manualchore(changelog): vX.Y.Zstamping PR:no-changelog.Review
.github/scripts/changelog_attribution.pyfor the PR resolution path:Validation performed for the migration work:
prepare-release.ymlrelease-note extraction over the compiled files matched the existing release-note shape.Checklist
Community Checklist
SDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.