Skip to content

Commit

Permalink
*: upgrade golang to 1.17.10
Browse files Browse the repository at this point in the history
* [ ] 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))
* [ ] Download ALL the archives (`.tar.gz`, `.zip`) for the new Go version from https://golang.org/dl/ and mirror them in the `public-bazel-artifacts` bucket in the `Bazel artifacts` project in GCP (sub-directory `go`, next to the other Go SDK's).
* [ ] 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 mirrored 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`. You may also need to rerun `make vendor_rebuild` if vendoring has changed.
* [ ] 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)

I also tweaked `bootstrap-debian.sh` to additionally install
`libresolv-wrapper`, which fixes an issue with building w/ pre-built
`c-deps` in `--config=dev`.

Closes #81839.

Release note: None
  • Loading branch information
rickystewart committed May 25, 2022
1 parent 4dc4279 commit 15f149c
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 36 deletions.
28 changes: 14 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,22 @@ load(
go_download_sdk(
name = "go_sdk",
sdks = {
"darwin_amd64": ("go1.17.6.darwin-amd64.tar.gz", "874bc6f95e07697380069a394a21e05576a18d60f4ba178646e1ebed8f8b1f89"),
"darwin_arm64": ("go1.17.6.darwin-arm64.tar.gz", "dc54f3f4099e2be9e9c33bf926a7dc3ad64f34717142f7abcaff9ae44bc03d0c"),
"freebsd_386": ("go1.17.6.freebsd-386.tar.gz", "d5fbe0292fc0ae734041d54a5614712fa50337c76927df7bc749c27a543ed6a2"),
"freebsd_amd64": ("go1.17.6.freebsd-amd64.tar.gz", "2b759b0eb1fc25bc1da5612ac13f60c4bf4cd6f3c7e4f3fe3476f454d08de318"),
"linux_386": ("go1.17.6.linux-386.tar.gz", "06c50fb0d44bb03dd4ea8795f9448379c5825d2765307b51f66905084c3ba541"),
"linux_amd64": ("go1.17.6.linux-amd64.tar.gz", "231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2"),
"linux_arm64": ("go1.17.6.linux-arm64.tar.gz", "82c1a033cce9bc1b47073fd6285233133040f0378439f3c4659fe77cc534622a"),
"linux_armv6l": ("go1.17.6.linux-armv6l.tar.gz", "9ac723e6b41cb7c3651099a09332a8a778b69aa63a5e6baaa47caf0d818e2d6d"),
"linux_ppc64le": ("go1.17.6.linux-ppc64le.tar.gz", "adc35c920b8c0253d4dd001f8979e0db4c6111a60cd5e0785a8bee95dba1fcaa"),
"linux_s390x": ("go1.17.6.linux-s390x.tar.gz", "ccb2d4509db846be7055d1105b28154e72cd43162c4ef79c38a936a3e6f26e1d"),
"windows_386": ("go1.17.6.windows-386.zip", "3809c4e40482ff047200c8b1e22a43a2c9c79b53ef540668d2b00f7228f093aa"),
"windows_amd64": ("go1.17.6.windows-amd64.zip", "5bf8f87aec7edfc08e6bc845f1c30dba6de32b863f89ae46553ff4bbcc1d4954"),
"windows_arm64": ("go1.17.6.windows-arm64.zip", "c794af7c7fe32207df2c30a39cad1cca2e382c82a4e9493499fc2feab5967ca0"),
"darwin_amd64": ("go1.17.10.darwin-amd64.tar.gz", "84979d5985c70cee6f303050a7e811440aad7f304efdf28665b200f096b01945"),
"darwin_arm64": ("go1.17.10.darwin-arm64.tar.gz", "32098bea40117ea1ec23e7124cd188db6bdddd0ea41e2ec9bea3ba35a487e39c"),
"freebsd_386": ("go1.17.10.freebsd-386.tar.gz", "37f005846d70f477e89fcf7279f8869c28ba1d266cebf794d2f7a79a1e2127ec"),
"freebsd_amd64": ("go1.17.10.freebsd-amd64.tar.gz", "33794d96f58608fdc023c5114ae9baeeb4111a74720c8830ff25029debe508f0"),
"linux_386": ("go1.17.10.linux-386.tar.gz", "5c45aad27c3091b07517ed57df5650dad5b3b71111cebdf83153878f140ad981"),
"linux_amd64": ("go1.17.10.linux-amd64.tar.gz", "87fc728c9c731e2f74e4a999ef53cf07302d7ed3504b0839027bd9c10edaa3fd"),
"linux_arm64": ("go1.17.10.linux-arm64.tar.gz", "649141201efa7195403eb1301b95dc79c5b3e65968986a391da1370521701b0c"),
"linux_armv6l": ("go1.17.10.linux-armv6l.tar.gz", "ad2d9053011c24be07c39f337f4a31987381d905874acbf2570511e050418dd3"),
"linux_ppc64le": ("go1.17.10.linux-ppc64le.tar.gz", "4e2310864fa9d5a4e2d589dbc5fcd98ce8c4cd25320b335efed04dc67765e66c"),
"linux_s390x": ("go1.17.10.linux-s390x.tar.gz", "e1df61f29fb0962b89d7bfe18b7db45eee003d5f8a1a7ff4d9e54616689076bf"),
"windows_386": ("go1.17.10.windows-386.zip", "60840a079a04c838dc44b7d48f74ac37506298d34d2a002ced48831ccce6bdae"),
"windows_amd64": ("go1.17.10.windows-amd64.zip", "ba9198a29fa5c4f322212d21569e8507165c3b34e1ed1f1f9cf6dfb71ddcdeb2"),
"windows_arm64": ("go1.17.10.windows-arm64.zip", "9d06da8d3e9c3f4a5905c4ea9cb271294e2ff956926380322feb2561e84b4d68"),
},
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/{}"],
version = "1.17.6",
version = "1.17.10",
)

# To point to a local SDK path, use the following instead. We'll call the
Expand Down
1 change: 1 addition & 0 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ back to this document and perform these steps:
* [ ] Rebuild and push the Docker image (following [Basic Process](#basic-process))
* [ ] Download ALL the archives (`.tar.gz`, `.zip`) for the new Go version from https://golang.org/dl/ and mirror them in the `public-bazel-artifacts` bucket in the `Bazel artifacts` project in GCP (sub-directory `go`, next to the other Go SDK's).
* [ ] 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 mirrored 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`. You may also need to rerun `make vendor_rebuild` if vendoring has changed.
Expand Down
26 changes: 13 additions & 13 deletions build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -970,19 +970,19 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20220520-181309/libproj_foreign.macos.20220520-181309.tar.gz": "aa618a6525c0df669ce1231c837dc46a1a789d54231ae3dcfcada599d0845b22",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20220520-181309/libproj_foreign.macosarm.20220520-181309.tar.gz": "e3206fa7c2544d1817103c3c61f132d342b5d4a07404d1de4582da968b622749",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20220520-181309/libproj_foreign.windows.20220520-181309.tar.gz": "4d935601d1b989ff020c66011355a0e2985abacf36f9d952f7f1ce34d54684ad",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.darwin-amd64.tar.gz": "874bc6f95e07697380069a394a21e05576a18d60f4ba178646e1ebed8f8b1f89",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.darwin-arm64.tar.gz": "dc54f3f4099e2be9e9c33bf926a7dc3ad64f34717142f7abcaff9ae44bc03d0c",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.freebsd-386.tar.gz": "d5fbe0292fc0ae734041d54a5614712fa50337c76927df7bc749c27a543ed6a2",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.freebsd-amd64.tar.gz": "2b759b0eb1fc25bc1da5612ac13f60c4bf4cd6f3c7e4f3fe3476f454d08de318",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-386.tar.gz": "06c50fb0d44bb03dd4ea8795f9448379c5825d2765307b51f66905084c3ba541",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-amd64.tar.gz": "231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-arm64.tar.gz": "82c1a033cce9bc1b47073fd6285233133040f0378439f3c4659fe77cc534622a",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-armv6l.tar.gz": "9ac723e6b41cb7c3651099a09332a8a778b69aa63a5e6baaa47caf0d818e2d6d",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-ppc64le.tar.gz": "adc35c920b8c0253d4dd001f8979e0db4c6111a60cd5e0785a8bee95dba1fcaa",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.linux-s390x.tar.gz": "ccb2d4509db846be7055d1105b28154e72cd43162c4ef79c38a936a3e6f26e1d",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.windows-386.zip": "3809c4e40482ff047200c8b1e22a43a2c9c79b53ef540668d2b00f7228f093aa",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.windows-amd64.zip": "5bf8f87aec7edfc08e6bc845f1c30dba6de32b863f89ae46553ff4bbcc1d4954",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.6.windows-arm64.zip": "c794af7c7fe32207df2c30a39cad1cca2e382c82a4e9493499fc2feab5967ca0",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.darwin-amd64.tar.gz": "84979d5985c70cee6f303050a7e811440aad7f304efdf28665b200f096b01945",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.darwin-arm64.tar.gz": "32098bea40117ea1ec23e7124cd188db6bdddd0ea41e2ec9bea3ba35a487e39c",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.freebsd-386.tar.gz": "37f005846d70f477e89fcf7279f8869c28ba1d266cebf794d2f7a79a1e2127ec",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.freebsd-amd64.tar.gz": "33794d96f58608fdc023c5114ae9baeeb4111a74720c8830ff25029debe508f0",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-386.tar.gz": "5c45aad27c3091b07517ed57df5650dad5b3b71111cebdf83153878f140ad981",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-amd64.tar.gz": "87fc728c9c731e2f74e4a999ef53cf07302d7ed3504b0839027bd9c10edaa3fd",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-arm64.tar.gz": "649141201efa7195403eb1301b95dc79c5b3e65968986a391da1370521701b0c",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-armv6l.tar.gz": "ad2d9053011c24be07c39f337f4a31987381d905874acbf2570511e050418dd3",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-ppc64le.tar.gz": "4e2310864fa9d5a4e2d589dbc5fcd98ce8c4cd25320b335efed04dc67765e66c",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.linux-s390x.tar.gz": "e1df61f29fb0962b89d7bfe18b7db45eee003d5f8a1a7ff4d9e54616689076bf",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.windows-386.zip": "60840a079a04c838dc44b7d48f74ac37506298d34d2a002ced48831ccce6bdae",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.windows-amd64.zip": "ba9198a29fa5c4f322212d21569e8507165c3b34e1ed1f1f9cf6dfb71ddcdeb2",
"https://storage.googleapis.com/public-bazel-artifacts/go/go1.17.10.windows-arm64.zip": "9d06da8d3e9c3f4a5905c4ea9cb271294e2ff956926380322feb2561e84b4d68",
"https://storage.googleapis.com/public-bazel-artifacts/java/railroad/rr-1.63-java8.zip": "d2791cd7a44ea5be862f33f5a9b3d40aaad9858455828ebade7007ad7113fb41",
"https://storage.googleapis.com/public-bazel-artifacts/js/node/v16.13.0/node-v16.13.0-darwin-arm64.tar.gz": "46d83fc0bd971db5050ef1b15afc44a6665dee40bd6c1cbaec23e1b40fa49e6d",
"https://storage.googleapis.com/public-bazel-artifacts/js/node/v16.13.0/node-v16.13.0-darwin-x64.tar.gz": "37e09a8cf2352f340d1204c6154058d81362fef4ec488b0197b2ce36b3f0367a",
Expand Down
5 changes: 3 additions & 2 deletions build/bootstrap/bootstrap-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo apt-get install -y --no-install-recommends \
ccache \
docker.io \
libncurses-dev \
libresolv-wrapper \
make \
gcc \
g++ \
Expand All @@ -45,9 +46,9 @@ sudo tar -C /usr --strip-components=1 -zxf /tmp/cmake.tgz && rm /tmp/cmake.tgz

# Install Go.
trap 'rm -f /tmp/go.tgz' EXIT
curl -fsSL https://dl.google.com/go/go1.17.6.linux-amd64.tar.gz > /tmp/go.tgz
curl -fsSL https://dl.google.com/go/go1.17.10.linux-amd64.tar.gz > /tmp/go.tgz
sha256sum -c - <<EOF
231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2 /tmp/go.tgz
87fc728c9c731e2f74e4a999ef53cf07302d7ed3504b0839027bd9c10edaa3fd /tmp/go.tgz
EOF
sudo tar -C /usr/local -zxf /tmp/go.tgz && rm /tmp/go.tgz

Expand Down
2 changes: 1 addition & 1 deletion build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

image=cockroachdb/builder
version=20220518-202803
version=20220525-185738

function init() {
docker build --tag="${image}" "$(dirname "${0}")/builder"
Expand Down
4 changes: 2 additions & 2 deletions build/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-
# releases of Go will no longer be run in CI once it is changed. Consider
# bumping the minimum allowed version of Go in /build/go-version-check.sh.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends golang \
&& curl -fsSL https://storage.googleapis.com/golang/go1.17.6.src.tar.gz -o golang.tar.gz \
&& echo '4dc1bbf3ff61f0c1ff2b19355e6d88151a70126268a47c761477686ef94748c8 golang.tar.gz' | sha256sum -c - \
&& curl -fsSL https://storage.googleapis.com/golang/go1.17.10.src.tar.gz -o golang.tar.gz \
&& echo '299e55af30f15691b015d8dcf8ecae72412412569e5b2ece20361753a456f2f9 golang.tar.gz' | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz \
&& cd /usr/local/go/src \
Expand Down
4 changes: 2 additions & 2 deletions build/packer/teamcity-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ EOF
tar --strip-components=1 -C /usr -xzf /tmp/cmake.tar.gz
rm -f /tmp/cmake.tar.gz

curl -fsSL https://dl.google.com/go/go1.17.6.linux-amd64.tar.gz > /tmp/go.tgz
curl -fsSL https://dl.google.com/go/go1.17.10.linux-amd64.tar.gz > /tmp/go.tgz
sha256sum -c - <<EOF
231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2 /tmp/go.tgz
87fc728c9c731e2f74e4a999ef53cf07302d7ed3504b0839027bd9c10edaa3fd /tmp/go.tgz
EOF
tar -C /usr/local -zxf /tmp/go.tgz && rm /tmp/go.tgz

Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/roachtest/tests/go_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ func installGolang(
}

if err := repeatRunE(
ctx, t, c, node, "download go", `curl -fsSL https://dl.google.com/go/go1.17.6.linux-amd64.tar.gz > /tmp/go.tgz`,
ctx, t, c, node, "download go", `curl -fsSL https://dl.google.com/go/go1.17.10.linux-amd64.tar.gz > /tmp/go.tgz`,
); err != nil {
t.Fatal(err)
}
if err := repeatRunE(
ctx, t, c, node, "verify tarball", `sha256sum -c - <<EOF
231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2 /tmp/go.tgz
87fc728c9c731e2f74e4a999ef53cf07302d7ed3504b0839027bd9c10edaa3fd /tmp/go.tgz
EOF`,
); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 15f149c

Please sign in to comment.