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

Avoid requiring the latest Go toolchain patch version to build #28686

Merged
merged 2 commits into from Oct 27, 2023

Conversation

joestringer
Copy link
Member

Forcing developers to change their local toolchain within patch releases
introduces more problems than it's worth. Remove the automatic go.mod
update and don't require newer patch releases of the latest Go version.

Related: #27820
Related: golang/go#63522

@joestringer joestringer requested a review from a team as a code owner October 18, 2023 18:47
@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label Oct 18, 2023
@joestringer
Copy link
Member Author

Wild assertion from my side but from the upstream issue it looks like Cilium is the unusual one here in forcing the minimum toolchain version to follow the latest patch release. If we're updating this by patch releases for a specific reason, then please bring those issues up. Otherwise I think we can just manually bump this version when Cilium starts using stdlib features that require a new minor release of Go, rather than tracking patch releases.

As I understand this should only impact developers, as the actual toolchain used to build Cilium is updated through the dockerfiles. As such, any builds from the CI or for release should be up-to-date for the latest Go patch version.

@joestringer
Copy link
Member Author

Oh, and if there's some other syntax for Renovate to convince it to only bump for minor versions then I'm open to that as well. It's probably worthwhile to ensure that developer toolchains match the minor version of the toolchain being used to build production images.

go.mod Show resolved Hide resolved
@joestringer joestringer force-pushed the pr/joe/drop-go-mod-latest-version branch from 6071a34 to a5db17a Compare October 19, 2023 00:42
@joestringer joestringer requested a review from a team as a code owner October 19, 2023 00:42
@joestringer joestringer changed the title Stop tracking latest Go version in go.mod Avoid requiring the latest Go toolchain patch version to build Oct 19, 2023
@joestringer joestringer requested a review from aanm October 19, 2023 00:43
@joestringer joestringer marked this pull request as draft October 20, 2023 20:33
@joestringer joestringer force-pushed the pr/joe/drop-go-mod-latest-version branch from a5db17a to fc1f3ad Compare October 24, 2023 20:59
@joestringer joestringer marked this pull request as ready for review October 24, 2023 20:59
@joestringer joestringer requested review from aanm and removed request for aanm October 24, 2023 20:59
@joestringer
Copy link
Member Author

/test

@joestringer joestringer marked this pull request as draft October 25, 2023 21:30
joestringer and others added 2 commits October 25, 2023 15:02
Nothing in the tree depends on newer patch releases of Go, so we can
keep this to the first patch release of this series.

Signed-off-by: Joe Stringer <joe@cilium.io>
The goal here is to allow developer toolchains to have more flexibility
around the specific version of Go compared with the latest patch releases.
Note that all of the real-world code and all tests will continue to be
updated to use the latest Go versions, it's just the go.mod that will
start to drift, since the code can actually compile with earlier
versions of Go; we don't require specific patch versions based on the
set of standard library features used in the code.

Co-authored-by: André Martins <andre@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer joestringer force-pushed the pr/joe/drop-go-mod-latest-version branch from fc1f3ad to 91d7a49 Compare October 25, 2023 22:06
@joestringer joestringer marked this pull request as ready for review October 25, 2023 22:11
@joestringer
Copy link
Member Author

/test

Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

Thanks

@joestringer joestringer removed the request for review from rolinh October 26, 2023 16:58
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 27, 2023
go.mod Show resolved Hide resolved
@joestringer joestringer merged commit 9f764f9 into main Oct 27, 2023
204 of 211 checks passed
@joestringer joestringer deleted the pr/joe/drop-go-mod-latest-version branch October 27, 2023 22:09
michi-covalent added a commit to cilium/cilium-cli that referenced this pull request Mar 14, 2024
Shamelessly copied from cilium/cilium#28686.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit to cilium/cilium-cli that referenced this pull request Mar 14, 2024
Shamelessly copied from cilium/cilium#28686.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit to cilium/cilium-cli that referenced this pull request Mar 14, 2024
Shamelessly copied from cilium/cilium#28686.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
sayboras pushed a commit to cilium/cilium-cli that referenced this pull request Mar 14, 2024
Shamelessly copied from cilium/cilium#28686.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants