Skip to content

Conversation

@braydonk
Copy link
Contributor

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 test and make build after changing everything.

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

This PR upgrades the version of Go required by the Ops Agent and updates
build containers to install go1.20.2.
@braydonk braydonk requested review from a team and avilevy18 and removed request for a team March 23, 2023 13:51
SHELL ["/bin/bash", "-c"]

# Install golang
ADD https://golang.org/dl/go1.19.linux-amd64.tar.gz /tmp/go1.19.linux-amd64.tar.gz
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

@jefferbrecht
Copy link
Member

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)?

@braydonk
Copy link
Contributor Author

Optional: should we also upgrade the version of Go contained within the integration tests

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.
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.
Copy link
Contributor Author

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.
@braydonk
Copy link
Contributor Author

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.

@braydonk braydonk added the kokoro:force-run Forces kokoro to run integration tests on a CL label Mar 23, 2023
@braydonk
Copy link
Contributor Author

Going to re-run, there is a small chance that SAP Hana failure is real but I think it's most likely a flake.

@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Mar 23, 2023
@braydonk
Copy link
Contributor Author

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.

@braydonk braydonk merged commit bbfcfa7 into master Mar 24, 2023
@igorpeshansky igorpeshansky deleted the braydonk-go-120 branch July 10, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants