-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Bump Go 1.24 #12128
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
base: main
Are you sure you want to change the base?
🌱 Bump Go 1.24 #12128
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
We should merge #12088 at first since the golangci-lint version that Go1.24 is available is only golangci-lint v2. |
/hold We usually use the same go version used by K8s version we are importing, and we import the same K8s version used by the controller runtime version we are using. |
Thanks! |
I would like to do the CR bump. I'm usually using CAPI as a final verification for CR before the CR release is published. I will coordinate with you that this PR is merged right before. Can you please rebase this PR? |
@sbueringer EDIT |
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@@ -47,6 +47,9 @@ linters: | |||
- usestdlibvars # using variables/constants from the standard library | |||
- usetesting # report function to be replace by testing | |||
- whitespace # unnecessary newlines | |||
disable: | |||
# TODO: It will be dropped when the Go version migration is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usetesting is automatically enabled when Go 1.24 is used. This linter diagnose the calls that can be replaced by functions defined in testing package. e.g. os.Setenv -> testing.Setenv.
It is what I'm going to do after the migration to Go1.24 since the diff is very large. So I disable it once, then would tackle it later on another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Maybe open a small issue to track it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #12179 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx!
This failure is led by Go 1.24 since the go test run the vet implicitly before run test. Since 1.24, printf linter is called every time, then I disabled it on golanci.yml to deal with these issues on another PR. But it seems to deal with it too including with this PR. |
Signed-off-by: sivchari <[email protected]>
Okay, it works correctly 😄 |
We met the vulnerability, then I decide to upgrade from go1.24.0 to go1.24.2. |
Signed-off-by: sivchari <[email protected]>
/retest |
What this PR does / why we need it:
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 #
Part of #11642
/area dependency