Chart: Include changelog in GitHub releases.
What this PR does / why we need it:
This turns on release notes via the chart-releaser-action GitHub Action in the helm.yaml workflow, so that releases on this page have the merged PRs in the release notes by default: https://github.com/kubernetes/ingress-nginx/releases
This will make it easier for things like RenovateBot and dependabot or other gitops solutions to show the changes in PRs when auto-updating to new versions.
The feature, --generate-release-notes via the cr command (also exposed as env var $CR_GENERATE_RELEASE_NOTES) is described in the helm/chart-releaser README as:
Whether to automatically generate the name and body for this release. See https://docs.github.com/en/rest/releases/releases
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] CVE Report (Scanner found CVE and adding report)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only
Which issue/s this PR fixes
Fixes https://github.com/kubernetes/ingress-nginx/issues/10599
How Has This Been Tested?
Yes, it's in use as part of the workflow for nextcloud/helm here: https://github.com/nextcloud/helm/blob/8cb6585289f1fd9533233f44e6b2fb01dd85b82f/.github/workflows/release.yaml#L43
Which generates a "What's Changed" section for each release that you can see an example of here: https://github.com/nextcloud/helm/releases
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [ ] I have added unit and/or e2e tests to cover my changes.
- [ ] All new and existing tests passed.
Deploy Preview for kubernetes-ingress-nginx ready!
| Name | Link |
|---|---|
| Latest commit | fa1b0587672479f54030799374da82406d8e2146 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/656b56240c9153000820ea8a |
| Deploy Preview | https://deploy-preview-10718--kubernetes-ingress-nginx.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Welcome @jessebot!
It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes/ingress-nginx has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @jessebot. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: jessebot Once this PR has been reviewed and has the lgtm label, please assign puerco for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
An example of a RenovateBot PR for ingress-nginx, so you can see the release notes section: https://github.com/small-hack/argocd-apps/pull/404
An example of a RenovateBot PR for nextcloud/helm, where this feature is turned on: https://github.com/small-hack/argocd-apps/pull/52
Also, thank you to reviewers and community members that make ingress-nginx go 💙
Hey! Thanks a lot for that contribution! As you might have seen, I already was thinking about changing this action, but actually I didn't find the time to do so, yet. So also thanks for saving me some time! I didn't expect this to be a simple flag. :)
I'll now take a look at the change, it's docs & implication and the results & examples you posted. Your change is basically related to the Helm chart only, but as the GitHub actions file isn't part of that, I might only be able to give a review.
/assign
So I just dug a bit into the chart-releaser docs and took a look at the generated changelogs in your example.
The generated changelogs basically look fine, but ingress-nginx has defined a Go template for the controller in changelog/controller.md.gotmpl and one for the chart in charts/ingress-nginx/changelog/helm-chart.md.gotmpl. The latter might be of interest for you.
Could we also just make use of the --release-notes-file flag or, probably better for this use case, the according CR_RELEAE_NOTES_FILE environment variable?
This part of the magesfiles is responsible for creating the release notes. So all we need to do is passing the path of the according changelog file generated by this code to the CR_RELEAE_NOTES_FILE environment variable.
What do you think?
CR_RELEAE_NOTES_FILE seems like it would work fine :) Let me make a suggestion and we can poke at it. 👍 Also thanks for your quick reply and additional details! 🙏
The release notes are generated as part of the PR for a helm chart release. PRs from contributors should be incrementing the chart version, an issue we need to fix.
We're discussing with @Gacko the background of the release process and how to improve it for the helm chart.
This PR in particular is more in the direction of having the release notes we are generating with mage in the GitHub release description, too, and not only in the chart/ingress-nginx/changelog directory.
Well, good to know. Thanks for the clarification, definitely want that.
/priority backlog /kind feature /triage accepted
/hold
@jessebot have you been able to resolve all of @Gacko asks?
/retitle Chart: Include changelog in GitHub releases.