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

release-23.2.0-rc: build: upgrade to golang v1.21.5 #116098

Merged

Conversation

rail
Copy link
Member

@rail rail commented Dec 11, 2023

Backport 5/5 commits from #115339.

/cc @cockroachdb/release


Backport:

Please see individual PRs for details.

/cc @cockroachdb/release

Release justification: Go 1.21 has some performance and latency improvements

rickystewart and others added 5 commits December 11, 2023 16:49
This is an unsupported configuration.

Epic: none
Release note: None
* [ ] 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
Previously, we would use the count of the string `goroutine ` as a
proxy for the number of goroutines in the stacktrace. This stopped
working in go 1.21 due to this change:
golang/go@51225f6

We should consider using a stacktrace parser in the future.

Supports cockroachdb#112088

Epic: None
Release note: None
Fixes cockroachdb#115584.

This commit updates our patched Go runtime to expose a knob to disable the
runtime's GC assist mechanism. The knob is exposed under the `GODEBUG`
environment variable, and can be accessed with `GODEBUG=gcnoassist=1`.

For now, this is just meant for experimentation purposes. It will assist us
as we look to reduce the impact the GC has on tail latency.

Release note: None
* [ ] Adjust the Pebble tests to run in new version.
* [x] Update `build/teamcity/internal/release/build-and-publish-patched-go/impl.sh` with the new version and adjust SHA256 sums as necessary.
* [x] Adjust `GO_VERSION` and `GO_FIPS_COMMIT` for the FIPS Go toolchain ([source](./teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh)).
* [x] 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.
* [x] Adjust `--@io_bazel_rules_go//go/toolchain:sdk_version` in [.bazelrc](../.bazelrc).
* [x] 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.
* [x] Bump the version in `WORKSPACE` under `go_download_sdk` for the FIPS version of Go (`go_sdk_fips`).
* [x] 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`.
* [x] Bump the default installed version of Go in `bootstrap-debian.sh` ([source](./bootstrap/bootstrap-debian.sh)).
* [x] Replace other mentions of the older version of go (grep for `golang:<old_version>` and `go<old_version>`).

Epic: none
Release note: None
@rail rail self-assigned this Dec 11, 2023
@rail rail requested a review from a team as a code owner December 11, 2023 21:49
@rail rail requested a review from a team December 11, 2023 21:49
@rail rail requested review from a team as code owners December 11, 2023 21:49
@rail rail requested review from abarganier and removed request for a team December 11, 2023 21:49
Copy link

blathers-crl bot commented Dec 11, 2023

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Backports should only be created for serious
    issues
    or test-only changes.
  • Backports should not break backwards-compatibility.
  • Backports should change as little code as possible.
  • Backports should not change on-disk formats or node communication protocols.
  • Backports should not add new functionality (except as defined
    here).
  • Backports must not add, edit, or otherwise modify cluster versions; or add version gates.
  • All backports must be reviewed by the owning areas TL and one additional
    TL. For more information as to how that review should be conducted, please consult the backport
    policy
    .
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters. State changes must be further protected such that nodes running old binaries will not be negatively impacted by the new state (with a mixed version test added).
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.
  • Your backport must be accompanied by a post to the appropriate Slack
    channel (#db-backports-point-releases or #db-backports-XX-X-release) for awareness and discussion.

Also, please add a brief release justification to the body of your PR to justify this
backport.

@rail rail requested review from yuzefovich, herkolategan and DarrylWong and removed request for a team December 11, 2023 21:49
@blathers-crl blathers-crl bot added the backport Label PR's that are backports to older release branches label Dec 11, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rail rail changed the title release-23.2.0-rc: release-23.2: build: upgrade to golang v1.21.5 release-23.2.0-rc: build: upgrade to golang v1.21.5 Dec 11, 2023
@yuzefovich yuzefovich removed their request for review December 12, 2023 00:35
@yuzefovich yuzefovich merged commit 2a358ad into cockroachdb:release-23.2.0-rc Dec 12, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Label PR's that are backports to older release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants