Proposal: Shift changelog content generation away from releaser onto PR author #19247
Replies: 3 comments 17 replies
-
This is interesting. I am all-in on automating the release process further. My concern here is that this doesn't appear to shift a burden so much as create a new one. This requires more human work overall, and a lot of redundant files. If the content of this new file is the same as the PR title then why have the former? And if it isn't then why not? We would expect the PR description to be, er, descriptive. If it isn't sufficiently so then we should require that it is. Having two places where a change description lives seems unnecessary. Today we already know how to generate the changelog content automatically, using just the |
Beta Was this translation helpful? Give feedback.
-
I think it'd be useful to clarify how these snippets are expected to be shown: I think there's, like, four levels of "changelog":
It feels like automation is great for 1 and 2, and indeed, AIUI, Pants already has acceptable(?) automation here? Given this, maybe this is trying to target 3? That is, making a "what's new"-style section automatic/easier to write? Alternatively, is it trying to make it easier to write better text for 2? |
Beta Was this translation helpful? Give feedback.
-
We've made a step towards this with #20888 |
Beta Was this translation helpful? Give feedback.
-
Proposal
In order to help automate the release process, and shift the burden of changelog "news fragments" from the releaser onto the PR author, I propose we shift our process to have the PR which proposes a change also update the changelog.
Manually curating the changelog is a breeding ground for merge conflicts, so I suggest we leverage
towncrier
to aid us as well.Towncrier is able to generate changelog entries from in-repo "news fragments" which exist as markdown files on disk with a very short summary of the change. This essentially eliminates
changelog.py
. It is customizable enough to adapt to our current categorizations.How
PRs
src/python/pants/notes
. If the PR requires a cherrypick, the directory will be the name of the milestone (e.g.2.15.x
) otherwise the directory will bemain
. E.g. store stdout/stderr output from tests as bytes #19184 would've addedbugfix.md
tosrc/python/pants/notes/main
. OptimizeTarget
andFieldSet
operations #18917 would've addedperformance.md
tosrc/python/pants/notes/2.15.x
.main
. This PR MUST be cherry-picked, and must be picked after the original cherry-pick is merged.Branching
main
is bumped to.a0
, the directory for the feature branch is created (e.g.2.17.x
), and the relevanttowncrier
configs are added/updated.main
, which will point to the next version when they are releasedReleasing
towncrier build --config src/python/pants/notes/<branch>/towncrier.toml --version <new version> --date '<human date>'
.md
..devN
release, the only differences are:main
(We can decide after the fact if we want to keep the PR labels, or just use the fragment name. I consider that out of scope for this proposal though. The category labels will continue to be required and must match the filename.)
Beta Was this translation helpful? Give feedback.
All reactions