Skip to content

Commit

Permalink
*: update bazel config (#38745)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Nov 1, 2022
1 parent 5a8fd6d commit 08aa32e
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 4 deletions.
3 changes: 3 additions & 0 deletions br/pkg/restore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(
"db.go",
"import.go",
"import_retry.go",
"log_client.go",
"merge.go",
"pipeline_items.go",
"range.go",
Expand Down Expand Up @@ -41,6 +42,7 @@ go_library(
"//br/pkg/stream",
"//br/pkg/summary",
"//br/pkg/utils",
"//br/pkg/utils/iter",
"//config",
"//ddl",
"//ddl/util",
Expand Down Expand Up @@ -131,6 +133,7 @@ go_test(
"//br/pkg/storage",
"//br/pkg/stream",
"//br/pkg/utils",
"//br/pkg/utils/iter",
"//infoschema",
"//kv",
"//meta/autoid",
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/storage/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ go_library(
"@com_github_aws_aws_sdk_go//service/s3/s3manager",
"@com_github_azure_azure_sdk_for_go_sdk_azidentity//:azidentity",
"@com_github_azure_azure_sdk_for_go_sdk_storage_azblob//:azblob",
"@com_github_golang_snappy//:snappy",
"@com_github_google_uuid//:uuid",
"@com_github_klauspost_compress//zstd",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_kvproto//pkg/brpb",
"@com_github_pingcap_log//:log",
Expand Down
30 changes: 30 additions & 0 deletions br/pkg/utils/iter/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "iter",
srcs = [
"combinator_types.go",
"combinators.go",
"iter.go",
"source.go",
"source_types.go",
],
importpath = "github.com/pingcap/tidb/br/pkg/utils/iter",
visibility = ["//visibility:public"],
deps = [
"//br/pkg/utils",
"@org_golang_x_exp//constraints",
"@org_golang_x_sync//errgroup",
],
)

go_test(
name = "iter_test",
srcs = ["combinator_test.go"],
flaky = True,
race = "on",
deps = [
":iter",
"@com_github_stretchr_testify//require",
],
)
3 changes: 2 additions & 1 deletion ddl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ go_test(
"//parser/terror",
"//parser/types",
"//planner/core",
"//server",
"//session",
"//sessionctx",
"//sessionctx/stmtctx",
Expand Down Expand Up @@ -256,7 +257,7 @@ go_test(
"@com_github_tikv_client_go_v2//testutils",
"@com_github_tikv_client_go_v2//tikv",
"@io_etcd_go_etcd_client_v3//:client",
"@io_etcd_go_etcd_tests_v3//integration",
"@org_golang_google_grpc//:grpc",
"@org_golang_x_exp//slices",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_goleak//:goleak",
Expand Down
1 change: 1 addition & 0 deletions executor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ go_library(
"//util/rowDecoder",
"//util/rowcodec",
"//util/sem",
"//util/servermemorylimit",
"//util/set",
"//util/size",
"//util/sqlexec",
Expand Down
1 change: 0 additions & 1 deletion executor/seqtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ go_test(
"//parser/ast",
"//parser/model",
"//parser/mysql",
"//parser/terror",
"//planner/core",
"//server",
"//session",
Expand Down
2 changes: 2 additions & 0 deletions infoschema/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ go_test(
"//testkit/testutil",
"//types",
"//util",
"//util/gctuner",
"//util/memory",
"//util/pdapi",
"//util/resourcegrouptag",
"//util/set",
Expand Down
2 changes: 1 addition & 1 deletion tests/realtikvtest/addindextest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ go_test(
"add_index_test.go",
"concurrent_ddl_test.go",
"failpoints_test.go",
"integration_test.go",
"main_test.go",
"memory_test.go",
"multi_schema_change_test.go",
"pitr_test.go",
],
Expand Down
1 change: 1 addition & 0 deletions util/memory/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ go_library(
"//util/cgroup",
"//util/dbterror",
"//util/logutil",
"//util/mathutil",
"@com_github_shirou_gopsutil_v3//mem",
"@org_golang_x_exp//slices",
"@org_uber_go_atomic//:atomic",
Expand Down
18 changes: 17 additions & 1 deletion util/servermemorylimit/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "servermemorylimit",
srcs = ["servermemorylimit.go"],
importpath = "github.com/pingcap/tidb/util/servermemorylimit",
visibility = ["//visibility:public"],
deps = [
"//parser/mysql",
"//types",
"//util",
"//util/memory",
"@org_uber_go_atomic//:atomic",
],
)

go_test(
name = "servermemorylimit_test",
srcs = ["servermemorylimit_test.go"],
embed = [":servermemorylimit"],
flaky = True,
race = "on",
deps = [
"//types",
"//util",
"@com_github_stretchr_testify//require",
],
)

0 comments on commit 08aa32e

Please sign in to comment.