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

[v1.13] Let renovatebot update Go toolchain version in a single PR #29743

Merged
merged 8 commits into from
Dec 11, 2023

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Dec 8, 2023

Author backport of #24895. This allows renovate to consistently update the Go version in v1.13, i.e. so the Go version used to build the release images is the same that is used in CI.

[ upstream commit d8dba60 ]

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>
[ upstream commit f0039ae ]

[ backporter's note: skipped files not existent on v1.13. This makes
  sure Go version in CI gets update by renovate as well to match the
  version used in the runtime and builder images, i.e. the version used to
  build the release binaries. ]

This allows renovate bot to update Go version in GitHub actions.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 393eb88 ]

This allows renovate bot to update the Go version used for Travis CI.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit f5777c6 ]

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>
[ upstream commit f731d6c ]

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>
[ upstream commit e718a35 ]

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>
[ upstream commit ca4f4f8 ]

[ backporter's notes: skipped files not existent on v1.13. Trivial merge
  conflicts in CODEOWNERS resolved by keeping the current version. ]

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>
[ upstream commit 66377a3 ]

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>
@tklauser tklauser added kind/backports This PR provides functionality previously merged into master. release-blocker/1.13 This issue will prevent the release of the next version of Cilium. backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. labels Dec 8, 2023
@tklauser tklauser requested a review from aanm December 8, 2023 14:24
@tklauser tklauser requested review from a team as code owners December 8, 2023 14:24
@tklauser tklauser requested a review from nebril December 8, 2023 14:24
@tklauser
Copy link
Member Author

tklauser commented Dec 8, 2023

/test-backport-1.13

@tklauser tklauser self-assigned this Dec 8, 2023
@aanm
Copy link
Member

aanm commented Dec 8, 2023

/test-1.19-4.19

@aanm
Copy link
Member

aanm commented Dec 8, 2023

/test-1.20-4.19

@aanm
Copy link
Member

aanm commented Dec 8, 2023

/test-1.24-4.19

@aanm aanm merged commit 301200e into v1.13 Dec 11, 2023
134 of 139 checks passed
@aanm aanm deleted the pr/tklauser/v1.13/go-renovate branch December 11, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. release-blocker/1.13 This issue will prevent the release of the next version of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants