client_golang icon indicating copy to clipboard operation
client_golang copied to clipboard

Changelog automation

Open ArthurSens opened this issue 1 year ago • 9 comments

On every new release, we need to provide a list of changes that made it into the release. This log of changes is maintained in the CHANGELOG.md file.

Updating the Changelog file requires manual effort from maintainers, it demands searching through commit history, analyzing which PRs had user-facing changes, and which PRs hadn't, writing clear messages describing the change, etc.

This whole process could receive some improvements through automation.


This issue concerns researching, proposing, and implementing the Changelog automation for client_golang. The final goal is not to require manual effort from maintainers to go through a big list of commits and hand-picking changelog entries.


Related:

https://github.com/googleapis/release-please

xref: https://github.com/cncf/mentoring/pull/1120

ArthurSens avatar Jan 17 '24 22:01 ArthurSens

Hi @ArthurSens. I would love to solve this issue for the upcoming LFX program.

pawarpranav83 avatar Jan 18 '24 03:01 pawarpranav83

Hey @ArthurSens, I am quite interested in working upon this issue in the LFX program.

kartikaysaxena avatar Jan 18 '24 08:01 kartikaysaxena

Hey @ArthurSens, we could use GitHub's Automatic release notes generation feature itself, though we would have to assign labels to PRs and define a yaml file accordingly.

Or do you have any other approach in mind?

pawarpranav83 avatar Jan 18 '24 10:01 pawarpranav83

Hey folks, thanks for the interest :)

Applications will be done through LFX mentoring website, so we'll have to wait for the official timeline to start working deeply on the proposal. This task alone is also quite small for the LFX program (around 3 months of work), so we're still working on other kinds of automation to add to the project idea (mostly around go version upgrades).

With that said, I believe there's no problem on brainstorming high level ideas like you're doing :)


we could use GitHub's Automatic release notes generation feature itself, though we would have to assign labels to PRs and define a yaml file accordingly.

The Github's automatic release notes that I know dump the whole commit history between two releases, and that includes non-user-facing changes. Did they change anything recently that takes PR labels into consideration (and possibly a yaml file?)?

ArthurSens avatar Jan 18 '24 12:01 ArthurSens

Hey @ArthurSens maybe we can use some shell scripting to get hold of the file changes in the PR (using git diff maybe) and set up a yaml file which can contain list of important files which can have some possible user-facing-changes, and if they match it would reflect in the changelog (This may also consider PR labels into consideration such as maybe pull-request-size)

kartikaysaxena avatar Jan 18 '24 12:01 kartikaysaxena

The Github's automatic release notes that I know dump the whole commit history between two releases, and that includes non-user-facing changes. Did they change anything recently that takes PR labels into consideration (and possibly a yaml file?)?

Yes, we can create a release.yml file, in which we can specify the PRs with specific labels to exclude from release notes or we can also specify labels to include them under certain categories.

In the file, using the configuration options below, specify in YAML the pull request labels and authors you want to exclude from this release. You can also create new categories and list the pull request labels to be included in each of them.

https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

pawarpranav83 avatar Jan 18 '24 17:01 pawarpranav83

Hello @ArthurSens, Maintaining CHANGELOG.md is indeed a tedious task especially when no automation is applied. I've done some research on how to implement it in Prometheus, following is a brief:

  • First off, we currently don't enforce a standard on commit messages as well as PR's making it difficult for any tool to parse them and automate the release process. A uniform standard must be enforced, example could be <type>(<scope>): <subject>.

    • We can also enforce one commit per PR, and can squash all commits into one. This will eliminate the need to tag PR's and will make it easy for tools to identify commits which needs to be added in CHANGELOG.md as user-facing changes.
  • There are many ways available to implement this, but i'm more inclined towards using tools like Goreleaser because of the extensive features they provide, and are highly customizable.

    • Another popular tool among node projects is semantic-release and fortunately a stable version of the tool is available for go projects as well. The details needs to be well researched.
    • If we use GitHub Actions, when the workflow runs becomes a concern. workflow_dispatch trigger may be added to publish a release when we find necessary (when we have enough commits to call it a patch release).

I would appreciate any advice and further improvements on this and since this lies in my domain of knowledge, I would love to take this up in LFX'24 spring term.

dvjsharma avatar Feb 03 '24 21:02 dvjsharma

Hey @ArthurSens @kakkoyun , I have submitted my application for this project including possible implementation for the same. Will be grateful if you take a look at it as I would love to work with Prometheus in this mentorship as it strongly aligns with my interest.

kartikaysaxena avatar Feb 14 '24 23:02 kartikaysaxena

Hi everybody, I can confirm that we've received the applications :)

I understand this is of great interest to all applicants, but please keep the timeline in mind. The application results will be announced on February 27th

ArthurSens avatar Feb 15 '24 12:02 ArthurSens

Closing for now as promised, let us know if you need this to be reopened! 🤗

stale[bot] avatar Jul 19 '25 08:07 stale[bot]

Hello from the Bug Bash!

Just to sent the update, we attempted this and we learned a lot, but it's still todo.

NOTE: For further work, we might consider other approaches, common one we discussed was:

  • Conform + enforcing convential commit messages and automation
  • PR description solution (aka https://github.com/prometheus/prometheus/pull/16904)
  • Similar to what OpenTelemetry is doing with md file per PR that has to be committed

bwplotka avatar Jul 31 '25 13:07 bwplotka