-
Notifications
You must be signed in to change notification settings - Fork 201
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
.: bump go version to go1.21 #304
Conversation
Signed-off-by: Madhav Jivrajani <[email protected]>
Signed-off-by: Madhav Jivrajani <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MadhavJivrajani 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 |
@logicalhan FYI ^ |
cc @xdu31 |
@@ -1,6 +1,6 @@ | |||
module k8s.io/utils | |||
|
|||
go 1.18 | |||
go 1.21 |
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.
/hold
This doesn't do what you think it does :-/
This forces anything importing this module to also bump its own go
module directive to go1.21, and makes go change the defaults for godebug compatibility switch defaults. golang/go#65573 is an open proposal to improve this in go1.23, but until that lands, we need to avoid bumping our go directives past go1.20 in our release-from-HEAD repos like utils/kube-openapi/gengo/etc.
Because this repo only releases from HEAD, if we find a bug we need to fix and backport to older kubernetes versions (like 1.27), this would bump the go.mod version in 1.27 from go1.20 to go1.21, which we don't want. Repos that have release branches (like k/k) are more reasonable to keep pushing the go.mod to latest go at HEAD.
golang.org/x/... modules also keep their go directive at the oldest language version you can build with (e.g. https://cs.opensource.google/go/x/sys/+/master:go.mod has 1.18).
they build with go1.21 now, but 1.27 and 1.28 are relying on go1.20-compatible behavior via their |
Ahhh right We can revisit this once we know what happens there, thanks @liggitt! |
@MadhavJivrajani: Closed this PR. In response to this:
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. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
go1.20 is out of support as of ~3 weeks ago and all supported k/k release branches are on go1.21.
This PR bumps version of Go to 1.21.
This PR also cleans up the build tag directives and consistently uses only
//go:build
nowWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
@dims @liggitt - I'm wondering if we put in
go1.21.x
in thego.mod
or an overall release version likego1.21
should do like we do in k/k?Release note:
/assign @dims @liggitt