Prevent merge conflicts on NEXT_CHANGELOG by fragmenting it into files#5534
Open
janniklasrose wants to merge 8 commits into
Open
Prevent merge conflicts on NEXT_CHANGELOG by fragmenting it into files#5534janniklasrose wants to merge 8 commits into
janniklasrose wants to merge 8 commits into
Conversation
Collaborator
Integration test reportCommit: 3108bff
22 interesting tests: 15 SKIP, 7 KNOWN
Top 29 slowest tests (at least 2 minutes):
|
Contributors keep adding entries to the single, append-only NEXT_CHANGELOG.md, so concurrent PRs constantly conflict and force a no-op rebase plus full CI rerun. Introduce .nextchanges/<section>/<name>.md fragments instead: each PR adds its own file, so two PRs never touch the same path and never conflict. The filename is arbitrary (a feature name or PR number) and an entry is just a sentence — creatable straight from the GitHub UI; the leading bullet and a (#NNNN) reference are both optional. tools/collate_changelog.py folds the fragments into the matching NEXT_CHANGELOG.md sections at release time, leaving the release tooling (internal/genkit/tagging.py) to consume NEXT_CHANGELOG.md unchanged. The directory name matches databricks-sdk-py's .nextchanges/ for cross-repo consistency. 'task changelog-check' validates fragment placement and runs as part of 'task checks'. The bare 'cli' gitignore entry is anchored to '/cli' so it no longer ignores .nextchanges/cli/. Co-authored-by: Isaac
A manually dispatched workflow that runs tools/collate_changelog.py, expands any (#NNNN) references to links, and opens a single 'Collate changelog fragments' PR via peter-evans/create-pull-request (matching the bump-vuln-deps pattern of opening a PR rather than pushing to main). Run it and merge the PR before dispatching the 'tagging' workflow. With no fragments present the collator is a no-op, so no PR is opened. Co-authored-by: Isaac
Update the contributor-facing guidance to add a .nextchanges/<section>/<name>.md fragment instead of editing NEXT_CHANGELOG.md: each PR adds its own file so entries never conflict, the filename is arbitrary, the leading bullet and the PR link are optional, and it can be created from the GitHub UI. These are the only two docs that described the old workflow. Co-authored-by: Isaac
6d8d52d to
7707dd1
Compare
Temporary commit for review (paired with the collation commit that follows, both to be reverted). Adds 8 .nextchanges/ fragments exercising every permutation: all five sections (empty and populated), * / - / no bullet marker, no ref / (#N) / bare #N / pre-expanded link, single / multi-bullet / multi-line continuation, and PR-number vs feature-name filenames. Co-authored-by: Isaac
… after review) Temporary commit for review (revert this and the preceding 'add test changelog fragments' commit). Ran 'task changelog-collate', which folds every .nextchanges/ fragment into the matching NEXT_CHANGELOG.md section, expands (#NNNN) references to links, and removes the consumed fragment files. Co-authored-by: Isaac
janniklasrose
commented
Jun 12, 2026
Addresses review feedback: invoke 'task changelog-collate' (via go tool) instead of duplicating the collate + update_github_links steps inline, so the sequence stays defined in one place (Taskfile.yml). Swaps the uv setup for Go accordingly. Co-authored-by: Isaac
Addresses review feedback: drop the 'create from the GitHub UI' note (this skill is for agents, which don't use the UI) and clarify that NNNN in (#NNNN) is the PR number. Co-authored-by: Isaac
Contributor
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
changelog-collateandchangelog-checkTaskfile targetsWhy
Prevent common merge conflicts on the file during busy/productive times, requiring manual action to rebase.
Why not
merge=unionin .gitattributes? Easy quality of life for local, but unfortunately not supported by GitHub.Tests
.nextchanges/task changelog-collateand commit changesRollout (follow-up)
This PR is step 1: it adds
.nextchanges/and, at release time, collates the fragments into the existingNEXT_CHANGELOG.md. The release tooling (internal/genkit/tagging.py) is untouched, so this change is self-contained and low-risk.Step 2 (separate follow-up PR): retire
NEXT_CHANGELOG.md. Once.nextchanges/is in use, the intermediate file is pure overhead — entries land in it only to be copied intoCHANGELOG.md, and its## Release vX.Y.Zheader just duplicates the version the git tag already carries. The follow-up will:.nextchanges/fragments directly intoCHANGELOG.mdat release (a newdated
## Release vX.Y.Zsection) and delete the consumed fragments.NEXT_CHANGELOG.mdheader.git rm NEXT_CHANGELOG.mdand remove the now-unneededchangelog-collateworkflow/bridge, while preserving verified tag creation andrelease-build.yml.It's split out because it touches the release pipeline (
tagging.yml/tagging.py), whereas this PR only adds opt-in tooling. Contributor workflow is unchanged across both steps: drop a file in.nextchanges/.This pull request was written by Isaac, an AI coding agent.