diff --git a/.bazelrc b/.bazelrc index 2f1eeb1f96d1..efa8198721a7 100644 --- a/.bazelrc +++ b/.bazelrc @@ -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 diff --git a/WORKSPACE b/WORKSPACE index b2550f3e6d87..2f31c55ae56e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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", @@ -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 @@ -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", @@ -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") @@ -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:topojson@3.0.2.patch", - "//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 # @@ -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", @@ -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") @@ -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", ) diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index 07d9fa6f3be2..142711e12961 100644 --- a/build/bazelutil/distdir_files.bzl +++ b/build/bazelutil/distdir_files.bzl @@ -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", diff --git a/build/bootstrap/bootstrap-debian.sh b/build/bootstrap/bootstrap-debian.sh index c300f7095067..8562e9845581 100755 --- a/build/bootstrap/bootstrap-debian.sh +++ b/build/bootstrap/bootstrap-debian.sh @@ -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 - < 0 { // Flush assist credit to the global pool. This gives +diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go +index 92a7e021ee..2796baf922 100644 +--- a/src/runtime/runtime1.go ++++ b/src/runtime/runtime1.go +@@ -315,6 +315,7 @@ var debug struct { + gcpacertrace int32 + gcshrinkstackoff int32 + gcstoptheworld int32 ++ gcnoassist int32 + gctrace int32 + invalidptr int32 + madvdontneed int32 // for Linux; issue 28466 +@@ -348,6 +349,7 @@ var dbgvars = []*dbgVar{ + {name: "gcpacertrace", value: &debug.gcpacertrace}, + {name: "gcshrinkstackoff", value: &debug.gcshrinkstackoff}, + {name: "gcstoptheworld", value: &debug.gcstoptheworld}, ++ {name: "gcnoassist", value: &debug.gcnoassist}, + {name: "gctrace", value: &debug.gctrace}, + {name: "invalidptr", value: &debug.invalidptr}, + {name: "madvdontneed", value: &debug.madvdontneed}, diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go -index 9381d1e3f7..8182f8e9bc 100644 +index f4c76abd1c..57672bd8c5 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go -@@ -474,7 +474,6 @@ type g struct { - traceseq uint64 // trace event sequencer - tracelastp puintptr // last P emitted an event for this goroutine - lockedm muintptr -- sig uint32 - writebuf []byte - sigcode0 uintptr - sigcode1 uintptr -@@ -488,6 +487,9 @@ type g struct { - labels unsafe.Pointer // profiler labels - timer *timer // cached timer for time.Sleep - selectDone atomic.Uint32 // are we participating in a select and did someone win the race? -+ sig uint32 -+ lastsched int64 // timestamp when the G last started running -+ runningnanos int64 // wall time spent in the running state +@@ -477,7 +477,6 @@ type g struct { + trackingStamp int64 // timestamp of when the G last started being tracked + runnableTime int64 // the amount of time spent runnable, cleared when running, only used when tracking + lockedm muintptr +- sig uint32 + writebuf []byte + sigcode0 uintptr + sigcode1 uintptr +@@ -492,6 +491,9 @@ type g struct { + labels unsafe.Pointer // profiler labels + timer *timer // cached timer for time.Sleep + selectDone atomic.Uint32 // are we participating in a select and did someone win the race? ++ sig uint32 ++ lastsched int64 // timestamp when the G last started running ++ runningnanos int64 // wall time spent in the running state // goroutineProfiled indicates the status of this goroutine's stack for the // current in-progress goroutine profile diff --git a/src/runtime/sizeof_test.go b/src/runtime/sizeof_test.go -index 9ce0a3afcd..bfb5d6e33e 100644 +index fb9195481a..55e37287c2 100644 --- a/src/runtime/sizeof_test.go +++ b/src/runtime/sizeof_test.go -@@ -21,7 +21,7 @@ func TestSizeof(t *testing.T) { +@@ -21,6 +21,6 @@ func TestSizeof(t *testing.T) { _32bit uintptr // size on 32bit platforms _64bit uintptr // size on 64bit platforms }{ -- {runtime.G{}, 240, 392}, // g, but exported for testing -+ {runtime.G{}, 248, 400}, // g, but exported for testing +- {runtime.G{}, 252, 408}, // g, but exported for testing ++ {runtime.G{}, 260, 416}, // g, but exported for testing {runtime.Sudog{}, 56, 88}, // sudog, but exported for testing } +diff -ru a/src/context/context.go b/src/context/context.go +--- a/src/context/context.go ++++ b/src/context/context.go +@@ -472,17 +472,7 @@ + + if p, ok := parentCancelCtx(parent); ok { + // parent is a *cancelCtx, or derives from one. +- p.mu.Lock() +- if p.err != nil { +- // parent has already been canceled +- child.cancel(false, p.err, p.cause) +- } else { +- if p.children == nil { +- p.children = make(map[canceler]struct{}) +- } +- p.children[child] = struct{}{} +- } +- p.mu.Unlock() ++ p.addChild(child) + return + } + +@@ -510,6 +500,22 @@ + }() + } ++// addChild adds child to the list of children. ++// NB: CockroachDB runtime patch. ++func (c *cancelCtx) addChild(child canceler) { ++ c.mu.Lock() ++ if c.err != nil { ++ // parent has already been canceled ++ child.cancel(false, c.err, c.cause) ++ } else { ++ if c.children == nil { ++ c.children = make(map[canceler]struct{}) ++ } ++ c.children[child] = struct{}{} ++ } ++ c.mu.Unlock() ++} ++ + type stringer interface { + String() string + } +@@ -781,5 +787,35 @@ + default: + return c.Value(key) + } ++ } ++} ++ ++// CockroachDB runtime patch. ++// cancelerAdapter invokes f when cancel context completes. ++type cancelerAdapter struct { ++ *cancelCtx ++ f func() ++} ++ ++func (c *cancelerAdapter) cancel(removeFromParent bool, err, cause error) { ++ if removeFromParent { ++ removeChild(c.cancelCtx, c) + } ++ c.f() + } ++ ++// PropagateCancel arranges for f to be invoked when parent is done. ++// Parent must be one of the cancelable contexts. ++// Returns true if cancellation will be propagated, false if the parent ++// is not cancelable. ++// This is similar to AfterFunc(), but does not spin up goroutine, and instead ++// invokes f on whatever goroutine completed parent context. ++func PropagateCancel(parent Context, f func()) bool { ++ p, ok := parent.Value(&cancelCtxKey).(*cancelCtx) ++ if !ok { ++ return false ++ } ++ a := cancelerAdapter{cancelCtx: p, f: f} ++ p.addChild(&a) ++ return true ++} diff --git a/build/teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh b/build/teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh index 778f3e6c77bd..c9dd58f56c55 100755 --- a/build/teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh +++ b/build/teamcity/internal/release/build-and-publish-patched-go/impl-fips.sh @@ -4,8 +4,8 @@ set -xeuo pipefail # TODO: We may want to fork this repo and keep it up to date. GO_FIPS_REPO=https://github.com/golang-fips/go -GO_FIPS_COMMIT=go1.20-fips-release -GO_VERSION=1.20.7 +GO_FIPS_COMMIT=go1.21-fips-release +GO_VERSION=1.21.5 # Install build dependencies yum install git golang golang-bin openssl openssl-devel -y @@ -27,10 +27,12 @@ cd go/src # Apply the CRL patch patch -p2 < /bootstrap/diff.patch # add a special version modifier so we can explicitly use it in bazel -sed -i 's/$/fips/' ../VERSION +sed -i '1 s/$/fips/' ../VERSION ./make.bash -v cd ../.. GOVERS=$(go/bin/go env GOVERSION) GOOS=$(go/bin/go env GOOS) GOARCH=$(go/bin/go env GOARCH) tar cf - go | gzip -9 > /artifacts/$GOVERS.$GOOS-$GOARCH.tar.gz + +sha256sum /artifacts/$GOVERS.$GOOS-$GOARCH.tar.gz diff --git a/build/teamcity/internal/release/build-and-publish-patched-go/impl.sh b/build/teamcity/internal/release/build-and-publish-patched-go/impl.sh index 7e37dca806c6..450d74628d78 100755 --- a/build/teamcity/internal/release/build-and-publish-patched-go/impl.sh +++ b/build/teamcity/internal/release/build-and-publish-patched-go/impl.sh @@ -3,12 +3,13 @@ set -xeuo pipefail # When updating to a new Go version, update all of these variables. -GOVERS=1.20.10 +GOVERS=1.21.5 GOLINK=https://go.dev/dl/go$GOVERS.src.tar.gz -SRCSHASUM=72d2f51805c47150066c103754c75fddb2c19d48c9219fa33d1e46696c841dbb -# We mirror the upstream freebsd because we don't have a cross-compiler targeting it. -GOFREEBSDLINK=https://go.dev/dl/go$GOVERS.freebsd-amd64.tar.gz -FREEBSDSHASUM=e337b8e645e37f52d04e5f91352b929e05fd74d960b2a1c8e78977e4777c4ffa +SRCSHASUM=285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19 +# We use this for bootstrapping (this is NOT re-published). Note the version +# matches the version we're publishing, although it doesn't technically have to. +GOLINUXLINK=https://go.dev/dl/go$GOVERS.linux-amd64.tar.gz +LINUXSHASUM=e2bc0b3e4b64111ec117295c088bde5f00eeed1567999ff77bc859d7df70078e apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -27,11 +28,8 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100 \ --slave /usr/bin/clang++ clang++ /usr/bin/clang++-10 -curl -fsSL $GOFREEBSDLINK -o /artifacts/go$GOVERS.freebsd-amd64.tar.gz -echo "$FREEBSDSHASUM /artifacts/go$GOVERS.freebsd-amd64.tar.gz" | sha256sum -c - - -curl -fsSL https://go.dev/dl/go1.20.8.linux-amd64.tar.gz -o golang.tar.gz \ - && echo 'cc97c28d9c252fbf28f91950d830201aa403836cbed702a05932e63f7f0c7bc4 golang.tar.gz' | sha256sum -c - \ +curl -fsSL $GOLINUXLINK -o golang.tar.gz \ + && echo "$LINUXSHASUM golang.tar.gz" | sha256sum -c - \ && rm -rf /usr/local/go && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index ddd7224219a9..a45384c27c8f 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -270,20 +270,6 @@ toolchain( toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) -toolchain( - name = "node_freebsd_toolchain", - exec_compatible_with = [ - "@platforms//os:freebsd", - ], - toolchain = ":node_freebsd_local_toolchain", - toolchain_type = "@rules_nodejs//nodejs:toolchain_type", -) - -node_toolchain( - name = "node_freebsd_local_toolchain", - target_tool_path = "/usr/local/bin/node", -) - # There are aliases for each of these flags defined in .bazelrc; for example, # --crdb_test instead of --//build/toolchains:crdb_test_flag. # diff --git a/go.mod b/go.mod index 79b8dfa17096..e60dbcea3872 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cockroachdb/cockroach -go 1.20 +go 1.21 // The following dependencies are key infrastructure dependencies and // should be updated as their own commit (i.e. not bundled with a dep diff --git a/go.sum b/go.sum index 0b901c3fbb60..a42b59a49a2c 100644 --- a/go.sum +++ b/go.sum @@ -243,6 +243,7 @@ github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSd github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.5.0 h1:i4LPT+qrSlKNtQf5QliVjdP08GyAH8+BUIc9gT0eahc= +github.com/Shopify/toxiproxy/v2 v2.5.0/go.mod h1:yhM2epWtAmel9CB8r2+L+PCmhH6yH2pITaPAo7jxJl0= github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb h1:wumPkzt4zaxO4rHPBrjDK8iZMR41C1qs7njNqlacwQg= github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb/go.mod h1:QiYsIBRQEO+Z4Rz7GoI+dsHVneZNONvhczuA+llOZNM= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= @@ -266,6 +267,7 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= @@ -813,6 +815,7 @@ github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxm github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -1155,6 +1158,7 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181127221834-b4f47329b966/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -2314,6 +2318,7 @@ github.com/z-division/go-zookeeper v0.0.0-20190128072838-6d7457066b9b/go.mod h1: github.com/zabawaba99/go-gitignore v0.0.0-20200117185801-39e6bddfb292 h1:vpcCVk+pSR/6zcurmlGFD3jC5I/7RMl+GwGAPLxvX18= github.com/zabawaba99/go-gitignore v0.0.0-20200117185801-39e6bddfb292/go.mod h1:qcqv8IHwbR0JmjY1LZy4PeytlwxDPn1vUkjX7Wq0VaY= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -2917,6 +2922,7 @@ gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= @@ -3096,6 +3102,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -3229,6 +3236,7 @@ modernc.org/cc/v3 v3.35.18/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g modernc.org/cc/v3 v3.35.20/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= modernc.org/cc/v3 v3.35.22/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= modernc.org/cc/v3 v3.36.3 h1:uISP3F66UlixxWEcKuIWERa4TwrZENHSL8tWxZz8bHg= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= modernc.org/ccgo/v3 v3.11.0/go.mod h1:dGNposbDp9TOZ/1KBxghxtUp/bzErD0/0QW4hhSaBMI= @@ -3273,6 +3281,7 @@ modernc.org/ccgo/v3 v3.15.10/go.mod h1:wQKxoFn0ynxMuCLfFD09c8XPUCc8obfchoVR9Cn0f modernc.org/ccgo/v3 v3.15.12/go.mod h1:VFePOWoCd8uDGRJpq/zfJ29D0EVzMSyID8LCMWYbX6I= modernc.org/ccgo/v3 v3.15.13/go.mod h1:QHtvdpeODlXjdK3tsbpyK+7U9JV4PQsrPGIbtmc0KfY= modernc.org/ccgo/v3 v3.16.9 h1:AXquSwg7GuMk11pIdw7fmO1Y/ybgazVkMhsZWCV0mHM= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/ccorpus v1.11.4/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= @@ -3320,22 +3329,28 @@ modernc.org/libc v1.14.2/go.mod h1:MX1GBLnRLNdvmK9azU9LCxZ5lMyhrbEMK8rG3X/Fe34= modernc.org/libc v1.14.3/go.mod h1:GPIvQVOVPizzlqyRX3l756/3ppsAgg1QgPxjr5Q4agQ= modernc.org/libc v1.14.5/go.mod h1:2PJHINagVxO4QW/5OQdRrvMYo+bm5ClpUFfyXCYl9ak= modernc.org/libc v1.17.1 h1:Q8/Cpi36V/QBfuQaFVeisEBs3WqoGAJprZzmf7TfEYI= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= modernc.org/memory v1.2.1 h1:dkRh86wgmq/bJu2cAS2oqBCz/KsMZU7TUM4CibQ7eBs= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.14.6/go.mod h1:yiCvMv3HblGmzENNIaNtFhfaNIwcla4u2JQEwJPzfEc= modernc.org/sqlite v1.18.1 h1:ko32eKt3jf7eqIkCgPAeHMBXw3riNSLhl2f3loEF7o8= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.11.0/go.mod h1:zsTUpbQ+NxQEjOjCUlImDLPv1sG8Ww0qp66ZvyOxCgw= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/pkg/acceptance/compose/gss/psql/Dockerfile b/pkg/acceptance/compose/gss/psql/Dockerfile index 5d3020c066a6..d4fda00b1f0b 100644 --- a/pkg/acceptance/compose/gss/psql/Dockerfile +++ b/pkg/acceptance/compose/gss/psql/Dockerfile @@ -1,5 +1,5 @@ # Build the test binary in a multistage build. -FROM golang:1.20 AS builder +FROM golang:1.21 AS builder WORKDIR /workspace COPY . . RUN go test -v -c -tags gss_compose -o gss.test diff --git a/pkg/cmd/dev/doctor.go b/pkg/cmd/dev/doctor.go index 35a3f4d7917e..b0d530b8aa4b 100644 --- a/pkg/cmd/dev/doctor.go +++ b/pkg/cmd/dev/doctor.go @@ -97,34 +97,6 @@ Please perform the following steps: return "" }, }, - { - name: "node", - check: func(d *dev, ctx context.Context, cfg doctorConfig) string { - // Having a pre-installed node is only necessary on freebsd. - if runtime.GOOS != "freebsd" { - return "" - } - _, err := d.exec.CommandContextSilent(ctx, "/usr/local/bin/node", "--version") - if err != nil { - return `/usr/local/bin/node not found. -You can install node with: ` + "`pkg install node`" - } - return "" - }, - autofix: func(d *dev, ctx context.Context, cfg doctorConfig) error { - if !cfg.haveAutofixPermission && cfg.interactive { - response := promptInteractiveInput("Do you want me to run `pkg install node` for you?", "y") - canAutofix, ok := toBoolFuzzy(response) - if ok && canAutofix { - cfg.haveAutofixPermission = true - } - } - if !cfg.haveAutofixPermission { - return fmt.Errorf("do not have permission to install node") - } - return d.exec.CommandContextInheritingStdStreams(ctx, "pkg", "install", "node") - }, - }, { name: "submodules", check: func(d *dev, ctx context.Context, cfg doctorConfig) string { diff --git a/pkg/cmd/roachprod/docker/Dockerfile b/pkg/cmd/roachprod/docker/Dockerfile index ea28a9bbaea6..ec214212bccf 100644 --- a/pkg/cmd/roachprod/docker/Dockerfile +++ b/pkg/cmd/roachprod/docker/Dockerfile @@ -12,7 +12,7 @@ RUN bazel build --config=crosslinux //pkg/cmd/roachprod:roachprod # Copy the roachprod binary to a stable location RUN cp $(bazel info bazel-bin --config=crosslinux)/pkg/cmd/roachprod/roachprod_/roachprod ./ -FROM golang:1.20 +FROM golang:1.21 COPY entrypoint.sh build.sh /build/ RUN ["/build/build.sh"] COPY --from=builder /build/roachprod /usr/local/bin/roachprod diff --git a/pkg/cmd/roachtest/tests/go_helpers.go b/pkg/cmd/roachtest/tests/go_helpers.go index a14081cac4cf..8a10a42e83a0 100644 --- a/pkg/cmd/roachtest/tests/go_helpers.go +++ b/pkg/cmd/roachtest/tests/go_helpers.go @@ -43,13 +43,13 @@ func installGolang( } if err := repeatRunE( - ctx, t, c, node, "download go", `curl -fsSL https://dl.google.com/go/go1.20.10.linux-amd64.tar.gz > /tmp/go.tgz`, + ctx, t, c, node, "download go", `curl -fsSL https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz > /tmp/go.tgz`, ); err != nil { t.Fatal(err) } if err := repeatRunE( ctx, t, c, node, "verify tarball", `sha256sum -c - < 0 { + if strings.Count(cont, "!goroutine ") > 0 { t.Fatalf("unexpected stack trace:\n%s", cont) } case tracebackSingle: - if strings.Count(cont, "goroutine ") != 1 { + if strings.Count(cont, "!goroutine ") != 1 { t.Fatalf("stack trace contains too many goroutines: %s", cont) } case tracebackAll: - if strings.Count(cont, "goroutine ") < 2 { + if strings.Count(cont, "!goroutine ") < 2 { t.Fatalf("stack trace contains less than two goroutines: %s", cont) } } diff --git a/pkg/util/log/logcrash/crash_reporting_test.go b/pkg/util/log/logcrash/crash_reporting_test.go index 65a7982c4dfa..26691ed5246a 100644 --- a/pkg/util/log/logcrash/crash_reporting_test.go +++ b/pkg/util/log/logcrash/crash_reporting_test.go @@ -87,7 +87,7 @@ Error types: (1) *runtime.TypeAssertionError`, | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -109,7 +109,7 @@ Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) *runtime.TypeA | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -141,7 +141,7 @@ Error types: (1) *safedetails.withSafeDetails (2) *runtime.TypeAssertionError`, | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -161,7 +161,7 @@ Error types: (1) *withstack.withStack (2) *errutil.leafError`, | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -197,7 +197,7 @@ Error types: (1) *os.LinkError (2) *safedetails.withSafeDetails (3) logcrash.lea | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -210,7 +210,7 @@ Wraps: (3) attached stack trace | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -229,7 +229,7 @@ Wraps: (7) attached stack trace | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -262,7 +262,7 @@ Error types: (1) *net.OpError (2) logcrash.leafErr`, | ...crash_reporting_test.go:NN | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | ...crash_reporting_test.go:NN - | runtime.doInit + | runtime.doInit1 | ...proc.go:NN | runtime.doInit | ...proc.go:NN @@ -278,7 +278,7 @@ Wraps: (2) secondary error attachment | | ...crash_reporting_test.go:NN | | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | | ...crash_reporting_test.go:NN - | | runtime.doInit + | | runtime.doInit1 | | ...proc.go:NN | | runtime.doInit | | ...proc.go:NN @@ -297,7 +297,7 @@ Wraps: (2) secondary error attachment | | ...crash_reporting_test.go:NN | | github.com/cockroachdb/cockroach/pkg/util/log/logcrash.init | | ...crash_reporting_test.go:NN - | | runtime.doInit + | | runtime.doInit1 | | ...proc.go:NN | | runtime.doInit | | ...proc.go:NN diff --git a/pkg/util/parquet/write_functions.go b/pkg/util/parquet/write_functions.go index 75694d5d1feb..ed56591ce58f 100644 --- a/pkg/util/parquet/write_functions.go +++ b/pkg/util/parquet/write_functions.go @@ -385,6 +385,7 @@ func unsafeGetBytes(s string) ([]byte, error) { if len(s) == 0 { return nil, nil } + //lint:ignore SA1019 StringHeader is deprecated, but no clear replacement p := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&s)).Data) return (*[maxStrLen]byte)(p)[:len(s):len(s)], nil }