Skip to content
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

Automate Go patch version bumps #11224

Open
sbueringer opened this issue Sep 25, 2024 · 10 comments · May be fixed by #11237
Open

Automate Go patch version bumps #11224

sbueringer opened this issue Sep 25, 2024 · 10 comments · May be fixed by #11237
Assignees
Labels
area/ci Issues or PRs related to ci help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sbueringer
Copy link
Member

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: #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

@k8s-ci-robot
Copy link
Contributor

@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:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

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:

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: #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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added area/ci Issues or PRs related to ci help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 25, 2024
@sbueringer
Copy link
Member Author

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. labels Sep 25, 2024
@sbueringer
Copy link
Member Author

sbueringer commented Sep 25, 2024

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

@pravarag
Copy link
Contributor

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

@sbueringer
Copy link
Member Author

Sure!

/assign @pravarag

@pravarag
Copy link
Contributor

@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 pravarag linked a pull request Sep 29, 2024 that will close this issue
@pravarag
Copy link
Contributor

Opened a WIP PR here: #11237 as I still need to test the code, will update accordingly.

@pravarag
Copy link
Contributor

pravarag commented Oct 5, 2024

@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
Copy link
Member Author

I would do the following on my CAPI fork:

  • get the action on the default branch (either merge it into main or change the default branch)
  • downgrade the go version on the default branch
  • => trigger the action to see if it generates the Go bump PR correctly

@pravarag
Copy link
Contributor

pravarag commented Nov 4, 2024

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: #11237 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to ci help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants