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

build: upgrade to golang v1.21.3 #112349

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

rickystewart
Copy link
Collaborator

@rickystewart rickystewart commented Oct 13, 2023

  • Adjust the Pebble tests to run in new version.
  • Adjust version in the TeamCity agent image (setup script)
  • Update build/teamcity/internal/release/build-and-publish-patched-go/impl.sh with the new version and adjust SHA256 sums as necessary.
  • Adjust GO_VERSION and GO_FIPS_COMMIT for the FIPS Go toolchain (source).
  • 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.
  • Adjust --@io_bazel_rules_go//go/toolchain:sdk_version in .bazelrc.
  • 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.
  • Bump the version in WORKSPACE under go_download_sdk for the FIPS version of Go (go_sdk_fips).
  • 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 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>).
  • Ask the Developer Infrastructure team to deploy new TeamCity agent images according to packer/README.md

Closes #112088.

Epic: none
Release note (general change): Updated Go version to 1.21.3

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rickystewart rickystewart force-pushed the update-rules-go branch 7 times, most recently from 2cad2f5 to a81faf9 Compare October 23, 2023 16:05
@rickystewart rickystewart requested a review from rail October 23, 2023 16:07
@rickystewart rickystewart marked this pull request as ready for review October 23, 2023 16:07
@rickystewart rickystewart requested a review from a team October 23, 2023 16:07
@rickystewart rickystewart requested review from a team as code owners October 23, 2023 16:07
@rickystewart rickystewart requested review from dhartunian, rharding6373, herkolategan and srosenberg and removed request for a team October 23, 2023 16:07
Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Reviewed 32 of 32 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dhartunian, @herkolategan, @rharding6373, and @srosenberg)

@rickystewart
Copy link
Collaborator Author

acceptance test failures in CI seem to be a flake.

Copy link
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

:lgtm: for SQL Queries

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dhartunian, @herkolategan, @rickystewart, and @srosenberg)


pkg/sql/crdb_internal_test.go line 1032 at r1 (raw file):

	require.NoError(t, errUpdate)
	end := timeutil.Now()
	require.GreaterOrEqual(t, end.Sub(start), 499*time.Millisecond)

Do you know why it doesn't like 500? I don't think this is a big deal, but it's an interesting change.

@rickystewart
Copy link
Collaborator Author

rickystewart commented Oct 23, 2023

Do you know why it doesn't like 500? I don't think this is a big deal, but it's an interesting change.

I saw a failure (probably a flake) that was like: "expected current time to be 500ms + the original time, but it's only 499.6(something) ms". I don't know how this works: if it ends up eventually shelling out to a go runtime function, maybe the way that function figures out how long to sleep was updated in 1.21, or they're rounding differently. Either way this solves the flake.

* [ ] Adjust the Pebble tests to run in new version.
* [ ] Adjust version in the TeamCity agent image ([setup script](./packer/teamcity-agent.sh))
* [ ] Update `build/teamcity/internal/release/build-and-publish-patched-go/impl.sh` with the new version and adjust SHA256 sums as necessary.
* [ ] Adjust `GO_VERSION` and `GO_FIPS_COMMIT` for the FIPS Go toolchain ([source](./teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh)).
* [ ] 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.
* [ ] Adjust `--@io_bazel_rules_go//go/toolchain:sdk_version` in [.bazelrc](../.bazelrc).
* [ ] 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.
* [ ] Bump the version in `WORKSPACE` under `go_download_sdk` for the FIPS version of Go (`go_sdk_fips`).
* [ ] 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 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>`).
* [ ] Ask the Developer Infrastructure team to deploy new TeamCity agent images according to [packer/README.md](./packer/README.md)

Epic: none
Release note (general change): Updated Go version to 1.21.3
@rickystewart
Copy link
Collaborator Author

TFTR!

bors r=rail,rharding6373

@craig
Copy link
Contributor

craig bot commented Oct 24, 2023

Build succeeded:

@craig craig bot merged commit 93c069d into cockroachdb:master Oct 24, 2023
3 checks passed
nicktrav added a commit to nicktrav/pebble that referenced this pull request Oct 26, 2023
Cockroach uses go1.21 as of cockroachdb/cockroach#112349. Update Pebble
to do the same.
nicktrav added a commit to cockroachdb/pebble that referenced this pull request Oct 26, 2023
Cockroach uses go1.21 as of cockroachdb/cockroach#112349. Update Pebble
to do the same.
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.

*: upgrade to go 1.21
4 participants