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

✨Upgrade Golang version to v1.24.0 #4585

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dongjiang1989
Copy link

@dongjiang1989 dongjiang1989 commented Feb 28, 2025

Upgrade go version 1.23 to 1.24

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dongjiang1989
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @dongjiang1989!

It looks like this is your first PR to kubernetes-sigs/kubebuilder 🎉. 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/kubebuilder 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. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 28, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @dongjiang1989. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 28, 2025
Signed-off-by: dongjiang <[email protected]>
@camilamacedo86
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 28, 2025
.golangci.yml Outdated
- path: _test\.go|test_context.go
linters:
- revive
text: "dot-imports: should not use dot imports"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have we this change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When golangci-lint to v1.64.5, some warning

$ golangci-lint --version
golangci-lint has version v1.64.5 built with go1.24.0 from (unknown, modified: ?, mod sum: "h1:5omC86XFBKXZgCrVdUWU+WNHKd+CWCxNx717KXnzKZY=") on (unknown)
$ golangci-lint run
pkg/plugin/util/util_test.go:23:2: dot-imports: should not use dot imports (revive)
	. "github.com/onsi/ginkgo/v2"
	^
pkg/plugin/util/util_test.go:24:2: dot-imports: should not use dot imports (revive)
	. "github.com/onsi/gomega"
	^
pkg/plugin/util/suite_test.go:22:2: dot-imports: should not use dot imports (revive)
	. "github.com/onsi/ginkgo/v2"

@@ -26,7 +26,7 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.63.4
version: v1.64.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we open a PR for upgrade the lint and another for the Go
We also need check all places for the linter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @camilamacedo86
I got it
Will change it in next PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you a lot for check this one !!!!

Signed-off-by: dongjiang <[email protected]>
@dongjiang1989
Copy link
Author

dongjiang1989 commented Feb 28, 2025

@camilamacedo86 How to change golang version here?
ref: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_kubebuilder/4585/pull-kubebuilder-test/1895464276731105280

Maybe change prow image image: public.ecr.aws/docker/library/golang:1.23 to image: public.ecr.aws/docker/library/golang:1.24

@camilamacedo86
Copy link
Member

camilamacedo86 commented Feb 28, 2025

Hi @dongjiang1989

Maybe change prow image image: public.ecr.aws/docker/library/golang:1.23 to image: public.ecr.aws/docker/library/golang:1.24

We will need to update the the test-infra: http://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/kubebuilder/kubebuilder-presubmits.yaml#L14

Feel free to push a PR and ping me.
I will be happy to approve 👍

@dongjiang1989
Copy link
Author

@k8s-ci-robot
Copy link
Contributor

@dongjiang1989: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubebuilder-test 4bca6c2 link true /test pull-kubebuilder-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@camilamacedo86
Copy link
Member

Hi @dongjiang1989

I saw that you open the PR there as well.
Let's wait just a little ideally, we should only bump the Golang when it is bumped in the k8s API and controller-runtime and we bump here. But lets give a couple of weeks, then I think we can go.

@camilamacedo86
Copy link
Member

@camilamacedo86
Copy link
Member

@dongjiang1989

Let's bump controller-runtime latest release which still uses 1.23 : https://github.com/kubernetes-sigs/controller-runtime/blob/v0.20.3/go.mod

Do a patch release, and then I think we might can move forward with this one.

@dongjiang1989
Copy link
Author

dongjiang1989 commented Mar 12, 2025

@dongjiang1989

Let's bump controller-runtime latest release which still uses 1.23 : https://github.com/kubernetes-sigs/controller-runtime/blob/v0.20.3/go.mod

Do a patch release, and then I think we might can move forward with this one.

Thanks @camilamacedo86
Got it.
controller-runtime master branch update golang version to v1.24:
kubernetes-sigs/controller-runtime@9d65299

Patch it to controller-runtime v0.20.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants