From 5bef18e0a8ad57043072fe6774daf6d298bb41c7 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Wed, 13 Sep 2023 15:47:06 -0500 Subject: [PATCH] logictest: don't download `cockroach` from the internet in test Instead, make it a Bazel-level dependency and look it up in runfiles. This means the test no longer has to talk to the network. Closes #108865. Epic: CRDB-8308 Release note: None --- WORKSPACE | 4 + build/toolchains/BUILD.bazel | 32 ++++ .../3node-tenant-multiregion/BUILD.bazel | 4 +- .../tests/3node-tenant/BUILD.bazel | 4 +- pkg/ccl/logictestccl/tests/5node/BUILD.bazel | 4 +- .../tests/fakedist-disk/BUILD.bazel | 4 +- .../tests/fakedist-vec-off/BUILD.bazel | 4 +- .../logictestccl/tests/fakedist/BUILD.bazel | 4 +- .../local-legacy-schema-changer/BUILD.bazel | 4 +- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 4 +- .../tests/local-vec-off/BUILD.bazel | 4 +- pkg/ccl/logictestccl/tests/local/BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../tests/3node-tenant/BUILD.bazel | 4 +- pkg/cmd/generate-logictest/templates.go | 9 +- pkg/cmd/release/main.go | 2 +- pkg/cmd/release/update_releases.go | 148 +++++++++++++++--- pkg/sql/logictest/BUILD.bazel | 23 ++- pkg/sql/logictest/REPOSITORIES.bzl | 44 ++++++ pkg/sql/logictest/logic.go | 37 ++++- .../logictest/tests/5node-disk/BUILD.bazel | 4 +- pkg/sql/logictest/tests/5node/BUILD.bazel | 4 +- .../BUILD.bazel | 6 +- .../logictest/tests/fakedist-disk/BUILD.bazel | 4 +- .../tests/fakedist-vec-off/BUILD.bazel | 4 +- pkg/sql/logictest/tests/fakedist/BUILD.bazel | 4 +- .../local-legacy-schema-changer/BUILD.bazel | 4 +- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 4 +- .../logictest/tests/local-vec-off/BUILD.bazel | 4 +- pkg/sql/logictest/tests/local/BUILD.bazel | 4 +- .../BUILD.bazel | 4 +- .../multiregion-invalid-locality/BUILD.bazel | 4 +- .../exec/execbuilder/tests/5node/BUILD.bazel | 4 +- .../tests/fakedist-disk/BUILD.bazel | 4 +- .../tests/fakedist-vec-off/BUILD.bazel | 4 +- .../execbuilder/tests/fakedist/BUILD.bazel | 4 +- .../local-legacy-schema-changer/BUILD.bazel | 4 +- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 4 +- .../tests/local-vec-off/BUILD.bazel | 4 +- .../exec/execbuilder/tests/local/BUILD.bazel | 4 +- .../tests/fakedist-disk/BUILD.bazel | 4 +- .../tests/fakedist-vec-off/BUILD.bazel | 4 +- .../tests/fakedist/BUILD.bazel | 4 +- .../local-legacy-schema-changer/BUILD.bazel | 4 +- .../tests/local-mixed-22.2-23.1/BUILD.bazel | 4 +- .../tests/local-vec-off/BUILD.bazel | 4 +- .../sqlitelogictest/tests/local/BUILD.bazel | 4 +- 52 files changed, 309 insertions(+), 168 deletions(-) create mode 100644 pkg/sql/logictest/REPOSITORIES.bzl diff --git a/WORKSPACE b/WORKSPACE index 5e90a1321cef..84abb053a195 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -602,6 +602,10 @@ 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") distdir_repositories() diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index 8c34314f5be1..ddd7224219a9 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -616,3 +616,35 @@ config_setting( "//c-deps:__pkg__", ], ) + +config_setting( + name = "is_linux_amd64", + constraint_values = [ + "@io_bazel_rules_go//go/toolchain:linux", + "@platforms//cpu:x86_64", + ], +) + +config_setting( + name = "is_linux_arm64", + constraint_values = [ + "@io_bazel_rules_go//go/toolchain:linux", + "@platforms//cpu:arm64", + ], +) + +config_setting( + name = "is_darwin_amd64", + constraint_values = [ + "@io_bazel_rules_go//go/toolchain:darwin", + "@platforms//cpu:x86_64", + ], +) + +config_setting( + name = "is_darwin_arm64", + constraint_values = [ + "@io_bazel_rules_go//go/toolchain:darwin", + "@platforms//cpu:arm64", + ], +) diff --git a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel index 8a7645c91077..4eb1cf3a58c4 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel @@ -14,9 +14,7 @@ go_test( "//pkg/sql/logictest:testdata", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel index ec73751f1e8c..21c66477c09d 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel @@ -14,9 +14,7 @@ go_test( "//pkg/sql/logictest:testdata", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel index 53f9bd5077c3..73f51f3b41fd 100644 --- a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel index a1d3e4458c89..c1f897672d06 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel index 81a39eea27ed..88740c9b157f 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel index afccaf838f1d..6f2dcc3ea54a 100644 --- a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 7, tags = [ "ccl_test", 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 70830210bbe7..3d8ffde8d6bc 100644 --- a/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", 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 2f058fbe96f7..baa633a96639 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 7, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel index c2be802cf341..0549cb1bcf40 100644 --- a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local/BUILD.bazel b/pkg/ccl/logictestccl/tests/local/BUILD.bazel index 0f8a15b77c95..cef9532793cc 100644 --- a/pkg/ccl/logictestccl/tests/local/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 20, tags = [ "ccl_test", 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 fa8402f645fb..dc2481b28da7 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 4, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel index b281a2f4e400..9de7480d1577 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "ccl_test", 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 0926b52f68a2..60e696094c0d 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 20, tags = [ "ccl_test", 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 302de29e4b8b..0757828f8461 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 16, tags = [ "ccl_test", 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 bba82a35cc7e..7a8fa2d86254 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 9, tags = [ "ccl_test", 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 b3391ddae2f2..a6c161e8fba5 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 27, tags = [ "ccl_test", diff --git a/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel b/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel index 95a81230e47d..f0e1e34f1610 100644 --- a/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel +++ b/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "ccl_test", diff --git a/pkg/cmd/generate-logictest/templates.go b/pkg/cmd/generate-logictest/templates.go index 9fe10ae2454e..a358118aa994 100644 --- a/pkg/cmd/generate-logictest/templates.go +++ b/pkg/cmd/generate-logictest/templates.go @@ -270,15 +270,12 @@ go_test( "//c-deps:libgeos", # keep{{ if .SqliteLogicTest }} "@com_github_cockroachdb_sqllogictest//:testfiles", # keep{{ end }}{{ if .CockroachGoTestserverTest }} "//pkg/cmd/cockroach-short", # keep{{ end }}{{ if .CclLogicTest }} - "//pkg/ccl/logictestccl:testdata", # keep{{ end }}{{ if .LogicTest }} + "//pkg/ccl/logictestccl:testdata", # keep{{ end }}{{ if .CockroachGoTestserverTest }} + "//pkg/sql/logictest:cockroach_predecessor_version", # keep{{ end }}{{ if .LogicTest }} "//pkg/sql/logictest:testdata", # keep{{ end }}{{ if .ExecBuildLogicTest }} "//pkg/sql/opt/exec/execbuilder:testdata", # keep{{ end }} ], - exec_properties = {{ if eq .TestRuleName "cockroach-go-testserver-upgrade-to-master" }}{ - "dockerNetwork": "standard", - {{ else }}{ - {{ end }}"Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = {{ if gt .TestCount 48 }}48{{ else }}{{ .TestCount }}{{end}}, tags = [{{ if .Ccl }} "ccl_test",{{ end }} diff --git a/pkg/cmd/release/main.go b/pkg/cmd/release/main.go index aca1561956ce..3924d41b65aa 100644 --- a/pkg/cmd/release/main.go +++ b/pkg/cmd/release/main.go @@ -40,7 +40,7 @@ func init() { rootCmd.AddCommand(postReleaseSeriesBlockersCmd) rootCmd.AddCommand(cancelReleaseSeriesDateCmd) rootCmd.AddCommand(setOrchestrationVersionCmd) - rootCmd.AddCommand(updateReleasesTestFileCmd) + rootCmd.AddCommand(updateReleasesTestFilesCmd) rootCmd.AddCommand(setCockroachVersionCmd) rootCmd.AddCommand(updateVersionsCmd) } diff --git a/pkg/cmd/release/update_releases.go b/pkg/cmd/release/update_releases.go index ed56e7adde49..65371904c9cf 100644 --- a/pkg/cmd/release/update_releases.go +++ b/pkg/cmd/release/update_releases.go @@ -13,11 +13,13 @@ package main import ( "bytes" "context" + "crypto/sha256" "fmt" "io" "os" "sort" "strings" + "time" "github.com/cockroachdb/cockroach/pkg/build" "github.com/cockroachdb/cockroach/pkg/testutils/release" @@ -27,11 +29,11 @@ import ( "gopkg.in/yaml.v2" ) -var updateReleasesTestFileCmd = &cobra.Command{ +var updateReleasesTestFilesCmd = &cobra.Command{ Use: "update-releases-file", - Short: "Updates releases file used in mixed-version logic tests and roachtests", - Long: "Updates releases file used in mixed-version logic tests and roachtests", - RunE: updateReleasesFile, + Short: "Updates releases files used in mixed-version logic tests and roachtests", + Long: "Updates releases files used in mixed-version logic tests and roachtests", + RunE: updateReleasesFiles, } // minVersion corresponds to the minimum version after which we start @@ -44,8 +46,9 @@ const ( // to render the public CockroachDB releases page. We leverage the // data in structured format to generate release information used // for testing purposes. - releaseDataURL = "https://raw.githubusercontent.com/cockroachdb/docs/main/src/current/_data/releases.yml" - releaseDataFile = "pkg/testutils/release/cockroach_releases.yaml" + releaseDataURL = "https://raw.githubusercontent.com/cockroachdb/docs/main/src/current/_data/releases.yml" + releaseDataFile = "pkg/testutils/release/cockroach_releases.yaml" + logictestReposFile = "pkg/sql/logictest/REPOSITORIES.bzl" // header is added in the first line of `releaseDataFile` to // highlight the fact that the file should not be edited manually, @@ -66,7 +69,7 @@ type Release struct { // repo and generates the corresponding data expected by the `release` // package, saving the final result in the `cockroach_releases.yaml` // file which is then embedded into the binary. -func updateReleasesFile(_ *cobra.Command, _ []string) (retErr error) { +func updateReleasesFiles(_ *cobra.Command, _ []string) (retErr error) { fmt.Printf("downloading release data from %q\n", releaseDataURL) data, err := downloadReleases() if err != nil { @@ -80,10 +83,20 @@ func updateReleasesFile(_ *cobra.Command, _ []string) (retErr error) { if err := validateReleaseData(result); err != nil { return fmt.Errorf("failed to validate downloaded data: %w", err) } - addCurrentRelease(result) + currentVersion := version.MustParse(build.BinaryVersion()) + addCurrentRelease(result, currentVersion) fmt.Printf("writing results to %s\n", releaseDataFile) - if err := saveResults(result); err != nil { + if err := saveResultsInYaml(result); err != nil { + return err + } + currentSeries := fmt.Sprintf("%d.%d", currentVersion.Major(), currentVersion.Minor()) + predecessor := result[result[currentSeries].Predecessor].Latest + if predecessor == "" { + return fmt.Errorf("could not determine predecessor version for version %+v", currentVersion) + } + fmt.Printf("writing data to %s\n", logictestReposFile) + if err := generateRepositoriesFile(predecessor); err != nil { return err } fmt.Printf("done\n") @@ -158,8 +171,7 @@ func processReleaseData(data []Release) map[string]release.Series { // the binary version of the current build, if one does not exist. The // new entry will have no `Latest` information as, in that case, the // current release series is still in development. -func addCurrentRelease(data map[string]release.Series) { - currentVersion := version.MustParse(build.BinaryVersion()) +func addCurrentRelease(data map[string]release.Series, currentVersion *version.Version) { name := fmt.Sprintf("%d.%d", currentVersion.Major(), currentVersion.Minor()) if _, ok := data[name]; ok { return @@ -251,7 +263,7 @@ func downloadReleases() ([]Release, error) { return data, nil } -func saveResults(results map[string]release.Series) (retErr error) { +func writeFileIntoRepo(populateFile func(f *os.File) error, where string) (retErr error) { f, err := os.CreateTemp("", "releases") if err != nil { return fmt.Errorf("could not create temporary file: %w", err) @@ -262,21 +274,119 @@ func saveResults(results map[string]release.Series) (retErr error) { } }() - if _, err := f.Write([]byte(header)); err != nil { - return fmt.Errorf("error writing comment header: %w", err) - } - - if err := yaml.NewEncoder(f).Encode(results); err != nil { - return fmt.Errorf("could not write release data file: %w", err) + if err := populateFile(f); err != nil { + return err } - if err := os.Rename(f.Name(), releaseDataFile); err != nil { + if err := os.Rename(f.Name(), where); err != nil { return fmt.Errorf("error moving release data to final destination: %w", err) } + return nil +} +func writeHeader(f *os.File) error { + if _, err := f.Write([]byte(header)); err != nil { + return fmt.Errorf("error writing comment header: %w", err) + } return nil } +func saveResultsInYaml(results map[string]release.Series) (retErr error) { + return writeFileIntoRepo(func(f *os.File) error { + if err := writeHeader(f); err != nil { + return err + } + + if err := yaml.NewEncoder(f).Encode(results); err != nil { + return fmt.Errorf("could not write release data file: %w", err) + } + + return nil + }, releaseDataFile) +} + func releaseName(name string) string { return strings.TrimPrefix(name, "v") } + +func generateRepositoriesFile(version string) error { + client := httputil.NewClientWithTimeout(15 * time.Second) + cfgs := []string{ + "linux-amd64", + "linux-arm64", + "darwin-10.9-amd64", + "darwin-11.0-arm64", + } + cfgToHash := make(map[string]string) + for _, cfg := range cfgs { + url := fmt.Sprintf("https://binaries.cockroachdb.com/cockroach-v%s.%s.tgz", version, cfg) + resp, err := client.Get(context.Background(), url) + if err != nil { + return fmt.Errorf("could not download cockroach release: %w", err) + } + var blob bytes.Buffer + if _, err := io.Copy(&blob, resp.Body); err != nil { + return fmt.Errorf("error reading response body: %w", err) + } + sum := sha256.Sum256(blob.Bytes()) + cfgToHash[cfg] = fmt.Sprintf("%x", sum) + if err := resp.Body.Close(); err != nil { + return err + } + } + + return writeFileIntoRepo(func(f *os.File) error { + if err := writeHeader(f); err != nil { + return err + } + + fileContent := fmt.Sprintf(`load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +_PREDECESSOR_VERSION = "%s" +CONFIG_LINUX_AMD64 = "linux-amd64" +CONFIG_LINUX_ARM64 = "linux-arm64" +CONFIG_DARWIN_AMD64 = "darwin-10.9-amd64" +CONFIG_DARWIN_ARM64 = "darwin-11.0-arm64" +_CONFIGS = [ + (CONFIG_LINUX_AMD64, "%s"), + (CONFIG_LINUX_ARM64, "%s"), + (CONFIG_DARWIN_AMD64, "%s"), + (CONFIG_DARWIN_ARM64, "%s"), +] + +def _munge_name(s): + return s.replace("-", "_").replace(".", "_") + +def _repo_name(config_name): + return "cockroach_binary_v{}_{}".format( + _munge_name(_PREDECESSOR_VERSION), + _munge_name(config_name)) + +def _file_name(config_name): + return "cockroach-v{}.{}/cockroach".format( + _PREDECESSOR_VERSION, config_name) + +def target(config_name): + return "@{}//:{}".format(_repo_name(config_name), + _file_name(config_name)) + +def cockroach_binaries_for_testing(): + for config in _CONFIGS: + config_name, shasum = config + file_name = _file_name(config_name) + http_archive( + name = _repo_name(config_name), + build_file_content = """exports_files(["{}"])""".format(file_name), + sha256 = shasum, + urls = [ + "https://binaries.cockroachdb.com/{}".format( + file_name.removesuffix("/cockroach")) + ".tgz", + ], + ) +`, version, cfgToHash["linux-amd64"], cfgToHash["linux-arm64"], cfgToHash["darwin-10.9-amd64"], cfgToHash["darwin-11.0-arm64"]) + if _, err := f.WriteString(fileContent); err != nil { + return err + } + return nil + }, logictestReposFile) +} diff --git a/pkg/sql/logictest/BUILD.bazel b/pkg/sql/logictest/BUILD.bazel index 14d7d2a78fc1..abbe043ccde2 100644 --- a/pkg/sql/logictest/BUILD.bazel +++ b/pkg/sql/logictest/BUILD.bazel @@ -1,4 +1,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") +load( + ":REPOSITORIES.bzl", + "CONFIG_DARWIN_AMD64", + "CONFIG_DARWIN_ARM64", + "CONFIG_LINUX_AMD64", + "CONFIG_LINUX_ARM64", + "target", +) filegroup( name = "testdata", @@ -18,6 +26,20 @@ filegroup( ], ) +filegroup( + name = "cockroach_predecessor_version", + srcs = select({ + "//build/toolchains:is_linux_amd64": [target(CONFIG_LINUX_AMD64)], + "//build/toolchains:is_linux_arm64": [target(CONFIG_LINUX_ARM64)], + "//build/toolchains:is_darwin_amd64": [target(CONFIG_DARWIN_AMD64)], + "//build/toolchains:is_darwin_arm64": [target(CONFIG_DARWIN_ARM64)], + "//conditions:default": [], + }), + visibility = [ + "//pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master:__pkg__", + ], +) + go_library( name = "logictest", testonly = 1, @@ -61,7 +83,6 @@ go_library( "//pkg/testutils/skip", "//pkg/testutils/sqlutils", "//pkg/util", - "//pkg/util/binfetcher", "//pkg/util/envutil", "//pkg/util/log", "//pkg/util/randutil", diff --git a/pkg/sql/logictest/REPOSITORIES.bzl b/pkg/sql/logictest/REPOSITORIES.bzl new file mode 100644 index 000000000000..ea5617431e83 --- /dev/null +++ b/pkg/sql/logictest/REPOSITORIES.bzl @@ -0,0 +1,44 @@ +# DO NOT EDIT THIS FILE MANUALLY! Use `release update-releases-file`. +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +_PREDECESSOR_VERSION = "23.1.10" +CONFIG_LINUX_AMD64 = "linux-amd64" +CONFIG_LINUX_ARM64 = "linux-arm64" +CONFIG_DARWIN_AMD64 = "darwin-10.9-amd64" +CONFIG_DARWIN_ARM64 = "darwin-11.0-arm64" +_CONFIGS = [ + (CONFIG_LINUX_AMD64, "762efbdb99861d8b2f5b13025ba0b60620732636727b2184ab81176cf884fe82"), + (CONFIG_LINUX_ARM64, "9d1f06f64670c8da319f1cd219e679bfa4844cc0c86d9724dca96af10bcc3ce9"), + (CONFIG_DARWIN_AMD64, "9e0582a998904b6b596a9f830083b7476482b8f738d2a5edd2f803eeb58b4113"), + (CONFIG_DARWIN_ARM64, "9d189d07028c42c297274796df0f219e00f98752dbb8c52ad53b27beca0defc3"), +] + +def _munge_name(s): + return s.replace("-", "_").replace(".", "_") + +def _repo_name(config_name): + return "cockroach_binary_v{}_{}".format( + _munge_name(_PREDECESSOR_VERSION), + _munge_name(config_name)) + +def _file_name(config_name): + return "cockroach-v{}.{}/cockroach".format( + _PREDECESSOR_VERSION, config_name) + +def target(config_name): + return "@{}//:{}".format(_repo_name(config_name), + _file_name(config_name)) + +def cockroach_binaries_for_testing(): + for config in _CONFIGS: + config_name, shasum = config + file_name = _file_name(config_name) + http_archive( + name = _repo_name(config_name), + build_file_content = """exports_files(["{}"])""".format(file_name), + sha256 = shasum, + urls = [ + "https://binaries.cockroachdb.com/{}".format( + file_name.removesuffix("/cockroach")) + ".tgz", + ], + ) diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index 60a8e869e55c..61cfe40acf0b 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -74,7 +74,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" "github.com/cockroachdb/cockroach/pkg/util" - "github.com/cockroachdb/cockroach/pkg/util/binfetcher" "github.com/cockroachdb/cockroach/pkg/util/envutil" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/cockroachdb/cockroach/pkg/util/randutil" @@ -1888,13 +1887,7 @@ func (t *logicTest) setup( if err != nil { t.Fatal(err) } - bootstrapBinaryPath, err := binfetcher.Download(context.Background(), binfetcher.Options{ - Binary: "cockroach", - Dir: tempExternalIODir, - Version: "v" + bootstrapVersion, - GOOS: runtime.GOOS, - GOARCH: runtime.GOARCH, - }) + bootstrapBinaryPath, err := locateCockroachPredecessor(bootstrapVersion) if err != nil { t.Fatal(err) } @@ -4374,3 +4367,31 @@ func (t *logicTest) printCompletion(path string, config logictestbase.TestCluste t.outf("--- done: %s with config %s: %d tests, %d failures%s", path, config.Name, t.progress, t.failures, unsupportedMsg) } + +func locateCockroachPredecessor(version string) (string, error) { + if !strings.HasPrefix(version, "v") { + version = "v" + version + } + munge := func(s string) string { + return strings.ReplaceAll( + strings.ReplaceAll(s, ".", "_"), "-", "_") + } + configs := map[string]string{ + "linux_amd64": "linux-amd64", + "linux_arm64": "linux-arm64", + "darwin_amd64": "darwin-10.9-amd64", + "darwin_arm64": "darwin-11.0-arm64", + } + cfg, ok := configs[fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH)] + if !ok { + return "", fmt.Errorf("unknown GOOS/GOARCH combination") + } + where := fmt.Sprintf( + "external/cockroach_binary_%s_%s/cockroach-%s.%s/cockroach", + munge(version), munge(cfg), version, cfg) + path, err := bazel.Runfile(where) + if err != nil { + return "", err + } + return path, nil +} diff --git a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel index 162d534e7b65..d220cf879586 100644 --- a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 14, tags = [ "cpu:3", diff --git a/pkg/sql/logictest/tests/5node/BUILD.bazel b/pkg/sql/logictest/tests/5node/BUILD.bazel index 4f7415faf835..b7ae5a54ee48 100644 --- a/pkg/sql/logictest/tests/5node/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 20, tags = [ "cpu:3", 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 e162ec11c334..9e1a32cc3035 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 @@ -11,12 +11,10 @@ go_test( data = [ "//c-deps:libgeos", # keep "//pkg/cmd/cockroach-short", # keep + "//pkg/sql/logictest:cockroach_predecessor_version", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "dockerNetwork": "standard", - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 11, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel index fcee35497d74..bfec622358a9 100644 --- a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel index af8b08e8fab9..6ad4fa9aa85c 100644 --- a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist/BUILD.bazel b/pkg/sql/logictest/tests/fakedist/BUILD.bazel index 9a99fd68a1ef..eea135d3cd63 100644 --- a/pkg/sql/logictest/tests/fakedist/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", 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 894240a76b9a..2b5fbe951688 100644 --- a/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", 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 6ce886eaa616..37c5e2480453 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel index 07b1099b2011..01f05992a933 100644 --- a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/local/BUILD.bazel b/pkg/sql/logictest/tests/local/BUILD.bazel index 292a65d4f747..95e72026dc7e 100644 --- a/pkg/sql/logictest/tests/local/BUILD.bazel +++ b/pkg/sql/logictest/tests/local/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", 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 7a7eae44a4be..d53085d869f4 100644 --- a/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:4", diff --git a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel index 1d9fc32bf440..97230ae6abd5 100644 --- a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel index f9c20de3a278..77931b5ae7dd 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 29, tags = [ "cpu:3", 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 0e0ffb5d7c73..a114c533de23 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", 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 256524db72e0..27b7e2ac1b33 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel index f880fd6a2e15..888d6d4d7c57 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", 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 a7a0d3d2f6d0..6ce9b19d7eae 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", 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 439a9039ba50..5e41ab67671d 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", 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 c2ca74eb39f2..abc3456b1a9e 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 @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", diff --git a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel index 8f8ca625693d..231fdfb70628 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel @@ -12,9 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel index fd86c6a8fbb2..b41326ae680a 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel index e2d071d16ec6..2af7b5d54cd3 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel index 513e5cd54785..54f265bd5e3f 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel index 5305b752d85d..5a49d33ac06a 100644 --- a/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel index a22a1ab0ab9c..643e88cfbe65 100644 --- a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel index 1466eee80045..9d1632bc5d00 100644 --- a/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel index 2abc629ab967..e440080c63bf 100644 --- a/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel @@ -9,9 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], - exec_properties = { - "Pool": "large", - }, + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1",