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
Let renovatebot update Go toolchain version in a single PR #24895
Conversation
e9839ec
to
d629de4
Compare
/test |
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.
very nice. Minor nit, the first commit msg you state
[...] GO_VERSION (currently Go 1.12.1), thus the second condition (version >= go 1.13)
where I think you meant to say "currently 1.20.1".
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.
This is awesome.
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.
LGTM from a docs perspective.
We only support building with the Go version specified in GO_VERSION (currently Go 1.20.1), thus the second condition (version >= go 1.13) is always true. Signed-off-by: Tobias Klauser <tobias@cilium.io>
This allows renovate bot to update Go version in GitHub actions. Signed-off-by: Tobias Klauser <tobias@cilium.io>
This allows renovate bot to update the Go version used for Travis CI. Signed-off-by: Tobias Klauser <tobias@cilium.io>
Instead of manually downloading and installing the Go toolchain tarball, let's just copy it from the golang image. This will allow renovate bot to automatically update the image and thus the Go version. Signed-off-by: Tobias Klauser <tobias@cilium.io>
This allows renovate bot to update the Go version in test scripts used within the CI VMs. Signed-off-by: Tobias Klauser <tobias@cilium.io>
Add the necessary grouping so all Go dependencies across all files are combined. Signed-off-by: Tobias Klauser <tobias@cilium.io>
Instead of having a make target update the minimum required Go version, let dev-doctor extract it from the main module's go.mod file. Signed-off-by: Tobias Klauser <tobias@cilium.io>
The GO_VERSION file is going away in favor of renovatebot keeping the Go toolchain version up-to-date across the tree. Let the doc generation read the required Go major/minor version from go.mod. Note that this will now only specify Go 1.20 instead of Go 1.20.x in the development setup docs. This is in line with the dev-doctor tool and the check-go-version make target also only requiring the major and minor version to match. Signed-off-by: Tobias Klauser <tobias@cilium.io>
All remaining users of the GO_VERSION file were either converted to be updated by renovate or to use the go.mod file (in case only major and minor version are required) in previous commits. Delete the now unneeded GO_VERSION file. Signed-off-by: Tobias Klauser <tobias@cilium.io>
These build tags lead to a rather unhelpful error message when compiling an outdated Go versions, e.g. package github.com/cilium/cilium/daemon: build constraints exclude all Go files in ... Nothing in the error messages indicates that this is due to an outdated Go toolchain version and this has been a source of confusion several times for several developers. It's also brittle in a way that if a developer adds a new tool with a main func and forgets adding the //go:build line it will not be enforced by tooling. The update-go-version make target will only cover existing //go:build go1.X lines. We have other checks in place to guarantee that Cilium is built using the correct Go version (namely the go directive in go.mod, the check-go-version make target, the dev-doctor tool and various CI checks), so drop these build tags. Signed-off-by: Tobias Klauser <tobias@cilium.io>
d629de4
to
799c3af
Compare
Rebased to resolve merge conflicts and to address David's and Michi's review comments. |
/test |
Migrate the remaining Go toolchain updates from the
update-go-version
target to renovatebot and change renovatebot to group all Go version updates into a single PR.See individual commits and #24806 for details.
Example PR: tklauser#504
Fixes: #24806