172 lines
5.4 KiB
Python
172 lines
5.4 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "task",
|
|
srcs = [
|
|
"backup.go",
|
|
"backup_ebs.go",
|
|
"backup_raw.go",
|
|
"backup_txn.go",
|
|
"common.go",
|
|
"encryption.go",
|
|
"restore.go",
|
|
"restore_data.go",
|
|
"restore_ebs_meta.go",
|
|
"restore_raw.go",
|
|
"restore_txn.go",
|
|
"stream.go",
|
|
],
|
|
importpath = "github.com/pingcap/tidb/br/pkg/task",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//br/pkg/aws",
|
|
"//br/pkg/backup",
|
|
"//br/pkg/backup/prepare_snap",
|
|
"//br/pkg/checkpoint",
|
|
"//br/pkg/common",
|
|
"//br/pkg/config",
|
|
"//br/pkg/conn",
|
|
"//br/pkg/conn/util",
|
|
"//br/pkg/encryption",
|
|
"//br/pkg/errors",
|
|
"//br/pkg/glue",
|
|
"//br/pkg/httputil",
|
|
"//br/pkg/logutil",
|
|
"//br/pkg/metautil",
|
|
"//br/pkg/pdutil",
|
|
"//br/pkg/registry",
|
|
"//br/pkg/restore",
|
|
"//br/pkg/restore/data",
|
|
"//br/pkg/restore/ingestrec",
|
|
"//br/pkg/restore/log_client",
|
|
"//br/pkg/restore/snap_client",
|
|
"//br/pkg/restore/tiflashrec",
|
|
"//br/pkg/restore/utils",
|
|
"//br/pkg/rtree",
|
|
"//br/pkg/stream",
|
|
"//br/pkg/streamhelper",
|
|
"//br/pkg/streamhelper/config",
|
|
"//br/pkg/streamhelper/daemon",
|
|
"//br/pkg/summary",
|
|
"//br/pkg/utils",
|
|
"//br/pkg/utils/iter",
|
|
"//br/pkg/version",
|
|
"//pkg/config",
|
|
"//pkg/ddl",
|
|
"//pkg/domain",
|
|
"//pkg/infoschema",
|
|
"//pkg/infoschema/context",
|
|
"//pkg/kv",
|
|
"//pkg/meta/model",
|
|
"//pkg/metrics",
|
|
"//pkg/objstore",
|
|
"//pkg/objstore/storeapi",
|
|
"//pkg/parser/ast",
|
|
"//pkg/parser/mysql",
|
|
"//pkg/sessionctx/stmtctx",
|
|
"//pkg/sessionctx/vardef",
|
|
"//pkg/sessionctx/variable",
|
|
"//pkg/statistics/handle",
|
|
"//pkg/tablecodec",
|
|
"//pkg/types",
|
|
"//pkg/util",
|
|
"//pkg/util/cdcutil",
|
|
"//pkg/util/codec",
|
|
"//pkg/util/collate",
|
|
"//pkg/util/engine",
|
|
"//pkg/util/table-filter",
|
|
"@com_github_docker_go_units//:go-units",
|
|
"@com_github_fatih_color//:color",
|
|
"@com_github_gogo_protobuf//proto",
|
|
"@com_github_google_uuid//:uuid",
|
|
"@com_github_opentracing_opentracing_go//:opentracing-go",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_pingcap_failpoint//:failpoint",
|
|
"@com_github_pingcap_kvproto//pkg/brpb",
|
|
"@com_github_pingcap_kvproto//pkg/encryptionpb",
|
|
"@com_github_pingcap_kvproto//pkg/kvrpcpb",
|
|
"@com_github_pingcap_kvproto//pkg/metapb",
|
|
"@com_github_pingcap_log//:log",
|
|
"@com_github_spf13_cobra//:cobra",
|
|
"@com_github_spf13_pflag//:pflag",
|
|
"@com_github_tikv_client_go_v2//config",
|
|
"@com_github_tikv_client_go_v2//oracle",
|
|
"@com_github_tikv_client_go_v2//tikv",
|
|
"@com_github_tikv_client_go_v2//util",
|
|
"@com_github_tikv_pd_client//:client",
|
|
"@com_github_tikv_pd_client//http",
|
|
"@com_google_cloud_go_storage//:storage",
|
|
"@io_etcd_go_etcd_client_pkg_v3//transport",
|
|
"@io_etcd_go_etcd_client_v3//:client",
|
|
"@org_golang_google_grpc//:grpc",
|
|
"@org_golang_google_grpc//backoff",
|
|
"@org_golang_google_grpc//keepalive",
|
|
"@org_golang_x_sync//errgroup",
|
|
"@org_uber_go_multierr//:multierr",
|
|
"@org_uber_go_zap//:zap",
|
|
"@org_uber_go_zap//zapcore",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "task_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"backup_ebs_test.go",
|
|
"backup_test.go",
|
|
"common_test.go",
|
|
"config_test.go",
|
|
"encryption_test.go",
|
|
"restore_test.go",
|
|
"stream_test.go",
|
|
],
|
|
embed = [":task"],
|
|
flaky = True,
|
|
shard_count = 43,
|
|
deps = [
|
|
"//br/pkg/backup",
|
|
"//br/pkg/config",
|
|
"//br/pkg/conn",
|
|
"//br/pkg/errors",
|
|
"//br/pkg/gluetidb",
|
|
"//br/pkg/gluetidb/mock",
|
|
"//br/pkg/metautil",
|
|
"//br/pkg/mock",
|
|
"//br/pkg/restore/snap_client",
|
|
"//br/pkg/restore/split",
|
|
"//br/pkg/restore/tiflashrec",
|
|
"//br/pkg/stream",
|
|
"//br/pkg/utils",
|
|
"//br/pkg/utiltest",
|
|
"//pkg/config",
|
|
"//pkg/ddl",
|
|
"//pkg/kv",
|
|
"//pkg/meta/model",
|
|
"//pkg/objstore",
|
|
"//pkg/objstore/s3like",
|
|
"//pkg/parser/ast",
|
|
"//pkg/parser/mysql",
|
|
"//pkg/statistics/util",
|
|
"//pkg/tablecodec",
|
|
"//pkg/testkit",
|
|
"//pkg/types",
|
|
"//pkg/util/table-filter",
|
|
"@com_github_docker_go_units//:go-units",
|
|
"@com_github_gogo_protobuf//proto",
|
|
"@com_github_golang_protobuf//proto",
|
|
"@com_github_pingcap_errors//:errors",
|
|
"@com_github_pingcap_kvproto//pkg/brpb",
|
|
"@com_github_pingcap_kvproto//pkg/encryptionpb",
|
|
"@com_github_pingcap_kvproto//pkg/metapb",
|
|
"@com_github_spf13_pflag//:pflag",
|
|
"@com_github_stretchr_testify//assert",
|
|
"@com_github_stretchr_testify//require",
|
|
"@com_github_tikv_client_go_v2//oracle",
|
|
"@com_github_tikv_pd_client//:client",
|
|
"@com_github_tikv_pd_client//http",
|
|
"@com_github_tikv_pd_client//opt",
|
|
"@com_github_tikv_pd_client//pkg/caller",
|
|
"@org_golang_google_grpc//keepalive",
|
|
],
|
|
)
|