-
Notifications
You must be signed in to change notification settings - Fork 67
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 up golang to 1.22.0 #132
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jin Dong <[email protected]>
Signed-off-by: Jin Dong <[email protected]>
f66745c
to
5f1c070
Compare
@@ -1,6 +1,6 @@ | |||
module github.com/containerd/nri/plugins/device-injector | |||
|
|||
go 1.21 | |||
go 1.22.0 |
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.
Was there a specific need to raise the minimum required version? Go modules use minimum versions selection; that includes the go versions, and for library modules should specify the absolute minimum that can be used. eg golang's x/sys and others still allow go1.18, because the did not require anything more current; https://github.com/golang/sys/blob/d4ac05dc8c4c953ec29cae3df56c0833f4010763/go.mod#L3
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.
Hi @thaJeztah thanks for review and suggestion. (moved PR to draft for now since need to fix CI errors)
Was there a specific need to raise the minimum required version?
There is no required need for this go update. It's mainly to make our dependency upgrade easier. E.g., from my experiment, both google.golang.org/grpc
and k8s.io/cri-api
updates require go 1.22 at least. I probably can find a relatively new version for them that still only requires go 1.21.
That being said, I'm happy to change it back to go 1.21 and update those deps to the versions that only requires go 1.21. :)
and for library modules should specify the absolute minimum that can be used.
I assume we still want to keep the versions in plugins to be up-to-date (e.g., at least uses a non-EOL version if possible)? E.g., keep ./go.mod
at minimum, and update ./plugins/*/go.mod
relatively frequently?
Meanwhile, a few clarification questions on go/deps around containerd projects:
- For libraries, do we want to update go version if it's needed to update some major deps (e.g., k8s.io, otel, grpc, etc).
- Do we need to keep the library's dependency version in sync with containerd?
Thank you!
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.
For libraries, do we want to update go version if it's needed to update some major deps (e.g., k8s.io, otel, grpc, etc).
Roughly yes, though a couple thoughts on this:
- Distro packagers of containerd may be using older versions of Go that are unsupported upstream, but still maintained by the distro. This would be the policy for stable distributions like Debian and Fedora, for example. Bumping too aggressively makes it difficult for packagers to still support containerd.
- CI should cover in-support versions of Go
- We may want to bump anyway once a version becomes too old, though that's still a bit fuzzy. We could look at when popular distros like Debian and Fedora phase out a given Go version as an example.
Do we need to keep the library's dependency version in sync with containerd?
No, but we definitely should test it (in CI) at a version in sync with containerd.
Given golang 1.21 has been EOL, I think we can upgrade golang to 1.22.0 at least? (containerd uses 1.22.0, cri-o uses 1.23 in main branch.