From 449627fa7cc6aa203c8a1a451c89431935ccdb69 Mon Sep 17 00:00:00 2001 From: healthy-pod Date: Tue, 2 May 2023 12:44:21 +0300 Subject: [PATCH] *: customize the timeouts used by unit tests in `Bazel Essential CI` We manage unit tests timeouts at two levels: 1. Bazel timeout, by default [60s,300s,900s,3600s] for [small,medium,large,enormous] targets. 2. Go timeout, set to 5 seconds less than the corresponding Bazel timeout [see #86363]. Previously, unit tests used the same timeouts both when running in `Bazel Essential CI` and elsewhere. As a result, enormous test targets inherited a timeout of 1 hour from Bazel's default timeout. This is way beyond the expected time needed by any test target in `Bazel Essential CI`. We can't change enormous targets to large ones for two reasons: 1. `Enormous` is also used to indicate the resources needed by a test target. 2. `Enormous` test targets may still need the large timeout when running locally. To make this possible, we needed to support setting an `attr` value to a `select` using Buildozer. This was done in bazelbuild/buildtools#1153. This change only affects the timeout of `enormous` test targets. It however makes it simple to customize the timeout of other test sizes if desired in the future. Release note: None Epic: none --- .bazelrc | 2 ++ WORKSPACE | 6 ++--- build/bazelutil/distdir_files.bzl | 2 +- .../cockroach/ci/tests/unit_tests_ccl_impl.sh | 2 +- .../cockroach/ci/tests/unit_tests_impl.sh | 2 +- build/toolchains/BUILD.bazel | 7 ++++++ c-deps/BUILD.bazel | 4 ++-- pkg/ccl/backupccl/BUILD.bazel | 5 +++- pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel | 5 +++- pkg/ccl/changefeedccl/BUILD.bazel | 5 +++- pkg/ccl/gssapiccl/BUILD.bazel | 4 ++-- .../upgradeinterlockccl/BUILD.bazel | 5 +++- .../3node-tenant-multiregion/BUILD.bazel | 5 +++- .../tests/3node-tenant/BUILD.bazel | 5 +++- pkg/ccl/logictestccl/tests/5node/BUILD.bazel | 5 +++- .../tests/fakedist-disk/BUILD.bazel | 5 +++- .../tests/fakedist-vec-off/BUILD.bazel | 5 +++- .../logictestccl/tests/fakedist/BUILD.bazel | 5 +++- .../local-legacy-schema-changer/BUILD.bazel | 5 +++- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 5 +++- .../tests/local-vec-off/BUILD.bazel | 5 +++- pkg/ccl/logictestccl/tests/local/BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- pkg/ccl/multiregionccl/BUILD.bazel | 5 +++- pkg/ccl/schemachangerccl/BUILD.bazel | 5 +++- pkg/ccl/serverccl/BUILD.bazel | 5 +++- pkg/cmd/generate-bazel-extra/main.go | 23 +++++++++++++++---- pkg/kv/kvnemesis/kvnemesisutil/BUILD.bazel | 2 +- pkg/kv/kvserver/BUILD.bazel | 5 +++- pkg/server/BUILD.bazel | 5 +++- pkg/sql/BUILD.bazel | 5 +++- .../logictest/tests/5node-disk/BUILD.bazel | 5 +++- pkg/sql/logictest/tests/5node/BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../logictest/tests/fakedist-disk/BUILD.bazel | 5 +++- .../tests/fakedist-vec-off/BUILD.bazel | 5 +++- pkg/sql/logictest/tests/fakedist/BUILD.bazel | 5 +++- .../local-legacy-schema-changer/BUILD.bazel | 5 +++- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 5 +++- .../logictest/tests/local-vec-off/BUILD.bazel | 5 +++- pkg/sql/logictest/tests/local/BUILD.bazel | 5 +++- .../BUILD.bazel | 5 +++- .../multiregion-invalid-locality/BUILD.bazel | 5 +++- .../exec/execbuilder/tests/5node/BUILD.bazel | 5 +++- .../tests/fakedist-disk/BUILD.bazel | 5 +++- .../tests/fakedist-vec-off/BUILD.bazel | 5 +++- .../execbuilder/tests/fakedist/BUILD.bazel | 5 +++- .../local-legacy-schema-changer/BUILD.bazel | 5 +++- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 5 +++- .../tests/local-vec-off/BUILD.bazel | 5 +++- .../exec/execbuilder/tests/local/BUILD.bazel | 5 +++- pkg/sql/schemachanger/BUILD.bazel | 5 +++- pkg/storage/metamorphic/BUILD.bazel | 5 +++- pkg/testutils/docker/BUILD.bazel | 2 +- pkg/ui/workspaces/cluster-ui/BUILD.bazel | 2 +- pkg/ui/workspaces/db-console/BUILD.bazel | 4 ++-- 61 files changed, 234 insertions(+), 68 deletions(-) diff --git a/.bazelrc b/.bazelrc index cbffa3c2a726..99052ca79792 100644 --- a/.bazelrc +++ b/.bazelrc @@ -51,6 +51,8 @@ test:test --test_env=TZ= # If those values are updated, the script should be updated accordingly. test:race --test_timeout=1200,6000,18000,72000 +# CI uses a custom timeout for enormous targets. +test:use_ci_timeouts --test_timeout=60,300,900,900 --define=use_ci_timeouts=true # CI should always run with `--config=ci` or `--config=cinolint`. # Prefer the first to the second unless some other job will handle linting the # same code you're building. diff --git a/WORKSPACE b/WORKSPACE index 47102f1bcb67..7f25de7011a4 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -355,10 +355,10 @@ load( go_repository( name = "com_github_bazelbuild_buildtools", importpath = "github.com/bazelbuild/buildtools", - sha256 = "a9ef5103739dfb5ed2a5b47ab1654842a89695812e4af09e57d7015a5caf97e0", - strip_prefix = "buildtools", + sha256 = "d71a889e3bc50cc8b9d42c859e15a74f7c8d10b6786f8dd82f08f2bf24e5bdc6", + strip_prefix = "bazelbuild-buildtools-b182fc4", urls = [ - "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", + "https://storage.googleapis.com/public-bazel-artifacts/gomod/github.com/bazelbuild/buildtools/v6.1.2-0-gb182fc4/bazelbuild-buildtools-v6.1.2-0-gb182fc4.tar.gz", ], ) diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index 8b414e2200dc..6b22c174336a 100644 --- a/build/bazelutil/distdir_files.bzl +++ b/build/bazelutil/distdir_files.bzl @@ -1171,7 +1171,7 @@ DISTDIR_FILES = { "https://storage.googleapis.com/public-bazel-artifacts/go/20230214-214430/go1.19.4.linux-arm64.tar.gz": "6bb5752483c0d145b91199e5cc1352960d926850e75864dea16282337b0d92fe", "https://storage.googleapis.com/public-bazel-artifacts/go/20230214-214430/go1.19.4.windows-amd64.tar.gz": "0f37edf2a6663db33c8f67ee36e21a7eb391fbf35d494299f6a81a59e294f4a0", "https://storage.googleapis.com/public-bazel-artifacts/go/20230427-165819/go1.19.8fips.linux-amd64.tar.gz": "8170fd871cb61dc771ec1f309451b31a73d5aca3410dfa9d952672ae2be4ac9e", - "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/gomod/github.com/bazelbuild/buildtools/v6.1.2-0-gb182fc4/bazelbuild-buildtools-v6.1.2-0-gb182fc4.tar.gz": "d71a889e3bc50cc8b9d42c859e15a74f7c8d10b6786f8dd82f08f2bf24e5bdc6", "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", diff --git a/build/teamcity/cockroach/ci/tests/unit_tests_ccl_impl.sh b/build/teamcity/cockroach/ci/tests/unit_tests_ccl_impl.sh index 183d1734ca59..b54c8b5572ff 100755 --- a/build/teamcity/cockroach/ci/tests/unit_tests_ccl_impl.sh +++ b/build/teamcity/cockroach/ci/tests/unit_tests_ccl_impl.sh @@ -15,6 +15,6 @@ if tc_release_branch; then EXTRA_PARAMS=" --flaky_test_attempts=3" fi -$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci -- test --config=cinolint -c fastbuild \ +$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci -- test --config=cinolint --config=use_ci_timeouts -c fastbuild \ //pkg:ccl_tests \ --profile=/artifacts/profile.gz $EXTRA_PARAMS diff --git a/build/teamcity/cockroach/ci/tests/unit_tests_impl.sh b/build/teamcity/cockroach/ci/tests/unit_tests_impl.sh index d50b4065e386..efcc0e6bf47e 100755 --- a/build/teamcity/cockroach/ci/tests/unit_tests_impl.sh +++ b/build/teamcity/cockroach/ci/tests/unit_tests_impl.sh @@ -15,6 +15,6 @@ if tc_release_branch; then EXTRA_PARAMS=" --flaky_test_attempts=3" fi -$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci -- test --config=cinolint -c fastbuild \ +$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci -- test --config=cinolint --config=use_ci_timeouts -c fastbuild \ //pkg:small_non_ccl_tests //pkg:medium_non_ccl_tests //pkg:large_non_ccl_tests //pkg:enormous_non_ccl_tests \ --profile=/artifacts/profile.gz $EXTRA_PARAMS diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index 36f2451d8947..0a34d24021df 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -507,3 +507,10 @@ config_setting( }, visibility = ["//c-deps:__pkg__"], ) + +config_setting( + name = "use_ci_timeouts", + values = { + "define": "use_ci_timeouts=true", + }, +) diff --git a/c-deps/BUILD.bazel b/c-deps/BUILD.bazel index 23bc0f026d5b..2bdeba638bbf 100644 --- a/c-deps/BUILD.bazel +++ b/c-deps/BUILD.bazel @@ -245,14 +245,14 @@ configure_make( }), lib_source = "@krb5//:all", out_static_libs = LIBKRB5_LIBS, - postfix_script = ("""mkdir -p libkrb5/lib + postfix_script = """mkdir -p libkrb5/lib cp lib/libcom_err.a libkrb5/lib cp lib/libgssapi_krb5.a libkrb5/lib cp lib/libkrb5.a libkrb5/lib cp lib/libkrb5support.a libkrb5/lib cp lib/libk5crypto.a libkrb5/lib mkdir -p libkrb5/include/gssapi -cp include/gssapi/gssapi.h libkrb5/include/gssapi"""), +cp include/gssapi/gssapi.h libkrb5/include/gssapi""", visibility = ["//visibility:public"], ) diff --git a/pkg/ccl/backupccl/BUILD.bazel b/pkg/ccl/backupccl/BUILD.bazel index a0b563611871..29cbe349fed4 100644 --- a/pkg/ccl/backupccl/BUILD.bazel +++ b/pkg/ccl/backupccl/BUILD.bazel @@ -193,7 +193,10 @@ go_test( "tenant_backup_nemesis_test.go", "utils_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]) + ["//c-deps:libgeos"], embed = [":backupccl"], shard_count = 48, diff --git a/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel b/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel index 6a09069d4c56..86ae64f76a3e 100644 --- a/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel +++ b/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel @@ -8,7 +8,10 @@ go_test( "bench_test.go", "multi_region_bench_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), shard_count = 16, tags = ["ccl_test"], diff --git a/pkg/ccl/changefeedccl/BUILD.bazel b/pkg/ccl/changefeedccl/BUILD.bazel index 7481cd56eac6..9286954617c9 100644 --- a/pkg/ccl/changefeedccl/BUILD.bazel +++ b/pkg/ccl/changefeedccl/BUILD.bazel @@ -203,7 +203,10 @@ go_test( "testfeed_test.go", "validations_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), embed = [":changefeedccl"], shard_count = 16, tags = ["ccl_test"], diff --git a/pkg/ccl/gssapiccl/BUILD.bazel b/pkg/ccl/gssapiccl/BUILD.bazel index b5f0a1c8f790..06be51ac65fa 100644 --- a/pkg/ccl/gssapiccl/BUILD.bazel +++ b/pkg/ccl/gssapiccl/BUILD.bazel @@ -6,8 +6,8 @@ go_library( name = "gssapiccl", srcs = select({ "@io_bazel_rules_go//go/platform:linux": [ - "gssapi.go", "get_user.go", + "gssapi.go", ], "//conditions:default": ["empty.go"], }), @@ -31,10 +31,10 @@ go_library( "//pkg/security/username", "//pkg/settings", "//pkg/sql", - "//pkg/sql/sem/tree", "//pkg/sql/pgwire", "//pkg/sql/pgwire/hba", "//pkg/sql/pgwire/identmap", + "//pkg/sql/sem/tree", "@com_github_cockroachdb_errors//:errors", ], "//conditions:default": [], diff --git a/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel b/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel index c8c2f0cc410c..d8394d91fa9d 100644 --- a/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel +++ b/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel @@ -8,7 +8,10 @@ go_test( "main_test.go", "tenant_upgrade_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), tags = ["ccl_test"], deps = [ "//pkg/base", diff --git a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel index 80cb37977e3e..8c794684708e 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "3node-tenant-multiregion_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel index ecd3bbb29850..c5d5409bfd24 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "3node-tenant_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel index 885f84eb07a8..0436f01c682f 100644 --- a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "5node_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel index eee050b5204f..1e5eba51cbf4 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-disk_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel index 39ef42dcef94..34733131dffd 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel index a02979d3a275..4a07dda1e856 100644 --- a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel index 4ce47bc18892..bb16c1e5efe8 100644 --- a/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-legacy-schema-changer_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel index 6fad997c0141..af9376cf8f9f 100644 --- a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-mixed-22_2-23_1_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel index 4f3f5e8ac34c..1e2b3da81696 100644 --- a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/local/BUILD.bazel b/pkg/ccl/logictestccl/tests/local/BUILD.bazel index 3c29f5b28b9a..f88c7ab09f8c 100644 --- a/pkg/ccl/logictestccl/tests/local/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel index d1a4dd5c53d2..968ea09e83b6 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-15node-5region-3azs_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel index 83f194c5308e..e8d4d0b224cd 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-3node-3superlongregions_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel index 376adba6da67..2045f479c676 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-9node-3region-3azs-no-los_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel index 714f78cace8a..d9b4bbaf4050 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-9node-3region-3azs-tenant_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel index afe9959a2e24..07c837e89e99 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-9node-3region-3azs-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel index e37032e2327e..a38883faf7f4 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-9node-3region-3azs_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep diff --git a/pkg/ccl/multiregionccl/BUILD.bazel b/pkg/ccl/multiregionccl/BUILD.bazel index 813f8d9fad50..c9cf24b558e5 100644 --- a/pkg/ccl/multiregionccl/BUILD.bazel +++ b/pkg/ccl/multiregionccl/BUILD.bazel @@ -39,7 +39,10 @@ go_test( "show_test.go", "unique_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":multiregionccl"], shard_count = 16, diff --git a/pkg/ccl/schemachangerccl/BUILD.bazel b/pkg/ccl/schemachangerccl/BUILD.bazel index 6d461d49550c..0999a8a6e186 100644 --- a/pkg/ccl/schemachangerccl/BUILD.bazel +++ b/pkg/ccl/schemachangerccl/BUILD.bazel @@ -12,7 +12,10 @@ go_test( ":test_gen_backup_non_ccl", # keep ":test_gen_ccl", # keep ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]) + [ "//pkg/sql/schemachanger:testdata", ], diff --git a/pkg/ccl/serverccl/BUILD.bazel b/pkg/ccl/serverccl/BUILD.bazel index 2a097ba8e15f..bb8d5cefe413 100644 --- a/pkg/ccl/serverccl/BUILD.bazel +++ b/pkg/ccl/serverccl/BUILD.bazel @@ -44,7 +44,10 @@ go_test( "tenant_migration_test.go", "tenant_vars_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":serverccl"], tags = ["ccl_test"], diff --git a/pkg/cmd/generate-bazel-extra/main.go b/pkg/cmd/generate-bazel-extra/main.go index d5edbf3f1443..de52cb55e4ed 100644 --- a/pkg/cmd/generate-bazel-extra/main.go +++ b/pkg/cmd/generate-bazel-extra/main.go @@ -32,6 +32,12 @@ var ( "large": 900, "enormous": 3600, } + testSizeToCiTimeout = map[string]int{ + "small": 60, + "medium": 300, + "large": 900, + "enormous": 900, + } ) func runBuildozer(args []string) { @@ -338,7 +344,7 @@ func generateTestsTimeouts() { if err != nil { log.Fatal(err) } - for size, timeout := range testSizeToDefaultTimeout { + for size, defaultTimeout := range testSizeToDefaultTimeout { if size == "enormous" { // Exclude really enormous targets since they have a custom timeout that // exceeds the default 1h. @@ -349,10 +355,17 @@ func generateTestsTimeouts() { // (because of the 5 seconds taken) then the troubled test target size must be bumped // to the next size because it shouldn't be passing at the edge of its deadline // anyways to avoid flakiness. - runBuildozer(append([]string{ - fmt.Sprintf(`set args "-test.timeout=%ds"`, timeout-5)}, - targets[size]..., - )) + if size == "enormous" { + runBuildozer(append([]string{ + fmt.Sprintf(`set_select args //build/toolchains:use_ci_timeouts "-test.timeout=%ds" //conditions:default "-test.timeout=%ds"`, testSizeToCiTimeout[size]-5, defaultTimeout-5)}, + targets[size]..., + )) + } else { + runBuildozer(append([]string{ + fmt.Sprintf(`set args "-test.timeout=%ds"`, defaultTimeout-5)}, + targets[size]..., + )) + } } var ccl_targets []string for _, targetsForSize := range targets { diff --git a/pkg/kv/kvnemesis/kvnemesisutil/BUILD.bazel b/pkg/kv/kvnemesis/kvnemesisutil/BUILD.bazel index e8cdabe98659..7c270697cf6a 100644 --- a/pkg/kv/kvnemesis/kvnemesisutil/BUILD.bazel +++ b/pkg/kv/kvnemesis/kvnemesisutil/BUILD.bazel @@ -11,8 +11,8 @@ go_library( "//build/toolchains:crdb_test": [":gen-crdb-test-on"], "//conditions:default": [":gen-crdb-test-off"], }) + [ - "seq.go", "context.go", + "seq.go", ], importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvnemesis/kvnemesisutil", visibility = ["//visibility:public"], diff --git a/pkg/kv/kvserver/BUILD.bazel b/pkg/kv/kvserver/BUILD.bazel index 8004670b6a96..7eaed84695c1 100644 --- a/pkg/kv/kvserver/BUILD.bazel +++ b/pkg/kv/kvserver/BUILD.bazel @@ -334,7 +334,10 @@ go_test( "txn_recovery_integration_test.go", "txn_wait_queue_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":kvserver"], shard_count = 48, diff --git a/pkg/server/BUILD.bazel b/pkg/server/BUILD.bazel index bd7685455b64..3ba309e55554 100644 --- a/pkg/server/BUILD.bazel +++ b/pkg/server/BUILD.bazel @@ -441,7 +441,10 @@ go_test( "user_test.go", "version_cluster_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":server"], shard_count = 16, diff --git a/pkg/sql/BUILD.bazel b/pkg/sql/BUILD.bazel index a7d8e6ca01fd..fba5cb1604c1 100644 --- a/pkg/sql/BUILD.bazel +++ b/pkg/sql/BUILD.bazel @@ -705,7 +705,10 @@ go_test( "zone_config_test.go", "zone_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]) + [ "//c-deps:libgeos", "//pkg/sql:information_schema.go", diff --git a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel index 32451b5f6772..3740f2e1ce73 100644 --- a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "5node-disk_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/5node/BUILD.bazel b/pkg/sql/logictest/tests/5node/BUILD.bazel index c23e345ef414..5b40531f5f17 100644 --- a/pkg/sql/logictest/tests/5node/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "5node_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel b/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel index 865fbe3f2745..f51d21ffbb57 100644 --- a/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel +++ b/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "cockroach-go-testserver-upgrade-to-master_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/cmd/cockroach-short", # keep diff --git a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel index b3488614f4c9..d87d7adec290 100644 --- a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-disk_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel index 6a61660d70f1..83c4792d6f06 100644 --- a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/fakedist/BUILD.bazel b/pkg/sql/logictest/tests/fakedist/BUILD.bazel index ddb1978f59a3..67640678bbc9 100644 --- a/pkg/sql/logictest/tests/fakedist/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel index a22efc4fd9b1..454b20e8b3c7 100644 --- a/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-legacy-schema-changer_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel index 7efb73de5af3..94f748bd5ecc 100644 --- a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-mixed-22_2-23_1_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel index 5b2fb3374a51..6d970243dfe2 100644 --- a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/local/BUILD.bazel b/pkg/sql/logictest/tests/local/BUILD.bazel index c869729e8b80..8546643e3943 100644 --- a/pkg/sql/logictest/tests/local/BUILD.bazel +++ b/pkg/sql/logictest/tests/local/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel b/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel index 989f366d5dfc..97c865c68fef 100644 --- a/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-9node-3region-3azs_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel index 6730f376770b..ddda030ea357 100644 --- a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "multiregion-invalid-locality_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel index 4cd343d82811..5cb53b3e1f6e 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "5node_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel index 390a49c7d59d..58b222ee69b9 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-disk_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel index bc3e3a455cc4..3999c5ca4235 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel index e80e7316c5da..da5e17927b66 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "fakedist_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel index f1b5a26f8849..bbd7f5c7f9cf 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-legacy-schema-changer_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel index d07c5f0c2019..7daae138eef3 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-mixed-22_2-23_1_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel index b7ecc4a31e28..4e38b9afdee7 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local-vec-off_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel index 26a885856cbc..f8881be08b10 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel @@ -5,7 +5,10 @@ go_test( name = "local_test", size = "enormous", srcs = ["generated_test.go"], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [ "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep diff --git a/pkg/sql/schemachanger/BUILD.bazel b/pkg/sql/schemachanger/BUILD.bazel index ec883fbde8de..2a611ca0fa2b 100644 --- a/pkg/sql/schemachanger/BUILD.bazel +++ b/pkg/sql/schemachanger/BUILD.bazel @@ -22,7 +22,10 @@ go_test( "schemachanger_test.go", ":test_gen", # keep ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = [":testdata"], shard_count = 16, deps = [ diff --git a/pkg/storage/metamorphic/BUILD.bazel b/pkg/storage/metamorphic/BUILD.bazel index a467888d004f..665762fadea5 100644 --- a/pkg/storage/metamorphic/BUILD.bazel +++ b/pkg/storage/metamorphic/BUILD.bazel @@ -42,7 +42,10 @@ go_test( "meta_test.go", "parser_test.go", ], - args = ["-test.timeout=3595s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":metamorphic"], shard_count = 8, diff --git a/pkg/testutils/docker/BUILD.bazel b/pkg/testutils/docker/BUILD.bazel index 43755bec58a7..23364ad54657 100644 --- a/pkg/testutils/docker/BUILD.bazel +++ b/pkg/testutils/docker/BUILD.bazel @@ -8,7 +8,7 @@ go_test( args = ["-test.timeout=295s"], data = glob(["testdata/**"]) + [ "//pkg/testutils/docker:testdata", - "//pkg/testutils/docker/docker-fsnotify:docker-fsnotify", + "//pkg/testutils/docker/docker-fsnotify", ], gotags = ["docker"], tags = ["integration"], diff --git a/pkg/ui/workspaces/cluster-ui/BUILD.bazel b/pkg/ui/workspaces/cluster-ui/BUILD.bazel index 152d5bdedce5..bfe6224d0d8c 100644 --- a/pkg/ui/workspaces/cluster-ui/BUILD.bazel +++ b/pkg/ui/workspaces/cluster-ui/BUILD.bazel @@ -268,8 +268,8 @@ tsc_test( ) + [ "tsconfig.json", "tsconfig.linting.json", - "//pkg/ui/workspaces/db-console/src/js:crdb-protobuf-client", "//pkg/ui/workspaces/db-console/ccl/src/js:crdb-protobuf-client-ccl", + "//pkg/ui/workspaces/db-console/src/js:crdb-protobuf-client", "@npm_cluster_ui//@babel/parser", "@npm_cluster_ui//@babel/types", "@npm_cluster_ui//@cockroachlabs/icons", diff --git a/pkg/ui/workspaces/db-console/BUILD.bazel b/pkg/ui/workspaces/db-console/BUILD.bazel index 33d05101aa9f..cf9f8bf2f935 100644 --- a/pkg/ui/workspaces/db-console/BUILD.bazel +++ b/pkg/ui/workspaces/db-console/BUILD.bazel @@ -292,9 +292,9 @@ tsc_test( ) + [ "tsconfig.json", "tsconfig.linting.json", - "//pkg/ui/workspaces/cluster-ui:cluster-ui", - "//pkg/ui/workspaces/db-console/src/js:crdb-protobuf-client", + "//pkg/ui/workspaces/cluster-ui", "//pkg/ui/workspaces/db-console/ccl/src/js:crdb-protobuf-client-ccl", + "//pkg/ui/workspaces/db-console/src/js:crdb-protobuf-client", "@npm_db_console//@babel/parser", "@npm_db_console//@babel/types", "@npm_db_console//@cockroachlabs/design-tokens",