Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: update bazel config #41296

Merged
merged 11 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build:race --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=

test --test_env=TZ=Asia/Shanghai
test --test_output=errors --test_summary=testcase
test:ci --color=yes --spawn_strategy=local
test:ci --color=yes
test:ci --verbose_failures --test_verbose_timeout_warnings
test:ci --test_env=GO_TEST_WRAP_TESTV=1
test:ci --experimental_ui_max_stdouterr_bytes=104857600
Expand Down
2 changes: 2 additions & 0 deletions autoid_service/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ go_library(

go_test(
name = "autoid_service_test",
timeout = "short",
srcs = ["autoid_test.go"],
embed = [":autoid_service"],
flaky = True,
deps = [
"//parser/model",
"//testkit",
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/aws/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ go_library(

go_test(
name = "aws_test",
timeout = "short",
srcs = ["ebs_test.go"],
embed = [":aws"],
flaky = True,
deps = [
"@com_github_aws_aws_sdk_go//aws",
"@com_github_aws_aws_sdk_go//service/ec2",
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/checkpoint/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ go_library(

go_test(
name = "checkpoint_test",
timeout = "short",
srcs = ["checkpoint_test.go"],
flaky = True,
deps = [
":checkpoint",
"//br/pkg/rtree",
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ go_library(

go_test(
name = "config_test",
timeout = "short",
srcs = ["ebs_test.go"],
data = ["ebs_backup.json"],
embed = [":config"],
flaky = True,
deps = ["@com_github_stretchr_testify//require"],
)
1 change: 1 addition & 0 deletions br/pkg/restore/prealloc_table_id/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go_library(

go_test(
name = "prealloc_table_id_test",
timeout = "short",
srcs = ["alloc_test.go"],
flaky = True,
race = "on",
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/restore/split/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ go_library(

go_test(
name = "split_test",
timeout = "short",
srcs = ["sum_sorted_test.go"],
flaky = True,
deps = [
":split",
"@com_github_stretchr_testify//require",
Expand Down
1 change: 1 addition & 0 deletions br/pkg/restore/tiflashrec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(

go_test(
name = "tiflashrec_test",
timeout = "short",
srcs = ["tiflash_recorder_test.go"],
flaky = True,
deps = [
Expand Down
1 change: 1 addition & 0 deletions br/pkg/streamhelper/daemon/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ go_library(

go_test(
name = "daemon_test",
timeout = "short",
srcs = ["owner_daemon_test.go"],
flaky = True,
deps = [
Expand Down
2 changes: 2 additions & 0 deletions br/pkg/streamhelper/spans/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ go_library(

go_test(
name = "spans_test",
timeout = "short",
srcs = [
"sorted_test.go",
"utils_test.go",
"value_sorted_test.go",
],
flaky = True,
deps = [
":spans",
"@com_github_stretchr_testify//require",
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ go_test(
],
embed = [":utils"],
flaky = True,
shard_count = 20,
shard_count = 30,
deps = [
"//br/pkg/errors",
"//br/pkg/metautil",
Expand Down
1 change: 1 addition & 0 deletions br/pkg/utils/iter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(

go_test(
name = "iter_test",
timeout = "short",
srcs = ["combinator_test.go"],
flaky = True,
race = "on",
Expand Down
1 change: 1 addition & 0 deletions config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ go_test(
data = glob(["**"]),
embed = [":config"],
flaky = True,
shard_count = 2,
deps = [
"//testkit/testsetup",
"//util/logutil",
Expand Down
1 change: 1 addition & 0 deletions ddl/fktest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "fktest_test",
timeout = "short",
srcs = [
"foreign_key_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions ddl/ingest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ go_library(

go_test(
name = "ingest_test",
timeout = "short",
srcs = [
"env_test.go",
"mem_root_test.go",
Expand Down
27 changes: 2 additions & 25 deletions ddl/internal/callback/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,10 @@ go_library(

go_test(
name = "callback_test",
timeout = "short",
srcs = ["callback_test.go"],
embed = [":callback"],
deps = [
"//ddl",
"@com_github_stretchr_testify//require",
],
)

go_library(
name = "ddlcallback",
srcs = ["callback.go"],
importpath = "github.com/pingcap/tidb/ddl/internal/ddlcallback",
visibility = ["//ddl:__subpackages__"],
deps = [
"//ddl",
"//infoschema",
"//parser/model",
"//sessionctx",
"//util/logutil",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "ddlcallback_test",
srcs = ["callback_test.go"],
embed = [":ddlcallback"],
flaky = True,
deps = [
"//ddl",
"@com_github_stretchr_testify//require",
Expand Down
1 change: 1 addition & 0 deletions ddl/metadatalocktest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "metadatalocktest_test",
timeout = "short",
srcs = [
"main_test.go",
"mdl_test.go",
Expand Down
2 changes: 2 additions & 0 deletions ddl/resourcegroup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ go_library(

go_test(
name = "resourcegroup_test",
timeout = "short",
srcs = ["group_test.go"],
embed = [":resourcegroup"],
flaky = True,
deps = [
"//parser/model",
"@com_github_pingcap_kvproto//pkg/resource_manager",
Expand Down
1 change: 1 addition & 0 deletions ddl/syncer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ go_library(

go_test(
name = "syncer_test",
timeout = "short",
srcs = ["syncer_test.go"],
flaky = True,
deps = [
Expand Down
1 change: 1 addition & 0 deletions ddl/tiflashtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "tiflashtest_test",
timeout = "short",
srcs = [
"ddl_tiflash_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions distsql/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ go_test(
embed = [":distsql"],
flaky = True,
race = "on",
shard_count = 2,
deps = [
"//kv",
"//parser/charset",
Expand Down
2 changes: 1 addition & 1 deletion executor/aggfuncs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ go_test(
embed = [":aggfuncs"],
flaky = True,
race = "on",
shard_count = 25,
shard_count = 40,
deps = [
"//expression",
"//expression/aggregation",
Expand Down
1 change: 1 addition & 0 deletions executor/autoidtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "autoidtest_test",
timeout = "short",
srcs = [
"autoid_test.go",
"main_test.go",
Expand Down
1 change: 1 addition & 0 deletions executor/issuetest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "issuetest_test",
timeout = "short",
srcs = [
"executor_issue_test.go",
"main_test.go",
Expand Down
2 changes: 2 additions & 0 deletions executor/loadremotetest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "loadremotetest_test",
timeout = "short",
srcs = [
"main_test.go",
"one_csv_test.go",
"util_test.go",
],
flaky = True,
deps = [
"//executor",
"//kv",
Expand Down
1 change: 1 addition & 0 deletions executor/writetest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "writetest_test",
timeout = "short",
srcs = [
"main_test.go",
"write_test.go",
Expand Down
2 changes: 2 additions & 0 deletions extension/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ go_library(

go_test(
name = "extension_test",
timeout = "short",
srcs = [
"bootstrap_test.go",
"event_listener_test.go",
Expand All @@ -37,6 +38,7 @@ go_test(
"registry_test.go",
],
embed = [":extension"],
flaky = True,
deps = [
"//expression",
"//parser/ast",
Expand Down
2 changes: 2 additions & 0 deletions parser/duration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ go_library(

go_test(
name = "duration_test",
timeout = "short",
srcs = ["duration_test.go"],
embed = [":duration"],
flaky = True,
deps = ["@com_github_stretchr_testify//require"],
)
2 changes: 2 additions & 0 deletions resourcemanager/pooltask/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ go_library(

go_test(
name = "pooltask_test",
timeout = "short",
srcs = ["task_test.go"],
embed = [":pooltask"],
flaky = True,
deps = ["@com_github_stretchr_testify//require"],
)
2 changes: 2 additions & 0 deletions resourcemanager/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ go_library(

go_test(
name = "util_test",
timeout = "short",
srcs = ["shard_pool_map_test.go"],
embed = [":util"],
flaky = True,
deps = [
"//util/intest",
"@com_github_stretchr_testify//require",
Expand Down
2 changes: 1 addition & 1 deletion sessiontxn/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go_library(

go_test(
name = "sessiontxn_test",
timeout = "moderate",
timeout = "short",
srcs = [
"txn_context_test.go",
"txn_manager_test.go",
Expand Down
2 changes: 2 additions & 0 deletions store/copr/copr_test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "copr_test_test",
timeout = "short",
srcs = [
"coprocessor_test.go",
"main_test.go",
],
flaky = True,
deps = [
"//config",
"//kv",
Expand Down
1 change: 1 addition & 0 deletions tablecodec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ go_test(
],
embed = [":tablecodec"],
flaky = True,
shard_count = 30,
deps = [
"//kv",
"//parser/mysql",
Expand Down
2 changes: 1 addition & 1 deletion telemetry/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ go_library(

go_test(
name = "telemetry_test",
timeout = "moderate",
timeout = "short",
srcs = [
"data_cluster_hardware_test.go",
"data_feature_usage_test.go",
Expand Down
1 change: 1 addition & 0 deletions ttl/client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ go_test(
timeout = "short",
srcs = ["command_test.go"],
embed = [":client"],
flaky = True,
shard_count = 5,
deps = [
"@com_github_pingcap_errors//:errors",
Expand Down
1 change: 1 addition & 0 deletions ttl/metrics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_test(
timeout = "short",
srcs = ["metrics_test.go"],
embed = [":metrics"],
flaky = True,
shard_count = 5,
deps = ["@com_github_stretchr_testify//require"],
)
2 changes: 1 addition & 1 deletion ttl/ttlworker/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ go_library(

go_test(
name = "ttlworker_test",
timeout = "moderate",
timeout = "short",
srcs = [
"del_test.go",
"job_manager_integration_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/cgroup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go_library(

go_test(
name = "cgroup_test",
timeout = "short",
srcs = [
"cgroup_cpu_test.go",
"cgroup_mock_test.go",
Expand Down
1 change: 1 addition & 0 deletions util/cpu/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ go_library(

go_test(
name = "cpu_test",
timeout = "short",
srcs = ["cpu_test.go"],
embed = [":cpu"],
flaky = True,
Expand Down
Loading