-
Notifications
You must be signed in to change notification settings - Fork 493
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
Upgrading to go 1.22 + k8s 1.30 dependencies #2988
Conversation
go.mod
Outdated
@@ -1,23 +1,23 @@ | |||
module sigs.k8s.io/gateway-api | |||
|
|||
go 1.21 | |||
go 1.22.2 |
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.
there's no need to require .2 (I think)
this is viral and will force all dependencies to do so as well
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 think it's automatic now, go mod tidy
will hardcode 1.22.0
if we just have 1.22
here. Maybe that's preferable? (x-ref https://github.com/kubernetes/kubernetes/blob/master/go.mod#L9)
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.
yeah I would put 1.22.0.
1.22.2 says "you MUST have the .2 patch to use this as a library". Really the Go specifier should be the minimum version you support (though in practice this doesn't matter much since the go ecosystem is pretty good about updating)
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.
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.
Yeah I've complained here - golang/go#65847
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.
It seems like upstream is moving to 1.22.2 for now (x-ref kubernetes/kubernetes#124386), will stick with this until a better option emerges.
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 closed kubernetes/kubernetes#124386 until we think through this more and left k/k at 1.22.0, xref kubernetes/kubernetes#124386 (comment)
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'd recommend go 1.22.0
or whatever go dictates your minimum has to be ... including the patch means you won't fight go tooling, leaving it at the minimum patch in the minor means you are permissive to your downstreams and builders as possible
Building with go patch versions above the minimum works perfectly well (and you can actually put toolchain directives in the go.mod file to indicate you require building main packages in this module with a higher patch version if you want)
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.
Updated to use 1.22.0, thanks everyone!
go.mod
Outdated
k8s.io/utils v0.0.0-20240102154912-e7106e64919e | ||
sigs.k8s.io/controller-runtime v0.16.3 | ||
sigs.k8s.io/controller-runtime v0.17.3 |
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.
surprised this works since they don't support 1.30 yet and there were incompatible changes.. I guess we must not import some of those packages
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.
Bumped back to v0.17.0 to allow dependent implementations to pick up newer changes from controller-runtime - no changes in either case from perspective of Gateway API directly.
6ee70e6
to
6eeee6a
Compare
Looks like any use of applyconfiguration-gen is broken until kubernetes/kubernetes#124371 merges (ideally in time for v1.30.1). That leaves us with a few not-great options:
At this point, I'm thinking that if v1.30.1 is not ready (or close to ready) by the time we're ready to release RC1, we should move forward with option 1 with the idea that we might be able to add applyconfigurations back in before RC2 (cc @dprotaso). |
The docker images need bumping to go 1.22 as well - see #2993 |
bc726c7
to
e22f237
Compare
Thanks to some clever hacks by @dprotaso, we've got a workaround that should work until the upstream fix is released in v1.30.1. This PR is ready for another round of review. |
b04c765
to
d74fd80
Compare
/retest |
I think it would be nice if we could get this in for 1.1. |
I think @k8s-ci-robot needs some help clearing the /honk |
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. |
04937dc
to
01aae89
Compare
Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: howardjohn, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Does this mean that the minimum required Kubernetes version for Gateway API v1.1+ is v1.30? or are the last 5 minor versions still supported? |
Still the last 5 minor versions, we're just using the 1.30+ dependencies, that's all. (I think we have upgraded since this PR as well). |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Kubernetes v1.30 was released today, this bumps dependencies to match.
Which issue(s) this PR fixes:
Fixes #2956
Does this PR introduce a user-facing change?: