Skip to content

Programmatic Changelog Checking, Github #10381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nfuden opened this issue Nov 26, 2024 · 10 comments · Fixed by #11204 · May be fixed by #11242
Open

Programmatic Changelog Checking, Github #10381

nfuden opened this issue Nov 26, 2024 · 10 comments · Fixed by #11204 · May be fixed by #11242
Assignees
Labels
Area: CI/CD Prioritized Indicating issue prioritized to be worked on in RFE stream sdlc Type: Tech Debt

Comments

@nfuden
Copy link
Contributor

nfuden commented Nov 26, 2024

Do you have a suggestion for code improvement or tracking existing technical debt? Please describe.

Changleog validation is a nice to have. Ideally its something that can be inspected and dealt with in github itself.

Describe the solution you'd like

Implement a changelog check in github actions.
ideally something like this that checks if there is a correct semver scoped issue for the branch in question

Additional Context

previously pre donation solo-io had a bot that would handle these events

Note that this is both part of #10363 and #10217

@nfuden nfuden added Type: Tech Debt Area: CI/CD Prioritized Indicating issue prioritized to be worked on in RFE stream labels Nov 26, 2024
@yuval-k
Copy link
Contributor

yuval-k commented Dec 2, 2024

If the bot is not involved fixing the changelog folder, ideally we shouldn't require a folder. maybe take an approach like in istio, where all release notes go in one folder?
or Envoy, where post-release the changelogs are organized into folders?

@nfuden
Copy link
Contributor Author

nfuden commented Dec 2, 2024

I really dont like the envoy strategy.
The fact that the last commit to a changelog is always the "rename" one makes git blame alot more painful.

That being said would be interested to chat more on the desired format.

@yuval-k
Copy link
Contributor

yuval-k commented Dec 2, 2024

we discussed in slack but to summarize here - i don't care about the format; but rather the devex of moving the changloge file to the right folder mid-PR

bleggett pushed a commit to bleggett/gloo that referenced this issue Dec 2, 2024
@ashishb-solo
Copy link
Contributor

ashishb-solo commented Dec 2, 2024

@nfuden git blame has an --ignore-rev flag that can ignore certain commits when blaming a file. I'm not sure how well it works if the file was renamed though. It's mostly used for ignoring commits that reformat files or whitespace changes, etc.

@nfuden
Copy link
Contributor Author

nfuden commented Dec 2, 2024

Yeah but I like the basic vscode integration for lens

@ilrudie
Copy link
Contributor

ilrudie commented Dec 3, 2024

+1 to @yuval-k's comment. Having to move the changelog entry around mid-pr is not great. If we get a chance to begin again I'd definitely like to go with something that avoids having to deal with those moves.

@timflannagan
Copy link
Member

I threw up a WIP enhancement for adopt k/k's style of changelog mangement: #10381. There are other alternatives to explore, but this felt like a reasonable balance.

@lgadban
Copy link
Contributor

lgadban commented Feb 21, 2025

For the initial 2.0.0 release, we will rely on handcrafted release notes and look to implement the automated approach post-release

@lgadban lgadban changed the title Programmtic Changelog Checking, Github Programmatic Changelog Checking, Github Feb 21, 2025
@lgadban lgadban moved this from Planned to Backlog in Kgateway Planning Feb 21, 2025
@lgadban lgadban added the sdlc label May 15, 2025
@timflannagan
Copy link
Member

Have this working in my fork:

  • Add https://github.com/kgateway-dev/changelog-generator/ as a tool dependency
  • Calculate the start and end SHA needed for the changelog generator to run properly
    • Search for any merged PRs that have the release-note label, for each PR extract the release note and bucket into a map, aggregate all the bucketed release notes into formatted markdown output
  • Update the .goreleaser.yaml configuration to conditionally enable the "changelog" stanza via an env var
  • Update the release workflow to add a "changelog" job which is responsible for setting the goreleaser env var, calculating the starting and end SHA values, and writing the generator changelog to a file that will be consumed by goreleaser

We don't immediately need this unless we want to cut a beta anytime soon. I'll at least upstream my fork's branch and we can decide there.

@timflannagan timflannagan linked a pull request May 19, 2025 that will close this issue
@timflannagan
Copy link
Member

timflannagan commented May 21, 2025

The #11242 hooks up the changelog generator to the release workflow. I tested this works in my fork by cutting a v2.1.0-beta1 tag and validating that any merged PR with the "release-note" label between the v2.0.0 tag and the current HEAD of main was present in the GH release.

Remaining work:

  • Fix Respect the start and end sha inputs changelog-generator#7 which is highly relevant to patch releases due to a limitation with the GH search API (cannot query per-branch)
  • Evaluate whether the pr-kind-labeler should be a custom GHA vs. a tool dependency (the latter would be consistent with the approach taken for integrating the changelog generator into the repo)
    • If custom action: pin the action to a specific commit. Right now, it pulls from the latest commit on the pr-kind-labeler main branch
  • Backfill any merged PRs that need release notes before the new workflow was onboarded to the repository
  • Backport this mechanism to the v2.0.x release so net new patch releases can have custom release notes
  • Update the org-wide .github/PULL_REQUEST_TEMPLATE.md to match the current state of the pr-kind-labeler implementation. Remove any embedded templates from repositories that follow this changelog format (including this one)

@timflannagan timflannagan added this to the Release Improvements milestone May 21, 2025
@timflannagan timflannagan linked a pull request May 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI/CD Prioritized Indicating issue prioritized to be worked on in RFE stream sdlc Type: Tech Debt
Projects
Status: Backlog
Status: No status
6 participants