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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,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.20.7fips
build:crosslinuxfipsbase --@io_bazel_rules_go//go/toolchain:sdk_version=1.21.5fips
build:crosswindows '--workspace_status_command=./build/bazelutil/stamp.sh x86_64-w64-mingw32'
build:crosswindows --config=crosswindowsbase
build:crosswindowsbase --platforms=//build/toolchains:cross_windows
Expand Down
63 changes: 32 additions & 31 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ http_archive(
strip_prefix = "rules_js-1.26.1",
url = "https://storage.googleapis.com/public-bazel-artifacts/js/rules_js-v1.26.1.tar.gz",
)

http_archive(
name = "aspect_rules_ts",
sha256 = "ace5b609603d9b5b875d56c9c07182357c4ee495030f40dcefb10d443ba8c208",
strip_prefix = "rules_ts-1.4.0",
url = "https://storage.googleapis.com/public-bazel-artifacts/js/rules_ts-v1.4.0.tar.gz",
)

# NOTE: aspect_rules_webpack exists for webpack, but it's incompatible with webpack v4.
http_archive(
name = "aspect_rules_jest",
Expand Down Expand Up @@ -163,15 +165,14 @@ load(
go_download_sdk(
name = "go_sdk",
sdks = {
"darwin_amd64": ("go1.20.10.darwin-amd64.tar.gz", "9f554a97818568cdcb58b8860ebdc0d25cbe7a6441e7f8fc9612c00330d3f145"),
"darwin_arm64": ("go1.20.10.darwin-arm64.tar.gz", "4920629c1e65cf28f4fb8c74d7b2f90a1bb6333df60d2fd7e756a3436209f004"),
"freebsd_amd64": ("go1.20.10.freebsd-amd64.tar.gz", "e337b8e645e37f52d04e5f91352b929e05fd74d960b2a1c8e78977e4777c4ffa"),
"linux_amd64": ("go1.20.10.linux-amd64.tar.gz", "cb95ca59edf9d15d6e7949395756f78542383b612abced2565ad2349213a36e3"),
"linux_arm64": ("go1.20.10.linux-arm64.tar.gz", "5fa30f7c4f39c96d31756d7eab6c560ac129caf0462512c9f1fc2afa00570778"),
"windows_amd64": ("go1.20.10.windows-amd64.tar.gz", "d84f04cf636033073c114ac5c51f38d948bf21bb53b3aa9442d362e970f94b32"),
"darwin_amd64": ("go1.21.5.darwin-amd64.tar.gz", "6878b009493b8b2e5518b090209f63af478a6bdf889c6db4d3c6b68e43839e8e"),
"darwin_arm64": ("go1.21.5.darwin-arm64.tar.gz", "1f3673055f681982bda589bfb23938cb83bef4030efd3516bed0dc3ebd125f41"),
"linux_amd64": ("go1.21.5.linux-amd64.tar.gz", "78e55b80d0a5ef27e8e0913321cae31ba9509c05ed79c429e489ae3a25c74885"),
"linux_arm64": ("go1.21.5.linux-arm64.tar.gz", "89fe32d10a4a3831154bc740bfbc89405a5a8de0655e0cbe91e5ad952dfd6a52"),
"windows_amd64": ("go1.21.5.windows-amd64.tar.gz", "350b40fb129d0eac7eafd5ea2044c6dd1ce8b5a43572f22ef02b53e3d999f28a"),
},
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/{}"],
version = "1.20.10",
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/{}"],
version = "1.21.5",
)

# To point to a local SDK path, use the following instead. We'll call the
Expand Down Expand Up @@ -214,8 +215,6 @@ http_archive(

http_archive(
name = "aspect_bazel_lib",
patch_args = ["-p1"],
patches = ["//build/patches:aspect_bazel_lib.patch"],
sha256 = "0da75299c5a52737b2ac39458398b3f256e41a1a6748e5457ceb3a6225269485",
strip_prefix = "bazel-lib-1.31.2",
url = "https://storage.googleapis.com/public-bazel-artifacts/bazel/bazel-lib-v1.31.2.tar.gz",
Expand All @@ -228,35 +227,39 @@ toolchain_dependencies()

# Configure nodeJS.
load("//build:nodejs.bzl", "declare_nodejs_repos")

declare_nodejs_repos()

# NOTE: The version is expected to match up to what version of typescript we
# use for all packages in pkg/ui.
# TODO(ricky): We should add a lint check to ensure it does match.
load("@aspect_rules_ts//ts/private:npm_repositories.bzl", ts_http_archive = "http_archive_version")

ts_http_archive(
name = "npm_typescript",
build_file = "@aspect_rules_ts//ts:BUILD.typescript",
urls = ["https://storage.googleapis.com/cockroach-npm-deps/typescript/-/typescript-{}.tgz"],
version = "5.1.6",
# v5.1.6 isn't known to rules_ts 1.4.0 (nor to any published rules_ts version as-of 7 Aug 2023).
integrity = "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
urls = ["https://storage.googleapis.com/cockroach-npm-deps/typescript/-/typescript-{}.tgz"],
version = "5.1.6",
)

# NOTE: The version is expected to match up to what version we use in db-console.
# TODO(ricky): We should add a lint check to ensure it does match.
load("@aspect_rules_js//npm:repositories.bzl", "npm_import")

npm_import(
name = "pnpm",
integrity = "sha512-W6elL7Nww0a/MCICkzpkbxW6f99TQuX4DuJoDjWp39X08PKDkEpg4cgj3d6EtgYADcdQWl/eM8NdlLJVE3RgpA==",
package = "pnpm",
url = "https://storage.googleapis.com/cockroach-npm-deps/pnpm/-/pnpm-8.5.1.tgz",
version = "8.5.1",
# Declare an @pnpm//:pnpm rule that can be called externally.
# Copied from https://github.com/aspect-build/rules_js/blob/14724d9b27b2c45f088aa003c091cbe628108170/npm/private/pnpm_repository.bzl#L27-L30
extra_build_content = "\n".join([
"""load("@aspect_rules_js//js:defs.bzl", "js_binary")""",
"""js_binary(name = "pnpm", entry_point = "package/dist/pnpm.cjs", visibility = ["//visibility:public"])""",
]),
integrity = "sha512-W6elL7Nww0a/MCICkzpkbxW6f99TQuX4DuJoDjWp39X08PKDkEpg4cgj3d6EtgYADcdQWl/eM8NdlLJVE3RgpA==",
package = "pnpm",
url = "https://storage.googleapis.com/cockroach-npm-deps/pnpm/-/pnpm-8.5.1.tgz",
version = "8.5.1",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
Expand All @@ -268,25 +271,26 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
data = [
"//pkg/ui:pnpm-workspace.yaml",
"//pkg/ui:package.json",
"//pkg/ui:pnpm-workspace.yaml",
"//pkg/ui/patches:[email protected]",
"//pkg/ui/workspaces/db-console/src/js:package.json",
"//pkg/ui/workspaces/db-console:package.json",
"//pkg/ui/workspaces/cluster-ui:package.json",
"//pkg/ui/workspaces/eslint-plugin-crdb:package.json",
"//pkg/ui/workspaces/db-console:package.json",
"//pkg/ui/workspaces/db-console/src/js:package.json",
"//pkg/ui/workspaces/e2e-tests:package.json",
"//pkg/ui/workspaces/eslint-plugin-crdb:package.json",
],
npmrc = "//pkg/ui:.npmrc.bazel",
patch_args = {
"*": ["-p1"]
"*": ["-p1"],
},
npmrc = "//pkg/ui:.npmrc.bazel",
pnpm_lock = "//pkg/ui:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", npm_repositories = "npm_repositories")
npm_repositories()

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

#################################
# end rules_js dependencies #
Expand Down Expand Up @@ -549,22 +553,18 @@ register_toolchains(
"//build/toolchains:cross_arm64_windows_toolchain",
"//build/toolchains:cross_arm64_macos_toolchain",
"//build/toolchains:cross_arm64_macos_arm_toolchain",
"//build/toolchains:node_freebsd_toolchain",
"@copy_directory_toolchains//:darwin_amd64_toolchain",
"@copy_directory_toolchains//:darwin_arm64_toolchain",
"@copy_directory_toolchains//:freebsd_amd64_toolchain",
"@copy_directory_toolchains//:linux_amd64_toolchain",
"@copy_directory_toolchains//:linux_arm64_toolchain",
"@copy_directory_toolchains//:windows_amd64_toolchain",
"@copy_to_directory_toolchains//:darwin_amd64_toolchain",
"@copy_to_directory_toolchains//:darwin_arm64_toolchain",
"@copy_to_directory_toolchains//:freebsd_amd64_toolchain",
"@copy_to_directory_toolchains//:linux_amd64_toolchain",
"@copy_to_directory_toolchains//:linux_arm64_toolchain",
"@copy_to_directory_toolchains//:windows_amd64_toolchain",
"@nodejs_toolchains//:darwin_amd64_toolchain",
"@nodejs_toolchains//:darwin_arm64_toolchain",
# NB: The freebsd node toolchain is above as //build/toolchains:node_freebsd_toolchain
"@nodejs_toolchains//:linux_amd64_toolchain",
"@nodejs_toolchains//:linux_arm64_toolchain",
"@nodejs_toolchains//:windows_amd64_toolchain",
Expand Down Expand Up @@ -605,6 +605,7 @@ http_archive(

# Cockroach binaries for use by mixed-version logictests.
load("//pkg/sql/logictest:REPOSITORIES.bzl", "cockroach_binaries_for_testing")

cockroach_binaries_for_testing()

load("//build/bazelutil:repositories.bzl", "distdir_repositories")
Expand All @@ -615,8 +616,8 @@ distdir_repositories()
go_download_sdk(
name = "go_sdk_fips",
sdks = {
"linux_amd64": ("go1.20.7fips.linux-amd64.tar.gz", "e153224976a6cc17cc24128609ef9eaf9fc94b33744ff00646ba36a6f448a074"),
"linux_amd64": ("go1.21.5fips.linux-amd64.tar.gz", "4368ab9cf7c8d75d6d33927917426d587f5be39fb18a87fbe2d59281a8569819"),
},
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/{}"],
version = "1.20.7fips",
urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/{}"],
version = "1.21.5fips",
)
13 changes: 6 additions & 7 deletions build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1188,13 +1188,12 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-202534/libproj_foreign.macos.20230718-202534.tar.gz": "96771a33542beb72067afcafaeb790134014e56798fa4cbe291894c4ebf8b68d",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-202534/libproj_foreign.macosarm.20230718-202534.tar.gz": "b2c60ffe1f50c6e81ba906f773b95d3a6699538d57e71749579552f4211a1e3e",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20230718-202534/libproj_foreign.windows.20230718-202534.tar.gz": "16de1e76ee8de4bd144dc57bfde05385d086943ca1b64cc246055c8b0cd71c65",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.darwin-amd64.tar.gz": "9f554a97818568cdcb58b8860ebdc0d25cbe7a6441e7f8fc9612c00330d3f145",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.darwin-arm64.tar.gz": "4920629c1e65cf28f4fb8c74d7b2f90a1bb6333df60d2fd7e756a3436209f004",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.freebsd-amd64.tar.gz": "e337b8e645e37f52d04e5f91352b929e05fd74d960b2a1c8e78977e4777c4ffa",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.linux-amd64.tar.gz": "cb95ca59edf9d15d6e7949395756f78542383b612abced2565ad2349213a36e3",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.linux-arm64.tar.gz": "5fa30f7c4f39c96d31756d7eab6c560ac129caf0462512c9f1fc2afa00570778",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.10.windows-amd64.tar.gz": "d84f04cf636033073c114ac5c51f38d948bf21bb53b3aa9442d362e970f94b32",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231011-170949/go1.20.7fips.linux-amd64.tar.gz": "e153224976a6cc17cc24128609ef9eaf9fc94b33744ff00646ba36a6f448a074",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5.darwin-amd64.tar.gz": "6878b009493b8b2e5518b090209f63af478a6bdf889c6db4d3c6b68e43839e8e",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5.darwin-arm64.tar.gz": "1f3673055f681982bda589bfb23938cb83bef4030efd3516bed0dc3ebd125f41",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5.linux-amd64.tar.gz": "78e55b80d0a5ef27e8e0913321cae31ba9509c05ed79c429e489ae3a25c74885",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5.linux-arm64.tar.gz": "89fe32d10a4a3831154bc740bfbc89405a5a8de0655e0cbe91e5ad952dfd6a52",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5.windows-amd64.tar.gz": "350b40fb129d0eac7eafd5ea2044c6dd1ce8b5a43572f22ef02b53e3d999f28a",
"https://storage.googleapis.com/public-bazel-artifacts/go/20231206-175156/go1.21.5fips.linux-amd64.tar.gz": "4368ab9cf7c8d75d6d33927917426d587f5be39fb18a87fbe2d59281a8569819",
"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",
"https://storage.googleapis.com/public-bazel-artifacts/js/rules_js-v1.26.1.tar.gz": "08061ba5e5e7f4b1074538323576dac819f9337a0c7d75aee43afc8ae7cb6e18",
Expand Down
4 changes: 2 additions & 2 deletions build/bootstrap/bootstrap-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,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.20.10.linux-amd64.tar.gz > /tmp/go.tgz
curl -fsSL https://dl.google.com/go/go1.21.5.linux-amd64.tar.gz > /tmp/go.tgz
sha256sum -c - <<EOF
80d34f1fd74e382d86c2d6102e0e60d4318461a7c2f457ec1efc4042752d4248 /tmp/go.tgz
a2e1d5743e896e5fe1e7d96479c0a769254aed18cf216cf8f4c3a2300a9b3923 /tmp/go.tgz
EOF
sudo tar -C /usr/local -zxf /tmp/go.tgz && rm /tmp/go.tgz

Expand Down
8 changes: 0 additions & 8 deletions build/nodejs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ _COPY_DIRECTORY_URL_PREFIX = "https://storage.googleapis.com/public-bazel-artifa
_COPY_DIRECTORY_VERSIONS = {
"darwin_amd64": "b4d39cd9498b8367ba75ad6c13c7687562dabafbf8c782883815314061f9f043",
"darwin_arm64": "1fd4268a242181d7cdbee7f8035b34548b895fd9e438fab05d48e4627e072e53",
"freebsd_amd64": "f874c274202ea767b432f05c62e716f51bd7580ea8efb1349eb29a35375408eb",
"linux_amd64": "ce4aaaf41b3b8f9589290d0f3d657400514b7361b9c27f85ac8f966ee4d663b8",
"linux_arm64": "51099a643689c2e563ab7cd9e14345dd9670ee4814ac4046501675d402decdf4",
"windows_amd64": "6df30928734abb48515ea16d1273a829651adb77b9ecbbe49e02d17cfffab519",
Expand All @@ -35,7 +34,6 @@ _COPY_TO_DIRECTORY_URL_PREFIX = "https://storage.googleapis.com/public-bazel-art
_COPY_TO_DIRECTORY_VERSIONS = {
"darwin_amd64": "dadf2fc200a14968664c4b740a76fcee700cb975eb5bfcd3215d253b97a28b23",
"darwin_arm64": "97ae06279adf44786c1151aa3e4715474603a4792fa64ec6bccb1b52fa00abc1",
"freebsd_amd64": "195becca548395db4f165e6ee1e3830b375641999f7820a2815ff52f31223981",
"linux_amd64": "cfac1d923b7039555265ecf1558200d391ffbed62804a4b8c4510b12a18d6e70",
"linux_arm64": "5c4c69f6f20ba0d6646435ad9922d6193871f3b4262cbc65295e4b89ece667a4",
"windows_amd64": "2be5d8b2771ffa3922438cda8899f782046633d6d230f744bf63031888a8bf48",
Expand Down Expand Up @@ -115,12 +113,6 @@ def declare_nodejs_repos():
node_version = _NODE_VERSION,
platform = name,
)
# This is used only by rules_nodejs to find the local version of node.
native.new_local_repository(
name = "nodejs_freebsd_amd64",
build_file_content = """exports_files[("bin/node")]""",
path = "/usr/local",
)
nodejs_repo_host_os_alias(name = "nodejs", user_node_repository_name = "nodejs")
nodejs_repo_host_os_alias(name = "nodejs_host", user_node_repository_name = "nodejs")
toolchains_repo(name = "nodejs_toolchains", user_node_repository_name = "nodejs")
Expand Down
62 changes: 0 additions & 62 deletions build/patches/aspect_bazel_lib.patch

This file was deleted.

Loading