Skip to content

Commit 5036de0

Browse files
committed
*: upgrade to Go 1.23.12
* [ ] Adjust the Pebble tests to run in new version. * [ ] Update [our `go` fork](https://github.com/cockroachdb/go) with a new branch containing our patches. Create a new branch `cockroach-go$GO_VERSION` and take note of the commit ID. * [ ] Update `build/teamcity/internal/release/build-and-publish-patched-go/commit.txt` with the commit ID in the `go` fork. * [ ] Update `build/teamcity/internal/release/build-and-publish-patched-go/impl.sh` with the new `GOVERS` and adjust SHA256 sums as necessary. * [ ] Adjust `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`). * [ ] Upgrade golang.org/x packages; these are maintained by the Go project and it's reasonable to upgrade them when doing our Go upgrade. Run `grep -e '^\tgolang.org/x' go.mod | grep -v vcs | grep -v image | grep -v typeparams | cut -w -f2 | sed 's/$/@latest/' | xargs go get`. (Note: we don't upgrade certain libraries that are not linked into CRDB, hence the `grep -v`.) * [ ] Run `./dev generate bazel --mirror`, 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>`). Epic: none Release note: Upgrade to Go 1.23.12
1 parent 80ad49e commit 5036de0

File tree

11 files changed

+163
-465
lines changed

11 files changed

+163
-465
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ build:crosslinuxfips '--workspace_status_command=./build/bazelutil/stamp.sh -t x
101101
build:crosslinuxfips --config=crosslinuxfipsbase
102102
build:crosslinuxfipsbase --platforms=//build/toolchains:cross_linux
103103
build:crosslinuxfipsbase --config=cross
104-
build:crosslinuxfipsbase --@io_bazel_rules_go//go/toolchain:sdk_version=1.23.7fips
104+
build:crosslinuxfipsbase --@io_bazel_rules_go//go/toolchain:sdk_version=1.23.12fips
105105
build:crosswindows '--workspace_status_command=./build/bazelutil/stamp.sh -t x86_64-w64-mingw32'
106106
build:crosswindows --config=crosswindowsbase
107107
build:crosswindowsbase --platforms=//build/toolchains:cross_windows

DEPS.bzl

Lines changed: 40 additions & 296 deletions
Large diffs are not rendered by default.

WORKSPACE

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ load(
167167
go_download_sdk(
168168
name = "go_sdk",
169169
sdks = {
170-
"darwin_amd64": ("go1.23.7.darwin-amd64.tar.gz", "d26ec0c7ce5975a334b1c343de8eb7aa8777fac278440cc2204b76eab867b3ef"),
171-
"darwin_arm64": ("go1.23.7.darwin-arm64.tar.gz", "3c1ab410d0828951cddde4959b72ef33aedbce8e3c8aa9c76cc4a094043fef43"),
172-
"linux_amd64": ("go1.23.7.linux-amd64.tar.gz", "b69a06004491883f176b0ec600a7efbb3ec9450561653d8f509fc10d43176492"),
173-
"linux_arm64": ("go1.23.7.linux-arm64.tar.gz", "4b0922c371650ec1fda259f41abc98412abf149b8d358daa5e5bc7c553bc6e52"),
174-
"linux_s390x": ("go1.23.7.linux-s390x.tar.gz", "25f0cb7d7683cd9df1e194852a1856ac905be5c001759bab7862dad7aedc626d"),
175-
"windows_amd64": ("go1.23.7.windows-amd64.tar.gz", "265efcbe685b3737f317c52e13eaa444bc205ad6a5e676f59d229ec4dc5821d1"),
170+
"darwin_amd64": ("go1.23.12.darwin-amd64.tar.gz", "34457131f14281e21e25493d68e7519ccf26342d176dac36a4fc5dbf5ef122d9"),
171+
"darwin_arm64": ("go1.23.12.darwin-arm64.tar.gz", "30e0735ab9ccda203946536d24afe895abd1a1d3f35ad199f9768ccbdd5d60bc"),
172+
"linux_amd64": ("go1.23.12.linux-amd64.tar.gz", "0cac0ac930ecb9458b8a0a7969cbf735c5884d24c879c97eb28a8997eca986fa"),
173+
"linux_arm64": ("go1.23.12.linux-arm64.tar.gz", "528601fc8fb2c7e5ce8b7ae7651fd4fce2450bbef687beb96616edc5a9effa41"),
174+
"linux_s390x": ("go1.23.12.linux-s390x.tar.gz", "f3f11bbb731da6716776d1c29a2db3d1063fa0a9f8c00636e6a77793ba79e2e3"),
175+
"windows_amd64": ("go1.23.12.windows-amd64.tar.gz", "71b5b5b86b3a5ff9f124e21984abd874a6bfeb438f368de2eee7c60a25a19c94"),
176176
},
177-
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20250714-192942/{}"],
178-
version = "1.23.7",
177+
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20250818-202337/{}"],
178+
version = "1.23.12",
179179
)
180180

181181
# To point to a local SDK path, use the following instead. We'll call the
@@ -659,8 +659,9 @@ go_download_sdk(
659659
# able to provide additional diagnostic information such as the expected version of OpenSSL.
660660
experiments = ["boringcrypto"],
661661
sdks = {
662-
"linux_amd64": ("go1.23.7fips.linux-amd64.tar.gz", "f7bb32b36090ba9e632a7ee9fa414214c79a2d1b0be609ac12975b448d973961"),
662+
663+
"linux_amd64": ("go1.23.12fips.linux-amd64.tar.gz", "9c58fd7137b4c9d387a5c37fd2e728bc5d39357c7f8ba3358bcae513704c2983"),
663664
},
664-
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20250714-192942/{}"],
665-
version = "1.23.7fips",
665+
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20250818-202337/{}"],
666+
version = "1.23.12fips",
666667
)

build/bazelutil/distdir_files.bzl

Lines changed: 19 additions & 45 deletions
Large diffs are not rendered by default.

build/bootstrap/bootstrap-debian.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ sudo tar -C /usr --strip-components=1 -zxf /tmp/cmake.tgz && rm /tmp/cmake.tgz
4545

4646
# Install Go.
4747
trap 'rm -f /tmp/go.tgz' EXIT
48-
curl -fsSL https://dl.google.com/go/go1.23.7.linux-amd64.tar.gz >/tmp/go.tgz
48+
curl -fsSL https://dl.google.com/go/go1.23.12.linux-amd64.tar.gz >/tmp/go.tgz
4949
sha256sum -c - <<EOF
50-
4741525e69841f2e22f9992af25df0c1112b07501f61f741c12c6389fcb119f3 /tmp/go.tgz
50+
d3847fef834e9db11bf64e3fb34db9c04db14e068eeb064f49af747010454f90 /tmp/go.tgz
5151
EOF
5252
sudo tar -C /usr/local -zxf /tmp/go.tgz && rm /tmp/go.tgz
5353

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
diff -urN a/rate/BUILD.bazel b/rate/BUILD.bazel
2+
--- a/rate/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000
3+
+++ b/rate/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
4+
@@ -8,6 +8,7 @@
5+
],
6+
importpath = "golang.org/x/time/rate",
7+
visibility = ["//visibility:public"],
8+
+ deps = ["@com_github_cockroachdb_errors//:errors"],
9+
)
10+
11+
alias(
12+
diff -urN a/rate/rate.go b/rate/rate.go
13+
--- a/rate/rate.go 1970-01-01 00:00:00.000000000 +0000
14+
+++ b/rate/rate.go 2000-01-01 00:00:00.000000000 -0000
15+
@@ -7,10 +7,11 @@
16+
17+
import (
18+
"context"
19+
- "fmt"
20+
"math"
21+
"sync"
22+
"time"
23+
+
24+
+ "github.com/cockroachdb/errors"
25+
)
26+
27+
// Limit defines the maximum frequency of some events.
28+
@@ -257,7 +258,7 @@
29+
lim.mu.Unlock()
30+
31+
if n > burst && limit != Inf {
32+
- return fmt.Errorf("rate: Wait(n=%d) exceeds limiter's burst %d", n, burst)
33+
+ return errors.Newf("rate: Wait(n=%d) exceeds limiter's burst %d", n, burst)
34+
}
35+
// Check if ctx is already cancelled
36+
select {
37+
@@ -273,7 +274,7 @@
38+
// Reserve
39+
r := lim.reserveN(t, n, waitLimit)
40+
if !r.ok {
41+
- return fmt.Errorf("rate: Wait(n=%d) would exceed context deadline", n)
42+
+ return errors.Newf("rate: Wait(n=%d) would exceed context deadline", n)
43+
}
44+
// Wait if necessary
45+
delay := r.DelayFrom(t)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4eca4292cae8f25b834db7001ff25284b1f9ccfa
1+
309f11146b97839ffbba1ac245b7aa901e3dbbcb

build/teamcity/internal/release/build-and-publish-patched-go/impl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
set -xeuo pipefail
1010

1111
# When updating to a new Go version, update all of these variables.
12-
GOVERS=1.23.7
12+
GOVERS=1.23.12
1313
GOCOMMIT=$(grep -v ^# /bootstrap/commit.txt | head -n1)
1414
# We use this for bootstrapping (this is NOT re-published). Note the version
1515
# matches the version we're publishing, although it doesn't technically have to.
1616
GOLINUXLINK=https://go.dev/dl/go$GOVERS.linux-amd64.tar.gz
17-
LINUXSHASUM=4741525e69841f2e22f9992af25df0c1112b07501f61f741c12c6389fcb119f3
17+
LINUXSHASUM=d3847fef834e9db11bf64e3fb34db9c04db14e068eeb064f49af747010454f90
1818
1919
apt-get update
2020
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \

go.mod

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cockroachdb/cockroach
22

3-
go 1.23.7
3+
go 1.23.12
44

55
// golang.org/x/* packages are maintained and curated by the go project, just
66
// without the backwards compatibility promises the standard library, and thus
@@ -10,17 +10,17 @@ go 1.23.7
1010
// merge of any upgrades we should communicate to all teams to be on the lookout
1111
// for behavior changes, just like we would after a go upgrade.
1212
require (
13-
golang.org/x/crypto v0.40.0
13+
golang.org/x/crypto v0.41.0
1414
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
1515
golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect
16-
golang.org/x/mod v0.26.0 // indirect
17-
golang.org/x/net v0.42.0
18-
golang.org/x/oauth2 v0.28.0
16+
golang.org/x/mod v0.27.0 // indirect
17+
golang.org/x/net v0.43.0
18+
golang.org/x/oauth2 v0.30.0
1919
golang.org/x/sync v0.16.0
20-
golang.org/x/sys v0.34.0
21-
golang.org/x/text v0.27.0
22-
golang.org/x/time v0.11.0
23-
golang.org/x/tools v0.35.0
20+
golang.org/x/sys v0.35.0
21+
golang.org/x/text v0.28.0
22+
golang.org/x/time v0.12.0
23+
golang.org/x/tools v0.36.0
2424
)
2525

2626
// The following dependencies are key infrastructure dependencies and
@@ -257,7 +257,7 @@ require (
257257
go.opentelemetry.io/otel/trace v1.17.0
258258
go.opentelemetry.io/proto/otlp v0.11.0
259259
golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5
260-
golang.org/x/term v0.33.0
260+
golang.org/x/term v0.34.0
261261
golang.org/x/tools/go/vcs v0.1.0-deprecated
262262
gonum.org/v1/gonum v0.15.1
263263
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9
@@ -461,7 +461,7 @@ require (
461461
go.uber.org/zap v1.19.0 // indirect
462462
golang.org/x/image v0.21.0 // indirect
463463
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
464-
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
464+
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
465465
gonum.org/v1/plot v0.14.0 // indirect
466466
google.golang.org/appengine v1.6.7 // indirect
467467
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230525234009-2805bf891e89 // indirect
@@ -500,8 +500,6 @@ replace gopkg.in/yaml.v2 => github.com/cockroachdb/yaml v0.0.0-20210825132133-2d
500500

501501
replace github.com/docker/docker => github.com/moby/moby v24.0.6+incompatible
502502

503-
replace golang.org/x/time => github.com/cockroachdb/x-time v0.3.1-0.20230525123634-71747adb5d5c
504-
505503
replace github.com/gogo/protobuf => github.com/cockroachdb/gogoproto v1.3.3-0.20241216150617-2358cdb156a1
506504

507505
replace storj.io/drpc => github.com/cockroachdb/drpc v0.0.0-20250807091527-65dcebaa113e

0 commit comments

Comments
 (0)