|
| 1 | +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| 2 | + |
| 3 | +go_library( |
| 4 | + name = "importer", |
| 5 | + srcs = [ |
| 6 | + "check_info.go", |
| 7 | + "check_template.go", |
| 8 | + "checksum_helper.go", |
| 9 | + "chunk_process.go", |
| 10 | + "dup_detect.go", |
| 11 | + "get_pre_info.go", |
| 12 | + "import.go", |
| 13 | + "meta_manager.go", |
| 14 | + "precheck.go", |
| 15 | + "precheck_impl.go", |
| 16 | + "table_import.go", |
| 17 | + "tidb.go", |
| 18 | + ], |
| 19 | + importpath = "github.com/pingcap/tidb/br/pkg/lightning/importer", |
| 20 | + visibility = ["//visibility:public"], |
| 21 | + deps = [ |
| 22 | + "//br/pkg/backup", |
| 23 | + "//br/pkg/errors", |
| 24 | + "//br/pkg/lightning/backend", |
| 25 | + "//br/pkg/lightning/backend/encode", |
| 26 | + "//br/pkg/lightning/backend/kv", |
| 27 | + "//br/pkg/lightning/backend/local", |
| 28 | + "//br/pkg/lightning/backend/tidb", |
| 29 | + "//br/pkg/lightning/checkpoints", |
| 30 | + "//br/pkg/lightning/common", |
| 31 | + "//br/pkg/lightning/config", |
| 32 | + "//br/pkg/lightning/duplicate", |
| 33 | + "//br/pkg/lightning/errormanager", |
| 34 | + "//br/pkg/lightning/importer/opts", |
| 35 | + "//br/pkg/lightning/log", |
| 36 | + "//br/pkg/lightning/metric", |
| 37 | + "//br/pkg/lightning/mydump", |
| 38 | + "//br/pkg/lightning/precheck", |
| 39 | + "//br/pkg/lightning/tikv", |
| 40 | + "//br/pkg/lightning/verification", |
| 41 | + "//br/pkg/lightning/web", |
| 42 | + "//br/pkg/lightning/worker", |
| 43 | + "//br/pkg/pdutil", |
| 44 | + "//br/pkg/redact", |
| 45 | + "//br/pkg/storage", |
| 46 | + "//br/pkg/streamhelper", |
| 47 | + "//br/pkg/utils", |
| 48 | + "//br/pkg/version", |
| 49 | + "//br/pkg/version/build", |
| 50 | + "//config", |
| 51 | + "//ddl", |
| 52 | + "//errno", |
| 53 | + "//keyspace", |
| 54 | + "//kv", |
| 55 | + "//meta/autoid", |
| 56 | + "//parser", |
| 57 | + "//parser/ast", |
| 58 | + "//parser/format", |
| 59 | + "//parser/model", |
| 60 | + "//parser/mysql", |
| 61 | + "//planner/core", |
| 62 | + "//sessionctx/variable", |
| 63 | + "//store/driver", |
| 64 | + "//store/driver/txn", |
| 65 | + "//store/pdtypes", |
| 66 | + "//table", |
| 67 | + "//table/tables", |
| 68 | + "//tablecodec", |
| 69 | + "//types", |
| 70 | + "//util/codec", |
| 71 | + "//util/collate", |
| 72 | + "//util/dbterror", |
| 73 | + "//util/engine", |
| 74 | + "//util/extsort", |
| 75 | + "//util/mathutil", |
| 76 | + "//util/mock", |
| 77 | + "//util/regexpr-router", |
| 78 | + "//util/set", |
| 79 | + "@com_github_coreos_go_semver//semver", |
| 80 | + "@com_github_docker_go_units//:go-units", |
| 81 | + "@com_github_go_sql_driver_mysql//:mysql", |
| 82 | + "@com_github_google_uuid//:uuid", |
| 83 | + "@com_github_jedib0t_go_pretty_v6//table", |
| 84 | + "@com_github_jedib0t_go_pretty_v6//text", |
| 85 | + "@com_github_pingcap_errors//:errors", |
| 86 | + "@com_github_pingcap_failpoint//:failpoint", |
| 87 | + "@com_github_pingcap_kvproto//pkg/metapb", |
| 88 | + "@com_github_prometheus_client_golang//prometheus", |
| 89 | + "@com_github_tikv_client_go_v2//config", |
| 90 | + "@com_github_tikv_client_go_v2//util", |
| 91 | + "@com_github_tikv_pd_client//:client", |
| 92 | + "@io_etcd_go_etcd_client_v3//:client", |
| 93 | + "@org_golang_google_grpc//:grpc", |
| 94 | + "@org_golang_google_grpc//codes", |
| 95 | + "@org_golang_google_grpc//status", |
| 96 | + "@org_golang_x_exp//maps", |
| 97 | + "@org_golang_x_exp//slices", |
| 98 | + "@org_golang_x_sync//errgroup", |
| 99 | + "@org_uber_go_atomic//:atomic", |
| 100 | + "@org_uber_go_multierr//:multierr", |
| 101 | + "@org_uber_go_zap//:zap", |
| 102 | + ], |
| 103 | +) |
| 104 | + |
| 105 | +go_test( |
| 106 | + name = "importer_test", |
| 107 | + timeout = "short", |
| 108 | + srcs = [ |
| 109 | + "check_info_test.go", |
| 110 | + "chunk_process_test.go", |
| 111 | + "dup_detect_test.go", |
| 112 | + "get_pre_info_test.go", |
| 113 | + "import_test.go", |
| 114 | + "meta_manager_test.go", |
| 115 | + "precheck_impl_test.go", |
| 116 | + "precheck_test.go", |
| 117 | + "restore_schema_test.go", |
| 118 | + "table_import_test.go", |
| 119 | + "tidb_test.go", |
| 120 | + ], |
| 121 | + embed = [":importer"], |
| 122 | + flaky = True, |
| 123 | + shard_count = 50, |
| 124 | + deps = [ |
| 125 | + "//br/pkg/lightning/backend", |
| 126 | + "//br/pkg/lightning/backend/encode", |
| 127 | + "//br/pkg/lightning/backend/kv", |
| 128 | + "//br/pkg/lightning/backend/local", |
| 129 | + "//br/pkg/lightning/backend/tidb", |
| 130 | + "//br/pkg/lightning/checkpoints", |
| 131 | + "//br/pkg/lightning/common", |
| 132 | + "//br/pkg/lightning/config", |
| 133 | + "//br/pkg/lightning/duplicate", |
| 134 | + "//br/pkg/lightning/errormanager", |
| 135 | + "//br/pkg/lightning/importer/mock", |
| 136 | + "//br/pkg/lightning/importer/opts", |
| 137 | + "//br/pkg/lightning/log", |
| 138 | + "//br/pkg/lightning/metric", |
| 139 | + "//br/pkg/lightning/mydump", |
| 140 | + "//br/pkg/lightning/precheck", |
| 141 | + "//br/pkg/lightning/verification", |
| 142 | + "//br/pkg/lightning/web", |
| 143 | + "//br/pkg/lightning/worker", |
| 144 | + "//br/pkg/mock", |
| 145 | + "//br/pkg/storage", |
| 146 | + "//br/pkg/streamhelper", |
| 147 | + "//br/pkg/version/build", |
| 148 | + "//ddl", |
| 149 | + "//errno", |
| 150 | + "//kv", |
| 151 | + "//meta", |
| 152 | + "//meta/autoid", |
| 153 | + "//parser", |
| 154 | + "//parser/ast", |
| 155 | + "//parser/model", |
| 156 | + "//parser/mysql", |
| 157 | + "//store/mockstore", |
| 158 | + "//store/pdtypes", |
| 159 | + "//table/tables", |
| 160 | + "//tablecodec", |
| 161 | + "//types", |
| 162 | + "//util/codec", |
| 163 | + "//util/dbutil", |
| 164 | + "//util/extsort", |
| 165 | + "//util/mock", |
| 166 | + "//util/promutil", |
| 167 | + "//util/table-filter", |
| 168 | + "//util/table-router", |
| 169 | + "@com_github_data_dog_go_sqlmock//:go-sqlmock", |
| 170 | + "@com_github_docker_go_units//:go-units", |
| 171 | + "@com_github_go_sql_driver_mysql//:mysql", |
| 172 | + "@com_github_golang_mock//gomock", |
| 173 | + "@com_github_google_uuid//:uuid", |
| 174 | + "@com_github_pingcap_errors//:errors", |
| 175 | + "@com_github_pingcap_failpoint//:failpoint", |
| 176 | + "@com_github_pingcap_kvproto//pkg/metapb", |
| 177 | + "@com_github_stretchr_testify//require", |
| 178 | + "@com_github_stretchr_testify//suite", |
| 179 | + "@com_github_tikv_client_go_v2//config", |
| 180 | + "@com_github_tikv_client_go_v2//testutils", |
| 181 | + "@com_github_tikv_pd_client//:client", |
| 182 | + "@com_github_xitongsys_parquet_go//writer", |
| 183 | + "@com_github_xitongsys_parquet_go_source//buffer", |
| 184 | + "@io_etcd_go_etcd_client_v3//:client", |
| 185 | + "@io_etcd_go_etcd_tests_v3//integration", |
| 186 | + "@org_golang_x_exp//slices", |
| 187 | + "@org_uber_go_zap//:zap", |
| 188 | + ], |
| 189 | +) |
0 commit comments