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

*: upgrade to go 1.21.0 #97260

Closed
wants to merge 1 commit into from

Conversation

healthy-pod
Copy link
Contributor

@healthy-pod healthy-pod commented Feb 16, 2023

  • Adjust the Pebble tests to run in new version.
  • Adjust version in Docker image (source).
  • Adjust version in the TeamCity agent image (setup script)
  • Rebuild and push the Docker image (following Basic Process)
  • Update build/teamcity/internal/release/build-and-publish-patched-go/impl.sh with the new version and adjust SHA256 sums as necessary.
  • Run the Internal / Cockroach / Build / Toolchains / Publish Patched Go for Mac build configuration in TeamCity with your latest version of the script above. Note the job depends on another job Build and Publish Patched Go. That job prints out the SHA256 of all tarballs, which you will need to copy-paste into WORKSPACE (see below). Publish Patched Go for Mac is an extra step that publishes the signed go binaries for macOS. That job also prints out the SHA256 of the Mac tarballs in particular.
  • Bump the version in WORKSPACE under go_download_sdk. You may need to bump rules_go. Also edit the filenames listed in sdks and update all the hashes to match what you built in the step above.
  • Run ./dev generate bazel to refresh distdir_files.bzl, then bazel fetch @distdir//:archives to ensure you've updated all hashes to the correct value.
  • Bump the version in builder.sh accordingly (source).
  • Bump the version in go-version-check.sh (source), unless bumping to a new patch release.
  • Bump the go version in go.mod.
  • Bump the default installed version of Go in bootstrap-debian.sh (source).
  • Replace other mentions of the older version of go (grep for golang:<old_version> and go<old_version>).
  • Update the builder.dockerImage parameter in the TeamCity Cockroach and Internal projects.
  • Ask the Developer Infrastructure team to deploy new TeamCity agent images according to packer/README.md

Release note (build change): upgrade to go 1.21.0
Epic: none

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@healthy-pod healthy-pod force-pushed the upgradego120 branch 11 times, most recently from 1fe6c33 to baf6120 Compare February 18, 2023 02:16
@healthy-pod healthy-pod force-pushed the upgradego120 branch 2 times, most recently from d77b70b to 397d772 Compare February 24, 2023 00:33
@blathers-crl
Copy link

blathers-crl bot commented Feb 24, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@healthy-pod healthy-pod force-pushed the upgradego120 branch 11 times, most recently from fa18c73 to f2b97ff Compare February 24, 2023 18:55
Copy link
Contributor

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

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

Looks like the Go runtime buckets changed in golang/go@87eda2a (cc @sumeerbhola). The new buckets look fine for our purposes though -- we still have the maximum resolution possible for the value ranges (~1ms) we're primarily interested in.

Underlying Go buckets ~1ms range:

bucket[ 50] width=131.072µs          boundary=[655.36µs, 786.432µs)
bucket[ 51] width=131.072µs          boundary=[786.432µs, 917.504µs)
bucket[ 52] width=131.072µs          boundary=[917.504µs, 1.048576ms)
bucket[ 53] width=262.144µs          boundary=[1.048576ms, 1.31072ms)
bucket[ 54] width=262.144µs          boundary=[1.31072ms, 1.572864ms)
bucket[ 55] width=262.144µs          boundary=[1.572864ms, 1.835008ms)
bucket[ 56] width=262.144µs          boundary=[1.835008ms, 2.097152ms)
bucket[ 57] width=524.288µs          boundary=[2.097152ms, 2.62144ms)
bucket[ 58] width=524.288µs          boundary=[2.62144ms, 3.145728ms)

Our resampled buckets with exponential base of 1.1, clamped to range [50us, 100ms]:

bucket[ 16] width=131.072µs          boundary=[655.36µs, 786.432µs)
bucket[ 17] width=131.072µs          boundary=[786.432µs, 917.504µs)
bucket[ 18] width=131.072µs          boundary=[917.504µs, 1.048576ms)
bucket[ 19] width=262.144µs          boundary=[1.048576ms, 1.31072ms)
bucket[ 20] width=262.144µs          boundary=[1.31072ms, 1.572864ms)
bucket[ 21] width=262.144µs          boundary=[1.572864ms, 1.835008ms)
bucket[ 22] width=262.144µs          boundary=[1.835008ms, 2.097152ms)
bucket[ 23] width=524.288µs          boundary=[2.097152ms, 2.62144ms)
bucket[ 24] width=524.288µs          boundary=[2.62144ms, 3.145728ms)
bucket[ 25] width=524.288µs          boundary=[3.145728ms, 3.670016ms)

@RaduBerinde
Copy link
Member

Actually most of the lint changes were necessary because of updating honnef.co/go/tools; but it was subsequently updated in #81868. It'd probably be easier to drop all changes to .go files.

@healthy-pod
Copy link
Contributor Author

do you have time to pick this up soon?

@RaduBerinde Yes this is already in-progress, I should update the PR before Tuesday. We will be upgrading to Go 1.21.0.

@healthy-pod healthy-pod removed the request for review from irfansharif August 28, 2023 18:40
@healthy-pod healthy-pod force-pushed the upgradego120 branch 3 times, most recently from 75294a4 to 70e8bf5 Compare August 28, 2023 21:43
@healthy-pod healthy-pod changed the title *: upgrade to go 1.20.1 *: upgrade to go 1.21.0 Aug 28, 2023
@healthy-pod healthy-pod requested review from a team and abarganier and removed request for a team August 29, 2023 16:51
@healthy-pod healthy-pod force-pushed the upgradego120 branch 2 times, most recently from 6f8a062 to f10d539 Compare August 29, 2023 17:44
@@ -0,0 +1,200 @@
// Copyright 2023 The Cockroach Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this file identical to the 1.20 file? If it is, just change the !go1.21 to !go1.22 on that file instead. (and modify the comment on line 11 to say that it was cross-checked against go1.20 and go1.21).

* [ ] Adjust the Pebble tests to run in new version.
* [ ] Adjust version in Docker image ([source](./builder/Dockerfile)).
* [ ] Adjust version in the TeamCity agent image ([setup script](./packer/teamcity-agent.sh))
* [ ] Rebuild and push the Docker image (following [Basic Process](#basic-process))
* [ ] Update `build/teamcity/internal/release/build-and-publish-patched-go/impl.sh` with the new version and adjust SHA256 sums as necessary.
* [ ] Run the `Internal / Cockroach / Build / Toolchains / Publish Patched Go for Mac` build configuration in TeamCity with your latest version of the script above. Note the job depends on another job `Build and Publish Patched Go`. That job prints out the SHA256 of all tarballs, which you will need to copy-paste into `WORKSPACE` (see below). `Publish Patched Go for Mac` is an extra step that publishes the *signed* `go` binaries for macOS. That job also prints out the SHA256 of the Mac tarballs in particular.
* [ ] Bump the version in `WORKSPACE` under `go_download_sdk`. You may need to bump [rules_go](https://github.com/bazelbuild/rules_go/releases). Also edit the filenames listed in `sdks` and update all the hashes to match what you built in the step above.
* [ ] Run `./dev generate bazel` to refresh `distdir_files.bzl`, then `bazel fetch @distdir//:archives` to ensure you've updated all hashes to the correct value.
* [ ] Bump the version in `builder.sh` accordingly ([source](./builder.sh#L6)).
* [ ] Bump the version in `go-version-check.sh` ([source](./go-version-check.sh)), unless bumping to a new patch release.
* [ ] Bump the go version in `go.mod`.
* [ ] Bump the default installed version of Go in `bootstrap-debian.sh` ([source](./bootstrap/bootstrap-debian.sh)).
* [ ] Replace other mentions of the older version of go (grep for `golang:<old_version>` and `go<old_version>`).
* [ ] Update the `builder.dockerImage` parameter in the TeamCity [`Cockroach`](https://teamcity.cockroachdb.com/admin/editProject.html?projectId=Cockroach&tab=projectParams) and [`Internal`](https://teamcity.cockroachdb.com/admin/editProject.html?projectId=Internal&tab=projectParams) projects.
* [ ] Ask the Developer Infrastructure team to deploy new TeamCity agent images according to [packer/README.md](./packer/README.md)

Release note (build change): upgrade to go 1.21.0
Epic: none
@healthy-pod healthy-pod requested a review from a team as a code owner August 30, 2023 00:58
@healthy-pod healthy-pod mentioned this pull request Sep 8, 2023
18 tasks
jbowens added a commit to jbowens/pebble that referenced this pull request Oct 5, 2023
There's an effort underway to upgrade to Go 1.21 before shipping 23.2. Begin
testing 1.21 in Pebble CI, and declare Go 1.21 in the go.mod file.

Informs cockroachdb/cockroach#97260.
jbowens added a commit to jbowens/pebble that referenced this pull request Oct 5, 2023
There's an effort underway to upgrade to Go 1.21 before shipping 23.2. Begin
testing 1.21 in Pebble CI, and declare Go 1.21 in the go.mod file.

Informs cockroachdb/cockroach#97260.
jbowens added a commit to cockroachdb/pebble that referenced this pull request Oct 5, 2023
There's an effort underway to upgrade to Go 1.21 before shipping 23.2. Begin
testing 1.21 in Pebble CI, and declare Go 1.21 in the go.mod file.

Informs cockroachdb/cockroach#97260.
@rickystewart
Copy link
Collaborator

Closing in favor of #111928

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.

10 participants