From bd36058ea99159404518bf9a724cf989afc1a3f4 Mon Sep 17 00:00:00 2001 From: irfan sharif Date: Fri, 29 Apr 2022 02:21:40 -0400 Subject: [PATCH] backupccl: break dependency to testcluster Noticed we were building testing library packages when building CRDB binaries. $ bazel query "somepath(//pkg/cmd/cockroach-short, //pkg/testutils/testcluster)" //pkg/cmd/cockroach-short:cockroach-short //pkg/cmd/cockroach-short:cockroach-short_lib //pkg/ccl:ccl //pkg/ccl/backupccl:backupccl //pkg/testutils/testcluster:testcluster Release note: None --- pkg/ccl/backupccl/BUILD.bazel | 12 ++---------- pkg/ccl/backupccl/{testutils.go => utils_test.go} | 0 2 files changed, 2 insertions(+), 10 deletions(-) rename pkg/ccl/backupccl/{testutils.go => utils_test.go} (100%) diff --git a/pkg/ccl/backupccl/BUILD.bazel b/pkg/ccl/backupccl/BUILD.bazel index 5342ee295367..7168db303adc 100644 --- a/pkg/ccl/backupccl/BUILD.bazel +++ b/pkg/ccl/backupccl/BUILD.bazel @@ -33,7 +33,6 @@ go_library( "split_and_scatter_processor.go", "system_schema.go", "targets.go", - "testutils.go", ], embed = [":backupccl_go_proto"], importpath = "github.com/cockroachdb/cockroach/pkg/ccl/backupccl", @@ -79,7 +78,6 @@ go_library( "//pkg/sql/catalog/descidgen", "//pkg/sql/catalog/descpb", "//pkg/sql/catalog/descs", - "//pkg/sql/catalog/desctestutils", "//pkg/sql/catalog/ingesting", "//pkg/sql/catalog/multiregion", "//pkg/sql/catalog/nstree", @@ -111,10 +109,6 @@ go_library( "//pkg/sql/stats", "//pkg/sql/types", "//pkg/storage", - "//pkg/testutils", - "//pkg/testutils/serverutils", - "//pkg/testutils/sqlutils", - "//pkg/testutils/testcluster", "//pkg/util", "//pkg/util/admission", "//pkg/util/contextutil", @@ -129,7 +123,6 @@ go_library( "//pkg/util/metric", "//pkg/util/mon", "//pkg/util/protoutil", - "//pkg/util/randutil", "//pkg/util/retry", "//pkg/util/span", "//pkg/util/stop", @@ -137,15 +130,12 @@ go_library( "//pkg/util/timeutil", "//pkg/util/tracing", "//pkg/util/uuid", - "//pkg/workload/bank", - "//pkg/workload/workloadsql", "@com_github_cockroachdb_errors//:errors", "@com_github_cockroachdb_logtags//:logtags", "@com_github_gogo_protobuf//jsonpb", "@com_github_gogo_protobuf//types", "@com_github_kr_pretty//:pretty", "@com_github_robfig_cron_v3//:cron", - "@com_github_stretchr_testify//require", ], ) @@ -180,6 +170,7 @@ go_test( "show_test.go", "split_and_scatter_processor_test.go", "system_schema_test.go", + "utils_test.go", ], data = glob(["testdata/**"]) + ["//c-deps:libgeos"], embed = [":backupccl"], @@ -271,6 +262,7 @@ go_test( "//pkg/util/timeutil", "//pkg/util/uuid", "//pkg/workload/bank", + "//pkg/workload/workloadsql", "@com_github_aws_aws_sdk_go//aws/credentials", "@com_github_cockroachdb_cockroach_go_v2//crdb", "@com_github_cockroachdb_datadriven//:datadriven", diff --git a/pkg/ccl/backupccl/testutils.go b/pkg/ccl/backupccl/utils_test.go similarity index 100% rename from pkg/ccl/backupccl/testutils.go rename to pkg/ccl/backupccl/utils_test.go