Repository navigation
Update version to 59.2.0, update changelog generation to git-cliff - #10451
Conversation
|
@alamb we could try test this out for upcoming release? 👀 I haven't updated the release instructions, but it would essentially cut out the need for running existing update changelog script and the label issues script too Edit: if we do wanna use this for 59.2.0 release I can go in and label a few more PRs to get a better changelog |
|
Yes, I would love to try this out. I personally think the github changelog generator is quite long in the tooth and I would welcome this change. |
|
Another potential option would be to port the datafusion generate-changelog script: https://github.com/apache/datafusion/blob/main/dev/release/generate-changelog.py However I think it would be good to try another tool and see how it goes |
|
Regarding the changelog file, do we prefer keeping this approach of having latest changelog in
Though one thing to keep in mind is having a single big
I think |
Yeah, the total changelog for arrow-rs is now pretty large (there is lots of good stuff in there https://github.com/apache/arrow-rs/blob/main/CHANGELOG-old.md) |
|
I did a quick test where I imitated a 58.5.0 release, and it seems to generate changelog fine
So looks like the |
| Now prepare a PR to update `CHANGELOG.md` and versions on `main` to reflect the planned release. | ||
|
|
||
| Do this in the root of this repository. For example [#2323](https://github.com/apache/arrow-rs/pull/2323) | ||
| First copy the contents of `CHANGELOG.md` into `CHANGELOG-old.md`. |
There was a problem hiding this comment.
I noticed we never had an explicit step for this? I don't think our existing changelog script did this either
Out of curiosity, how long on average does it take to run the DataFusion version? (Though DataFusion does have more commits per release, at least for major ones) @alamb |
|
I am starting to test this out for the 59.2.0 release. As long as I am able to replicate the results my plan is to update + merge this PR |
| {% for group, commits in commits | group_by(attribute="group") %} | ||
| ### {{ group | striptags | trim | upper_first }} | ||
| {%- for commit in commits %} | ||
| - {% if commit.remote.pr_title %}{{ commit.remote.pr_title | trim }}{% else %}{{ commit.message | split(pat="\n") | first | upper_first | trim }}{% endif %}\ |
There was a problem hiding this comment.
I changed this to use remote.pr_title first and then fall back to commit message.
|
Ok, we are good - see #9880 (comment) |
|
Thanks again @Jefffrey -- git-cliff is great |
since we're using git cliff now, cleaning up this unused file reference: - #10451
…0581) since we're using git cliff now, cleaning up this unused file reference: - apache#10451
# Which issue does this PR close? <!-- It is not necessary to raise an issue, but it is encouraged if it is a non-trivial enhancement/bug. If this PR relates to an existing issue, but does not fully resolve it, please change the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of #NNN" to avoid false closing an issue. --> - Closes apache#10529 # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Please try to explain the problem you are trying to solve in terms of the user-visible behavior, rather than the implementation. --> From issue: > Our changelog generation relies on categorizing included PRs by their labels, see: > > - apache#10451 > > That means we should ensure PRs merged to main have labels such as `bug`, `enhancement`, `performance`, `security`, `development-process`, etc. > > Whenever we create issues they usually get tagged as either bug or enhancement based on the template, so if a PR is created and links to the issue (`Closes apache#123`) then it would be good to be able to copy the labels from the issue to the PR so maintainers don't need to manually do this for every PR. > > Looks like this project might accomplish this: https://github.com/michalvankodev/copy-issue-labels > > Look into introducing this (and ensuring it does what we need). # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Instead of pulling in another action, just achieve it simply with actions github script. This implementation was drafted by codex and iterated to get the simplest form, then I did some further editing of the code. New workflow that runs only on PR open, and if PR closes an issue (just linking it doesnt trigger this) then it fetches labels from that issue, and if is one of the 4 whitelisted labels copies it onto the PR # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests, if so identify these tests)? If this PR claims a performance improvement, please include evidence such as benchmark results. DO NOT simply paste a list of commands ran to verify the code; this is what our CI is for and it pollutes the PR. ONLY explain if testing was included with this PR, or why it wasn't. --> Tested in my fork: - Jefffrey#2 - Jefffrey#4 - Jefffrey#6 - Jefffrey#7 - Jefffrey#8 - Jefffrey#9 - Jefffrey#10 # Are there any significant user-facing changes? <!-- Significant user-facing changes include: - Breaking public API change - Significant change to existing functionality (e.g. function returns something different) These need to be explicitly called out to ensure we have proper documentation if required and to ensure we follow proper semantic versioning. DO NOT restate the changes of this PR; if a bug was fixed and already explained above, we don't need this to be restated as a user-facing change. --> Just dev process changes
Note (from @alamb): This PR contains both:
git-cliffrather than changelog_generatorgit-cliffwas a much nicer experience than the changelog generator (specifically it ran much faster)59.2.0(July 2026) #9879Testing out git-cliff for generating our changelogs. In this PR I've included the config file, as well as an example changelog for upcoming 59.2.0 release.
To install
git-cliffcan either cargo install or do via brewThen we need to ensure we have the tags locally:
# If remote for the apache remote is named differently ensure swap to the name here git fetch origin --tagsgit-cliffoperates via checking the commits since latest tag, so if we don't locally have the tags it'll generate a changelog since the start of time 🙂Then run command:
GITHUB_TOKENenvironment variable, or can add to command via--github-token59.2.0(we change this for each release), into a separate fileThen can see what the generated changelog is like in this PR.
git-cliffalso supports prepending onto an existing changelog, in which case it removes the header (specified in the config), prepends new body, then re-adds the header:--outputand--prependso long as they don't point to the same fileOn categorization
git-clifflooks only at PRs; it ignores issues. I prefer this approach as it makes it more clear which code we actually shipped. There was also an issue with our previous approach in thatgithub-changelog-generatordidn't ignore issues closed as not planned/duplicate which can add noise to the changelog. By focusing only on PRs we don't need to worry about this, and we also don't need to bother labeling issues from their PRs anymore.However, we need to ensure our PRs have good labeling. This can come from maintainers adding labels, or having workflows to do some of this automation. For example we could:
development-processto PRs that only touch benches/testsFor now I've been going around to some PRs and adding labels to get some better categorization in this example.
Speed
Oh also its blazing fast 😃 (well compared to old approach)
Further work
Need to update release instructions if going with this approach; also want to test out patch releases (aka test when we're not generating for commits off main)