You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add changelog.d fragments to avoid CHANGELOG.md merge conflicts - #5967
Almost every user-facing PR adds an entry under ## [Unreleased] in CHANGELOG.md, so those PRs regularly conflict with each other even though there is no logical conflict. #5733 narrowed when an entry is needed, but as discussed on the dev list the contention remained.
PRs now add their entries as small files under changelog.d/, and the release merges them into CHANGELOG.md.
Instead of editing CHANGELOG.md, add changelog.d/<short-title>.md: a miniature changelog with one ### <section> heading per part of the changelog, each followed by list items. Example:
### Breaking changes
- `FOO_ENABLED` now defaults to true.
### Upgrade notes
- Set `FOO_ENABLED` to false to keep the previous behavior.
Notes:
The policy on when to add an entry is unchanged.
The JetBrains changelog plugin is removed.
Propagation to main is manual and assumes a release cut from main. Maintenance lines need separate review.
Nothing detects a PR that edits [Unreleased] directly. Reviewers should watch for it.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The RC≥1 procedure can leave cherry-picked changelog fragments unmerged, while the new fragment rewrite and deletion logic lacks regression tests for release-note integrity and failure safety.
The reason will be displayed to describe this comment to others. Learn more.
Agree, if deleting a fragment fails, the task still reports success.
A subsequent invocation can append that fragment again.
This needs checked deletion and explicit failure reporting.
Simply throwing after deletion fails also leaves a partially completed operation, so the recovery procedure must be clear.
Mind adding a that test successful execution includes successful consumption of every included fragment; incomplete cleanup cannot silently succeed or lead operators to assume a retry is harmless?
The reason will be displayed to describe this comment to others. Learn more.
Agree, if deleting a fragment fails, the task still reports success.
A subsequent invocation can append that fragment again.
This needs checked deletion and explicit failure reporting.
Simply throwing after deletion fails also leaves a partially completed operation, so the recovery procedure must be clear.
Mind adding a that test successful execution includes successful consumption of every included fragment; incomplete cleanup cannot silently succeed or lead operators to assume a retry is harmless?
The reason will be displayed to describe this comment to others. Learn more.
The README asserts that two PRs never touch the same file, but later explicitly permits follow-up PRs to edit or delete existing fragments. Concurrent follow-ups, filename collisions, and release deletion versus ongoing edits can still conflict.
Maybe replace with something like this?
Separate fragment files avoid conflicts caused by unrelated PRs inserting entries at the same position in CHANGELOG.md.
The reason will be displayed to describe this comment to others. Learn more.
I tried this from the contributor side rather than the Gradle side, on the PR head, with a few real and a few deliberately broken fragments. Everything below is observed behavior.
What worked:
A valid fragment under new-features/ passes checkChangelogFragments; a second run is UP-TO-DATE.
Nine broken fragments at once (missing NN-, uppercase, three-digit priority, empty file, leading - , .txt, unknown section directory, nested directory, file at the top level) are all reported in a single run, so a contributor fixes them in one pass.
mergeChangelogFragments into Unreleased: entries land after the last entry of their section and before the link reference definitions, 50- sorts before 99-, a two-paragraph fragment is rendered as a proper list item with the continuation indented, and the fragments and their directories are removed. Running it again with no fragments is a no-op.
--release-version=1.8.0 creates the missing ### Highlights subsection in the right place; --release-version=9.9.9 fails with Section '## [9.9.9]' not found and leaves the fragments and CHANGELOG.md untouched.
With a read-only section directory the task fails before writing anything (Cannot delete changelog fragments, nothing was changed), as the README says.
:polaris-build-logic:test and integrationTest pass locally.
Two small things from the contributor's point of view, neither blocking:
Open PRs that already edited CHANGELOG.md directly (mine included) will keep merging their entries into the file after this lands, and nothing flags that. A line in the PR description or README asking authors of in-flight PRs to move their entry to a fragment would help; a CI check that the Unreleased section is unchanged in a PR could follow later.
Minor messages: a nested directory inside a section is reported as "file name must match NN-short-title.md", which sent me looking at the wrong thing; and the errors print absolute paths where paths relative to the project root would read better in CI logs.
The reason will be displayed to describe this comment to others. Learn more.
nit: a directory inside a section hits this branch and is reported as a bad file name. A separate message such as "must be a file" would point the contributor at the actual problem.
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: mention what authors of already-open PRs should do (move the CHANGELOG.md entry into a fragment when rebasing), since nothing in check catches a direct edit to the Unreleased section.
The reason will be displayed to describe this comment to others. Learn more.
I think that belongs on the dev@ mailing list and requires some discipline from reviewers to ask for that. It's temporary, so likely not worth to be added here.
The reason will be displayed to describe this comment to others. Learn more.
Gradle needs both inputs and outputs for its "up-to-date" (and build-cache) mechanisms to work.
In this case, only the inputs matter for freshness - the output is a technical necessity.
The reason will be displayed to describe this comment to others. Learn more.
That's a good point.
If we'd want to depend on this CheckChangelogFragmentsTask in other tasks, the better option would be to construct some value that depends on the input files and their contents. I don't see a need for that now, but it's maybe worth a comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice work. The merge is validate-first and atomic, the recovery message is clear, and the TestKit coverage of merge→patchChangelog and the RC path is reassuring. I checked the RC>0 flow: the tag is created at HEAD after the fragment merge commit, so release-3/4 see the merged changelog.
A few things outside the diff lines:
Syncing main after a release is manual. If the propagation PR misses a consumed fragment, the next release repeats that entry and nothing catches it. Could checkChangelogFragments flag a fragment whose text already appears in a released section? If not, can we add an explicit checklist step to the release guides?
Can we add a unit test shaped like the real ### Highlights section (first item right under the heading, blank lines between items)? That would pin down where appended entries land.
Can the PR title get a Conventional Commits prefix (build:)? And can the description link the dev-list follow-up saying the narrowed rule from #5733 wasn't enough?
🤖 AI-generated review comment — agents make mistakes, so please verify before acting on it.
The reason will be displayed to describe this comment to others. Learn more.
This scans the real filesystem, so anything that isn't README.md counts as an error. Git ignores *.DS_Store, but if someone opens changelog.d/ in Finder, ./gradlew check fails locally with 'unknown section' over a file they can't even see in git status. Line 76 has the same problem inside a section dir. Can we skip dotfiles in both places?
🤖 AI-generated review comment — agents make mistakes, so please verify before acting on it.
The reason will be displayed to describe this comment to others. Learn more.
Gradle needs both inputs and outputs for its "up-to-date" (and build-cache) mechanisms to work.
In this case, only the inputs matter for freshness - the output is a technical necessity.
The reason will be displayed to describe this comment to others. Learn more.
That's a good point.
If we'd want to depend on this CheckChangelogFragmentsTask in other tasks, the better option would be to construct some value that depends on the input files and their contents. I don't see a need for that now, but it's maybe worth a comment.
The reason will be displayed to describe this comment to others. Learn more.
I think that belongs on the dev@ mailing list and requires some discipline from reviewers to ask for that. It's temporary, so likely not worth to be added here.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The CI filter skips changelog tests for catalog-only dependency updates, and the release guides need clearer link-propagation instructions to prevent subsequent validation failures.
Trigger changelog tests when the versions catalog changes
.github/workflows/ci.yml:114
Please check whether gradle/baselibs.versions.toml should also trigger this test job. build-logic/settings.gradle.kts imports that catalog and the new suites use its test dependencies, but a catalog-only pull request skips this job. Include the catalog in this filter so dependency upgrades exercise the changelog tests before merging.
The reason will be displayed to describe this comment to others. Learn more.
Could we qualify these instructions for the current release arrangement? A fragment may have been edited on main since branching, and a future maintenance release may consume a fragment that main still needs for its next release. Likewise, propagating an older maintenance release must not reset main's [Unreleased] comparison base.
Maybe replace this paragraph with the following, and add the same qualification to the semi-automated guide:
Suggested change
The PR also deletes the changelog fragments that the release consumed from `changelog.d`. Only
delete those fragments: fragments added to `main` after the release branch was created belong to
the next release.
These propagation steps assume a release cut from `main`, rather than an independently maintained
release line. Delete only fragments whose entries have moved into the release section on `main`;
preserve fragments added after branching, and reconcile any fragments edited on `main` since then.
For an independent maintenance release, review propagation separately: consuming a fragment there
does not mean that `main` no longer needs it. Preserve notes still needed for `main`'s next release,
and do not replace its `[Unreleased]` comparison base with an older maintenance release.
CHANGELOG.md is no longer edited directly since apache#5967. Revert the
entries added to it and add them as a fragment instead, with a new
Deprecations entry for updateEntitiesPropertiesIfNotChanged.
visit2rahul
added a commit
to visit2rahul/polaris
that referenced
this pull request
Nov 19, 2026
apache#5967 replaced direct CHANGELOG.md edits with fragment
files under changelog.d/, to avoid merge conflicts between unrelated
PRs editing the same section. Moves our entry there unchanged.
Per adutra's note on this PR.
visit2rahul
added a commit
to visit2rahul/polaris
that referenced
this pull request
Nov 19, 2026
apache#5967 replaced direct CHANGELOG.md edits with fragment
files under changelog.d/, to avoid merge conflicts between unrelated
PRs editing the same section. Moves our entry there unchanged.
Per adutra's note on this PR.
iprithv
added a commit
to iprithv/polaris
that referenced
this pull request
Nov 19, 2026
Move the Unreleased CHANGELOG entry into changelog.d after the apache#5967
fragment workflow. Keep stsEndpoint from main as its own constructor
argument so named storageName tests compile against the 8-arg DPO.
Signed-off-by: Prithvi S <[email protected]>
qlong
added a commit
to qlong/polaris
that referenced
this pull request
Nov 23, 2026
CHANGELOG.md is no longer edited directly since apache#5967. Revert the
entries added to it and add them as a fragment instead, with a new
Deprecations entry for updateEntitiesPropertiesIfNotChanged.
iprithv
added a commit
to iprithv/polaris
that referenced
this pull request
Nov 27, 2026
Inject the application Clock instead of System.currentTimeMillis for
soft-delete and expire. The new SPI takes Instant; persistence still
stores epoch millis on dropTimestamp / toPurgeTimestamp.
Move the release note into changelog.d after apache#5967.
Signed-off-by: Prithvi S <[email protected]>
sririshindra
added a commit
to sririshindra/polaris
that referenced
this pull request
Nov 28, 2026
…dentials
Changelog entries now go in changelog.d fragments (apache#5967), so this PR's
entries move from CHANGELOG.md to changelog.d/gcp-storage-name-credentials.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Almost every user-facing PR adds an entry under
## [Unreleased]inCHANGELOG.md, so those PRs regularly conflict with each other even though there is no logical conflict. #5733 narrowed when an entry is needed, but as discussed on the dev list the contention remained.PRs now add their entries as small files under
changelog.d/, and the release merges them intoCHANGELOG.md.Instead of editing
CHANGELOG.md, addchangelog.d/<short-title>.md: a miniature changelog with one### <section>heading per part of the changelog, each followed by list items. Example:Notes:
mainis manual and assumes a release cut frommain. Maintenance lines need separate review.[Unreleased]directly. Reviewers should watch for it.