From 2e9057374c6ff39f0fe1f5f87341dc470766ea22 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Wed, 11 Oct 2023 17:03:45 -0500 Subject: [PATCH] *: upgrade to Golang 1.19.13 Epic: none Release note (general change): update Go version to 1.19.13 Release justification: update Golang patch release --- .bazelrc | 2 +- WORKSPACE | 22 +++++++++---------- build/README.md | 9 ++++---- build/bazelutil/distdir_files.bzl | 14 ++++++------ build/bootstrap/bootstrap-debian.sh | 4 ++-- .../build-and-publish-patched-go/impl-fips.sh | 2 +- .../build-and-publish-patched-go/impl.sh | 6 ++--- pkg/cmd/roachtest/tests/go_helpers.go | 4 ++-- 8 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.bazelrc b/.bazelrc index ea549ed1da14..b347fb7ba2c7 100644 --- a/.bazelrc +++ b/.bazelrc @@ -74,7 +74,7 @@ build:crosslinuxfips '--workspace_status_command=./build/bazelutil/stamp.sh x86_ build:crosslinuxfips --config=crosslinuxfipsbase build:crosslinuxfipsbase --platforms=//build/toolchains:cross_linux build:crosslinuxfipsbase --config=cross -build:crosslinuxfipsbase --@io_bazel_rules_go//go/toolchain:sdk_version=1.19.10fips +build:crosslinuxfipsbase --@io_bazel_rules_go//go/toolchain:sdk_version=1.19.13fips build:crosswindows '--workspace_status_command=./build/bazelutil/stamp.sh x86_64-w64-mingw32' build:crosswindows --config=crosswindowsbase build:crosswindowsbase --platforms=//build/toolchains:cross_windows diff --git a/WORKSPACE b/WORKSPACE index 1a9f94bdaba0..6cb08e3ca6ca 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -162,15 +162,15 @@ load( go_download_sdk( name = "go_sdk", sdks = { - "darwin_amd64": ("go1.19.10.darwin-amd64.tar.gz", "48361d76271f9a725942bdc17012ae9fef72359f7b0aa303deb1098e05ef818c"), - "darwin_arm64": ("go1.19.10.darwin-arm64.tar.gz", "7cc8ab7e8e1225b57f44ec8fb26bce70ddea8e076dfdf118ed63fef0c9ff19fb"), - "freebsd_amd64": ("go1.19.10.freebsd-amd64.tar.gz", "0d22265662eaa9b8136223f8ab68f5c06c58c6a6311748fb810e830ebd17cbe2"), - "linux_amd64": ("go1.19.10.linux-amd64.tar.gz", "dfc8a696686d00065ba374209a3a7858926641e0fb55741dd89c357446d69a1e"), - "linux_arm64": ("go1.19.10.linux-arm64.tar.gz", "e36d6ebfce3f244e245a2969f83d26c8dff2bf8b72207822d9d66829cd93d067"), - "windows_amd64": ("go1.19.10.windows-amd64.tar.gz", "dab9df83e0768ff96eddd85a4def88db05ce5a8a0c439abcecd066888906c516"), + "darwin_amd64": ("go1.19.13.darwin-amd64.tar.gz", "98eae563d602271866830199958413a2354a1ea77311b7bd44597f632eab3555"), + "darwin_arm64": ("go1.19.13.darwin-arm64.tar.gz", "74d5abe1ae5bed5556c4a158d0eecd51ac470ff9a920acf14bbfa10e2f7650a8"), + "freebsd_amd64": ("go1.19.13.freebsd-amd64.tar.gz", "97fd4990c5349ab922b9bf3e4c655e899135559ea6ad666d4b3c7a27b1e147a2"), + "linux_amd64": ("go1.19.13.linux-amd64.tar.gz", "3586f3e01bc1946321efbe752df39ad61d9697d59080a656096f0622b2ceb10f"), + "linux_arm64": ("go1.19.13.linux-arm64.tar.gz", "a5cf4bce57682560152f918b587e2af2e2eac499ae4d851d78138269147a11c7"), + "windows_amd64": ("go1.19.13.windows-amd64.tar.gz", "991137d500e0f2feb412bdc7e9c7c0a9e99ff0912b27264894740233bb3086a7"), }, - urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/{}"], - version = "1.19.10", + urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/{}"], + version = "1.19.13", ) # To point to a local SDK path, use the following instead. We'll call the @@ -608,8 +608,8 @@ distdir_repositories() go_download_sdk( name = "go_sdk_fips", sdks = { - "linux_amd64": ("go1.19.10fips.linux-amd64.tar.gz", "c9348fc964fb2893471a6ba91feead205a6f83cd427bc3847949382417005496"), + "linux_amd64": ("go1.19.13fips.linux-amd64.tar.gz", "13e5a63e9b29c178fb003c428c95c0a09e84840caebe95c5406b11a7dc99d7aa"), }, - urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/{}"], - version = "1.19.10fips", + urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/{}"], + version = "1.19.13fips", ) diff --git a/build/README.md b/build/README.md index e713aaf77782..40d632312a4e 100644 --- a/build/README.md +++ b/build/README.md @@ -85,6 +85,10 @@ process" below): ## Basic Process +**NOTE: This describes how to update the old-fashioned `make`-based builder +image. This is no longer maintained. Wherever it's used, you should stop +using it.** + - Edit `build/builder/Dockerfile` as desired. - Run `build/builder.sh init` to test -- this will build the image locally. The result of `init` is a docker image version which you can subsequently @@ -107,9 +111,7 @@ Please copy this checklist (based on [Basic Process](#basic-process)) into the r back to this document and perform these steps: * [ ] 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. * [ ] 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. @@ -117,12 +119,9 @@ back to this document and perform these steps: * [ ] 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 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:` and `go`). -* [ ] 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) You can test the new builder image in TeamCity by using the custom parameters diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index 41e177c7cadb..843a29f512d9 100644 --- a/build/bazelutil/distdir_files.bzl +++ b/build/bazelutil/distdir_files.bzl @@ -1175,13 +1175,13 @@ DISTDIR_FILES = { "https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-201514/libproj_foreign.macos.20230718-201514.tar.gz": "a3480b7bf2062b310e91bc8b65b2c67cd5f948857efc9bb3c574e35e6a997cf5", "https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-201514/libproj_foreign.macosarm.20230718-201514.tar.gz": "09848d2e4efff4b3984a733a5d913687c6c886b28b059a33be778802b9694675", "https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-201514/libproj_foreign.windows.20230718-201514.tar.gz": "3b8be5bf316c21860b0bb9d2a11100b98107d43594629029e2d254cfe8d8772d", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.darwin-amd64.tar.gz": "48361d76271f9a725942bdc17012ae9fef72359f7b0aa303deb1098e05ef818c", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.darwin-arm64.tar.gz": "7cc8ab7e8e1225b57f44ec8fb26bce70ddea8e076dfdf118ed63fef0c9ff19fb", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.freebsd-amd64.tar.gz": "0d22265662eaa9b8136223f8ab68f5c06c58c6a6311748fb810e830ebd17cbe2", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.linux-amd64.tar.gz": "dfc8a696686d00065ba374209a3a7858926641e0fb55741dd89c357446d69a1e", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.linux-arm64.tar.gz": "e36d6ebfce3f244e245a2969f83d26c8dff2bf8b72207822d9d66829cd93d067", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10.windows-amd64.tar.gz": "dab9df83e0768ff96eddd85a4def88db05ce5a8a0c439abcecd066888906c516", - "https://storage.googleapis.com/public-bazel-artifacts/go/20230614-165357/go1.19.10fips.linux-amd64.tar.gz": "c9348fc964fb2893471a6ba91feead205a6f83cd427bc3847949382417005496", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.darwin-amd64.tar.gz": "98eae563d602271866830199958413a2354a1ea77311b7bd44597f632eab3555", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.darwin-arm64.tar.gz": "74d5abe1ae5bed5556c4a158d0eecd51ac470ff9a920acf14bbfa10e2f7650a8", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.freebsd-amd64.tar.gz": "97fd4990c5349ab922b9bf3e4c655e899135559ea6ad666d4b3c7a27b1e147a2", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.linux-amd64.tar.gz": "3586f3e01bc1946321efbe752df39ad61d9697d59080a656096f0622b2ceb10f", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.linux-arm64.tar.gz": "a5cf4bce57682560152f918b587e2af2e2eac499ae4d851d78138269147a11c7", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13.windows-amd64.tar.gz": "991137d500e0f2feb412bdc7e9c7c0a9e99ff0912b27264894740233bb3086a7", + "https://storage.googleapis.com/public-bazel-artifacts/go/20231011-223645/go1.19.13fips.linux-amd64.tar.gz": "13e5a63e9b29c178fb003c428c95c0a09e84840caebe95c5406b11a7dc99d7aa", "https://storage.googleapis.com/public-bazel-artifacts/gomod/github.com/bazelbuild/buildtools/v0.0.0-20200718160251-b1667ff58f71/buildtools-v0.0.0-20200718160251-b1667ff58f71.tar.gz": "a9ef5103739dfb5ed2a5b47ab1654842a89695812e4af09e57d7015a5caf97e0", "https://storage.googleapis.com/public-bazel-artifacts/java/railroad/rr-1.63-java8.zip": "d2791cd7a44ea5be862f33f5a9b3d40aaad9858455828ebade7007ad7113fb41", "https://storage.googleapis.com/public-bazel-artifacts/js/rules_jest-v0.18.4.tar.gz": "d3bb833f74b8ad054e6bff5e41606ff10a62880cc99e4d480f4bdfa70add1ba7", diff --git a/build/bootstrap/bootstrap-debian.sh b/build/bootstrap/bootstrap-debian.sh index 4c069936a458..5d97d07891d9 100755 --- a/build/bootstrap/bootstrap-debian.sh +++ b/build/bootstrap/bootstrap-debian.sh @@ -45,9 +45,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.19.10.linux-amd64.tar.gz > /tmp/go.tgz +curl -fsSL https://dl.google.com/go/go1.19.13.linux-amd64.tar.gz > /tmp/go.tgz sha256sum -c - < /tmp/go.tgz`, + ctx, t, c, node, "download go", `curl -fsSL https://dl.google.com/go/go1.19.13.linux-amd64.tar.gz > /tmp/go.tgz`, ); err != nil { t.Fatal(err) } if err := repeatRunE( ctx, t, c, node, "verify tarball", `sha256sum -c - <