-
Notifications
You must be signed in to change notification settings - Fork 77
Upgrade Go to 1.20.2 #1171
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
Upgrade Go to 1.20.2 #1171
Conversation
This PR upgrades the version of Go required by the Ops Agent and updates build containers to install go1.20.2.
| SHELL ["/bin/bash", "-c"] | ||
|
|
||
| # Install golang | ||
| ADD https://golang.org/dl/go1.19.linux-amd64.tar.gz /tmp/go1.19.linux-amd64.tar.gz |
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.
Is there a way to have the version defined somewhere, so it is easier to upgrade the next time?
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.
Does dockerfiles/template count? This used to be a manual update throughout the whole Dockerfile, however the new tool to compile a Dockerfile from the teamplate did mean I only had to manually fix it there and then recompile the Dockerfile. Did you have something else in mind?
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 could maybe be even easier with a variable in that template.
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.
ah got it! That is good enough i think
|
Optional: should we also upgrade the version of Go contained within the integration tests (https://github.com/GoogleCloudPlatform/ops-agent/blob/master/integration_test/ops_agent_test.go#L3274)? |
Thanks, I didn't know that was there. I'll update it as well. |
Switch to using runtime.Version() in `installGolang` function so we don't always have to manually update the go version in that function. Rewrote the documentation in a way I like better.
integration_test/ops_agent_test.go
Outdated
| is in. If not provided, that means that the packages are accessed through | ||
| packages.cloud.google.com instead, which may point to Cloud Rapture or | ||
| Artifact Registry under the hood. | ||
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.
gofmt did this automatically. I think it's a godoc convention. Maybe we should reformat this comment if we don't want it to look like this?
Our integration test environment doesn't work the way I thought. go1.20.2 isn't made available in our storage buckets, but go1.20 is so might as well switch to that.
|
Due to some weirdness building the HTTP server for Prometheus tests with Go 1.20, going to push that upgrade to a separate bug and PR. Building the Integration Test applications with Go 1.19 shouldn't have any negative effects with the Ops Agent being built in Go 1.20; they are indpendent. |
|
Going to re-run, there is a small chance that SAP Hana failure is real but I think it's most likely a flake. |
|
Okay, SAP Hana was indeed a flake, and I'm pretty confident those Windows failures are also flakes because they passed before on the same commit. Going to merge. |
Description
This PR upgrades the version of Go required by the Ops Agent and updates build containers to install go1.20.2.
Related issue
b/274799145
How has this been tested?
Ran
make testandmake buildafter changing everything.Checklist: