kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.59k stars 1.32k forks source link

Automate Go patch version bumps #11224

Open sbueringer opened 2 months ago

sbueringer commented 2 months ago

I think it would be nice if we could automate Go patch version bumps on the main branch via a GitHub action.

Usually our Go patch version bump PR look like this: https://github.com/kubernetes-sigs/cluster-api/pull/11156

I would suggest to first get rid of the additional occurence of the Go version in the Tiltfile and then automate the bump for the Go version in the Makefile

The idea is roughly:

Example for an action that opens PRs: https://github.com/kubernetes-sigs/controller-tools/blob/main/.github/workflows/tools-releases.yml

/help /area ci /kind feature

k8s-ci-robot commented 2 months ago

@sbueringer: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/11224): >I think it would be nice if we could automate Go patch version bumps on the main branch via a GitHub action. > >Usually our Go patch version bump PR look like this: https://github.com/kubernetes-sigs/cluster-api/pull/11156 > >I would suggest to first get rid of the additional occurence of the Go version in the Tiltfile and then automate the bump for the Go version in the Makefile > >The idea is roughly: >* Add a weekly periodic GitHub action that: > * checks if there is a new go patch version available for the minor verison we use > * if yes, open a PR to bump that version > >Example for an action that opens PRs: https://github.com/kubernetes-sigs/controller-tools/blob/main/.github/workflows/tools-releases.yml > >/help >/area ci >/kind feature Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
sbueringer commented 2 months ago

/triage accepted /priority backlog

sbueringer commented 2 months ago

It's worth checking if dependabot can do this (but I think it can't)

pravarag commented 2 months ago

@sbueringer , would it be okay if I take a look at this unless someone has already started working?

sbueringer commented 2 months ago

Sure!

/assign @pravarag

pravarag commented 2 months ago

@sbueringer, I've started implementing as per the below suggestion:

The idea is roughly:

Add a weekly periodic GitHub action that:
    checks if there is a new go patch version available for the minor verison we use
    if yes, open a PR to bump that version

I'll share the updates very soon.

pravarag commented 1 month ago

Opened a WIP PR here: https://github.com/kubernetes-sigs/cluster-api/pull/11237 as I still need to test the code, will update accordingly.

pravarag commented 1 month ago

@sbueringer , I'm looking for a way to test the changes. If I run the GH workflow normally, would that be enough or there is some different process I can use. Please let me know :)

sbueringer commented 1 month ago

I would do the following on my CAPI fork:

pravarag commented 3 weeks ago

Hi @sbueringer , apologies on delaying this change from my side. After making some smaller changes and testing, the PR is now ready for review. I've added more details related to the tests done here: https://github.com/kubernetes-sigs/cluster-api/pull/11237#issuecomment-2455405036

Kindly let me know if there are any further changes to be made.