cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
Introduce args in releasechangelog script
What type of PR is this? /kind refactor
What this PR does / why we need it:
The releasechangelog.sh script now uses arguments instead of relying on the right variables being set out side the script.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):
Fixes #3405
Special notes for your reviewer:
The PREVIOUS_VERSION
arg is not set in the Makefile
, as of now it ends up being parsed as -o
. I need help in order to get the previous version and pass it or set a default value, but I don't think it's doable cause of the call to gh api.
Checklist:
- [X] squashed commits
- [X] includes documentation
- [ ] adds unit tests
- [ ] adds or updates e2e tests
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: rvacaru / name: Razvan Vacaru (59a63d211944d299062157603d0ba9c5b3765cc3)
Welcome @rvacaru!
It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. 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-sigs/cluster-api-provider-aws 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:
@rvacaru: This issue is currently awaiting triage.
If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
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.
Hi @rvacaru. Thanks for your PR.
I'm waiting for a kubernetes-sigs 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:
To complete the pull request process, please assign richardcase after the PR has been reviewed.
You can assign the PR to them by writing /assign @richardcase
in a comment when ready.
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
@rvacaru Could you please sign the CLA and try again?
/easycla
/easycla
/ok-to-test
@Ankitasw @dlipovetsky what can I do to progress with this pr? The only open point is how to get the previous version or maybe just remove it for the time being.
The script was using the same variable names with Makefile before and I changed them because they were getting overridden: https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/3388
Can you confirm that this issue does not get reintroduced?
@rvacaru hi 😊 would you like to continue with this pr?
@Skarlso sure I can check for the regression @sedefsavas is mentioning
Awesome! Thank you! :)
@rvacaru any progress with this?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
@sedefsavas @Skarlso
I've renamed all the getops arguments in the release changelog script, so they won't be shadowed/overridden with the ones in Makefile. I managed to test the sh script myself(instead of running $GH
I simply echo the same line for sake of testing), this is the output:
$ ./hack/releasechangelog.sh -v 1.0 -p 0.0 -o test-org-capa-name -r test-repo-name -c ctrl-img-name
# Release notes for Cluster API Provider AWS (CAPA) 1.0
[Documentation](https://cluster-api-aws.sigs.k8s.io/)
# Changelog since 0.0
GH api repos/test-org-capa-name/test-repo-name/releases/generate-notes -F tag_name=1.0 -F previous_tag_name=0.0 --jq '.body'
**The image for this release is**: registry.k8s.io/cluster-api-aws/cluster-api-aws-controller:1.0
Thanks to all our contributors!
If I test it with make release-changelog
, by hardcoding the PREVIOUS_VERSION
and VERSION
in Makefile since I don't know where they come from or how to generate them, then the CHANGELOG.md looks like this:
# Release notes for Cluster API Provider AWS (CAPA) 1.1.0
[Documentation](https://cluster-api-aws.sigs.k8s.io/)
# Changelog since 0.0.12
GH api repos/kubernetes-sigs/cluster-api-provider-aws/releases/generate-notes -F tag_name=1.1.0 -F previous_tag_name=0.0.12 --jq '.body'
**The image for this release is**: registry.k8s.io/cluster-api-aws/cluster-api-aws-controller:1.1.0
Thanks to all our contributors!
Could you explain how the two versions are initialized in the Makefile?
The linting error about //nolint: logrlint
in pull-cluster-api-provider-aws-test
is not introduced in this PR, but there's already the fix for it here: https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/3920
/remove-lifecycle rotten
/assign
@rvacaru Right, so that error will go away once this is merged and you rebase.
If you don't want to wait, just remove that no:lint
marker. It should be okay now to remove it.
Please rebase your PR.
rebased this PR branch on top of main, what else is missing?
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Skarlso
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Skarlso]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment