Repository navigation
Copy the entries that are already in CHANGELOG.md when generating the changelog of a release - #134278
Merged
Merged
Conversation
`changelog.py` requests from GitHub every pull request merged in the date range of a release, and then the author of every entry it writes. For `v26.11.1.2942-stable` these were 5341 and 2601 requests against the limit of 5000 per hour of the token: the script slept for 56 minutes until the limit was reset, and the `Create Release` job ran out of its two hours before the Docker images were built: https://github.com/ClickHouse/ClickHouse/actions/runs/45450531725/job/138675365339 Most of these pull requests already have an edited entry in `CHANGELOG.md` on master. With the new option `--reuse-entries-from`, a pull request that has an entry in the given file is not requested from GitHub, neither the pull request nor its author: the entry is copied as it is, under its category. The release job passes `CHANGELOG.md` of `origin/master`. Without the option the script works as before, which is what the nightly changelog job needs: it generates the raw entries of the pull requests that are not in `CHANGELOG.md` yet. An entry of a pull request is a bullet that attributes it, `[#N](.../pull/N) ([Author](...))`, the same definition as in `ci/jobs/changelog_nightly.py`. A link without the author is a mention in the text of another entry. A bullet that attributes several pull requests is written once. The search finds the pull requests by the date of the merge, which covers more than the release, so an entry is copied only if git has the merge commit of the pull request (`Merge pull request #N from ...`) on the first-parent history of the changelog interval. For a backport, whose branch is in the same subject, the entry of the original pull request is copied with the `Backported in` prefix. All other pull requests are requested as before. On `v26.11.1.2942-stable`, 1796 of the 5313 pull requests are copied, and all of them are in the changelog the failed job generated. About 4400 requests remain instead of about 8000. Closes: #134276 Co-Authored-By: Claude Fable 5.2 <[email protected]>
Contributor
|
Workflow [PR], commit [182f7fd] Summary: ✅ AI ReviewSummaryReviewed PR #134278 at The new Final VerdictStatus: ✅ Approve |
alexey-milovidov
left a comment
Member
Author
There was a problem hiding this comment.
This looks good.
Two cases where a copied bullet was wrong, from the review of #134278: - A bullet merged from several entries was copied for any of its pull requests. The bullet of #121325 (`cctz` 2026d) and #124249 (2026e) would be copied for the backport of the former into `v26.9.3.38-stable` and announce the latter, which is not in that release. - A pull request with an entry in two releases got both of them: #124907 is under `Performance Improvement` in 26.11 and under `New Feature` in 26.10, with different wording. The bullets and the pull requests they attribute now make groups, connected by the attributions. The bullets of a group are copied only if they are all in one release and every pull request of the group is merged in the changelog interval; for a backport, the group has to be the original pull request alone. All other pull requests are requested from GitHub as before. On `v26.11.1.2942-stable` this leaves 1789 of the 5313 pull requests copied instead of 1796. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Closes: #134276
The
Create Releasejob ofv26.11.1.2942-stablefailed: https://github.com/ClickHouse/ClickHouse/actions/runs/45450531725/job/138675365339ci/tools/changelog.pyrequests from GitHub every pull request merged in the date range of a release, and then the author of every entry it writes. For this release these were 5341 and 2601 requests against the limit of 5000 per hour of the token. The script slept for 56 minutes until the limit was reset, and the job ran out of its two hours before the Docker images were built.Most of these pull requests already have an edited entry in
CHANGELOG.mdonmaster(the nightlyPrepare changelogjob maintains it). With the new option--reuse-entries-from, a pull request that has an entry in the given file is not requested from GitHub, neither the pull request nor its author: the entry is copied as it is, under its category. The release job passesCHANGELOG.mdoforigin/master. Without the option the script works as before, so the nightly changelog job is not affected.[#N](.../pull/N) ([Author](...)), the same definition as inci/jobs/changelog_nightly.py. A link without the author is a mention in the text of another entry.Merge pull request #N from ...) on the first-parent history of the changelog interval.Backported inprefix.The changelog of a release under
docs/changelogsnow has the edited text and category ofCHANGELOG.mdfor these pull requests instead of the text from the pull request description.Checked on
v26.11.1.2942-stable(replayed with the pull requests from the log of the failed job): 1789 of the 5313 pull requests are copied, and all of them are in the changelog that job generated. About 4400 requests remain instead of about 8000. Checked against GitHub onv26.10.12.13-stable: without the option the output is identical to the committed changelog, with it 5 of the 12 backports are copied and the requests go from 52 to 37.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The changelog of a release copies the entries that are already in
CHANGELOG.mdinstead of requesting those pull requests from GitHub.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/134278]
Version info
26.12.1.444-master(included in26.12and later)