112 lines
3.1 KiB
Python
112 lines
3.1 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "utils",
|
|
srcs = [
|
|
"backoff.go",
|
|
"db.go",
|
|
"dyn_pprof_other.go",
|
|
"dyn_pprof_unix.go",
|
|
"env.go",
|
|
"json.go",
|
|
"key.go",
|
|
"math.go",
|
|
"misc.go",
|
|
"permission.go",
|
|
"pprof.go",
|
|
"progress.go",
|
|
"retry.go",
|
|
"safe_point.go",
|
|
"schema.go",
|
|
"sensitive.go",
|
|
"store_manager.go",
|
|
"worker.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/br/pkg/utils",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//br/pkg/errors",
|
|
"//br/pkg/logutil",
|
|
"//br/pkg/metautil",
|
|
"//errno",
|
|
"//kv",
|
|
"//parser/model",
|
|
"//parser/mysql",
|
|
"//parser/terror",
|
|
"//parser/types",
|
|
"//sessionctx",
|
|
"//util",
|
|
"//util/sqlexec",
|
|
"@com_github_cheggaaa_pb_v3//:pb",
|
|
"@com_github_docker_go_units//:go-units",
|
|
"@com_github_google_uuid//:uuid",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_pingcap_failpoint//:failpoint",
|
|
"@com_github_pingcap_kvproto//pkg/brpb",
|
|
"@com_github_pingcap_kvproto//pkg/metapb",
|
|
"@com_github_pingcap_log//:log",
|
|
"@com_github_tikv_client_go_v2//oracle",
|
|
"@com_github_tikv_pd_client//:client",
|
|
"@org_golang_google_grpc//:grpc",
|
|
"@org_golang_google_grpc//backoff",
|
|
"@org_golang_google_grpc//codes",
|
|
"@org_golang_google_grpc//credentials",
|
|
"@org_golang_google_grpc//credentials/insecure",
|
|
"@org_golang_google_grpc//keepalive",
|
|
"@org_golang_google_grpc//status",
|
|
"@org_golang_x_net//http/httpproxy",
|
|
"@org_golang_x_sync//errgroup",
|
|
"@org_uber_go_multierr//:multierr",
|
|
"@org_uber_go_zap//:zap",
|
|
"@org_uber_go_zap//zapcore",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "utils_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"backoff_test.go",
|
|
"db_test.go",
|
|
"env_test.go",
|
|
"json_test.go",
|
|
"key_test.go",
|
|
"main_test.go",
|
|
"math_test.go",
|
|
"misc_test.go",
|
|
"progress_test.go",
|
|
"safe_point_test.go",
|
|
"schema_test.go",
|
|
"sensitive_test.go",
|
|
],
|
|
embed = [":utils"],
|
|
flaky = True,
|
|
shard_count = 20,
|
|
deps = [
|
|
"//br/pkg/errors",
|
|
"//br/pkg/metautil",
|
|
"//br/pkg/storage",
|
|
"//kv",
|
|
"//parser/ast",
|
|
"//parser/model",
|
|
"//parser/mysql",
|
|
"//parser/types",
|
|
"//statistics/handle",
|
|
"//tablecodec",
|
|
"//testkit/testsetup",
|
|
"//types",
|
|
"//util/chunk",
|
|
"//util/sqlexec",
|
|
"@com_github_golang_protobuf//proto",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_pingcap_kvproto//pkg/brpb",
|
|
"@com_github_pingcap_kvproto//pkg/encryptionpb",
|
|
"@com_github_stretchr_testify//require",
|
|
"@com_github_tikv_pd_client//:client",
|
|
"@org_golang_google_grpc//codes",
|
|
"@org_golang_google_grpc//status",
|
|
"@org_uber_go_goleak//:goleak",
|
|
"@org_uber_go_multierr//:multierr",
|
|
],
|
|
)
|