Skip to content

Commit 79ae1e3

Browse files
authored
*: update bazel config (#41296)
1 parent 8dd78d5 commit 79ae1e3

File tree

46 files changed

+64
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+64
-31
lines changed

.bazelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build:race --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=
2020

2121
test --test_env=TZ=Asia/Shanghai
2222
test --test_output=errors --test_summary=testcase
23-
test:ci --color=yes --spawn_strategy=local
23+
test:ci --color=yes
2424
test:ci --verbose_failures --test_verbose_timeout_warnings
2525
test:ci --test_env=GO_TEST_WRAP_TESTV=1
2626
test:ci --experimental_ui_max_stdouterr_bytes=104857600

autoid_service/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ go_library(
2727

2828
go_test(
2929
name = "autoid_service_test",
30+
timeout = "short",
3031
srcs = ["autoid_test.go"],
3132
embed = [":autoid_service"],
33+
flaky = True,
3234
deps = [
3335
"//parser/model",
3436
"//testkit",

br/pkg/aws/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ go_library(
2323

2424
go_test(
2525
name = "aws_test",
26+
timeout = "short",
2627
srcs = ["ebs_test.go"],
2728
embed = [":aws"],
29+
flaky = True,
2830
deps = [
2931
"@com_github_aws_aws_sdk_go//aws",
3032
"@com_github_aws_aws_sdk_go//service/ec2",

br/pkg/checkpoint/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ go_library(
2222

2323
go_test(
2424
name = "checkpoint_test",
25+
timeout = "short",
2526
srcs = ["checkpoint_test.go"],
27+
flaky = True,
2628
deps = [
2729
":checkpoint",
2830
"//br/pkg/rtree",

br/pkg/config/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ go_library(
1515

1616
go_test(
1717
name = "config_test",
18+
timeout = "short",
1819
srcs = ["ebs_test.go"],
1920
data = ["ebs_backup.json"],
2021
embed = [":config"],
22+
flaky = True,
2123
deps = ["@com_github_stretchr_testify//require"],
2224
)

br/pkg/restore/prealloc_table_id/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ go_library(
1313

1414
go_test(
1515
name = "prealloc_table_id_test",
16+
timeout = "short",
1617
srcs = ["alloc_test.go"],
1718
flaky = True,
1819
race = "on",

br/pkg/restore/split/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ go_library(
4242

4343
go_test(
4444
name = "split_test",
45+
timeout = "short",
4546
srcs = ["sum_sorted_test.go"],
47+
flaky = True,
4648
deps = [
4749
":split",
4850
"@com_github_stretchr_testify//require",

br/pkg/restore/tiflashrec/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ go_library(
1919

2020
go_test(
2121
name = "tiflashrec_test",
22+
timeout = "short",
2223
srcs = ["tiflash_recorder_test.go"],
2324
flaky = True,
2425
deps = [

br/pkg/streamhelper/daemon/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ go_library(
1818

1919
go_test(
2020
name = "daemon_test",
21+
timeout = "short",
2122
srcs = ["owner_daemon_test.go"],
2223
flaky = True,
2324
deps = [

br/pkg/streamhelper/spans/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ go_library(
1919

2020
go_test(
2121
name = "spans_test",
22+
timeout = "short",
2223
srcs = [
2324
"sorted_test.go",
2425
"utils_test.go",
2526
"value_sorted_test.go",
2627
],
28+
flaky = True,
2729
deps = [
2830
":spans",
2931
"@com_github_stretchr_testify//require",

br/pkg/utils/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ go_test(
8181
],
8282
embed = [":utils"],
8383
flaky = True,
84-
shard_count = 20,
84+
shard_count = 30,
8585
deps = [
8686
"//br/pkg/errors",
8787
"//br/pkg/metautil",

br/pkg/utils/iter/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ go_library(
2020

2121
go_test(
2222
name = "iter_test",
23+
timeout = "short",
2324
srcs = ["combinator_test.go"],
2425
flaky = True,
2526
race = "on",

config/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ go_test(
3737
data = glob(["**"]),
3838
embed = [":config"],
3939
flaky = True,
40+
shard_count = 2,
4041
deps = [
4142
"//testkit/testsetup",
4243
"//util/logutil",

ddl/fktest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "fktest_test",
5+
timeout = "short",
56
srcs = [
67
"foreign_key_test.go",
78
"main_test.go",

ddl/ingest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ go_library(
4646

4747
go_test(
4848
name = "ingest_test",
49+
timeout = "short",
4950
srcs = [
5051
"env_test.go",
5152
"mem_root_test.go",

ddl/internal/callback/BUILD.bazel

+2-25
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,10 @@ go_library(
1717

1818
go_test(
1919
name = "callback_test",
20+
timeout = "short",
2021
srcs = ["callback_test.go"],
2122
embed = [":callback"],
22-
deps = [
23-
"//ddl",
24-
"@com_github_stretchr_testify//require",
25-
],
26-
)
27-
28-
go_library(
29-
name = "ddlcallback",
30-
srcs = ["callback.go"],
31-
importpath = "github.com/pingcap/tidb/ddl/internal/ddlcallback",
32-
visibility = ["//ddl:__subpackages__"],
33-
deps = [
34-
"//ddl",
35-
"//infoschema",
36-
"//parser/model",
37-
"//sessionctx",
38-
"//util/logutil",
39-
"@org_uber_go_zap//:zap",
40-
],
41-
)
42-
43-
go_test(
44-
name = "ddlcallback_test",
45-
srcs = ["callback_test.go"],
46-
embed = [":ddlcallback"],
23+
flaky = True,
4724
deps = [
4825
"//ddl",
4926
"@com_github_stretchr_testify//require",

ddl/metadatalocktest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "metadatalocktest_test",
5+
timeout = "short",
56
srcs = [
67
"main_test.go",
78
"mdl_test.go",

ddl/resourcegroup/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ go_library(
1717

1818
go_test(
1919
name = "resourcegroup_test",
20+
timeout = "short",
2021
srcs = ["group_test.go"],
2122
embed = [":resourcegroup"],
23+
flaky = True,
2224
deps = [
2325
"//parser/model",
2426
"@com_github_pingcap_kvproto//pkg/resource_manager",

ddl/syncer/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ go_library(
2222

2323
go_test(
2424
name = "syncer_test",
25+
timeout = "short",
2526
srcs = ["syncer_test.go"],
2627
flaky = True,
2728
deps = [

distsql/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ go_test(
6464
embed = [":distsql"],
6565
flaky = True,
6666
race = "on",
67+
shard_count = 2,
6768
deps = [
6869
"//kv",
6970
"//parser/charset",

executor/aggfuncs/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ go_test(
8989
embed = [":aggfuncs"],
9090
flaky = True,
9191
race = "on",
92-
shard_count = 25,
92+
shard_count = 40,
9393
deps = [
9494
"//expression",
9595
"//expression/aggregation",

executor/autoidtest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "autoidtest_test",
5+
timeout = "short",
56
srcs = [
67
"autoid_test.go",
78
"main_test.go",

executor/issuetest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "issuetest_test",
5+
timeout = "short",
56
srcs = [
67
"executor_issue_test.go",
78
"main_test.go",

executor/loadremotetest/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "loadremotetest_test",
5+
timeout = "short",
56
srcs = [
67
"main_test.go",
78
"one_csv_test.go",
89
"util_test.go",
910
],
11+
flaky = True,
1012
deps = [
1113
"//executor",
1214
"//kv",

executor/writetest/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "writetest_test",
5+
timeout = "short",
56
srcs = [
67
"main_test.go",
78
"write_test.go",

extension/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ go_library(
2929

3030
go_test(
3131
name = "extension_test",
32+
timeout = "short",
3233
srcs = [
3334
"bootstrap_test.go",
3435
"event_listener_test.go",
@@ -37,6 +38,7 @@ go_test(
3738
"registry_test.go",
3839
],
3940
embed = [":extension"],
41+
flaky = True,
4042
deps = [
4143
"//expression",
4244
"//parser/ast",

parser/duration/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ go_library(
1010

1111
go_test(
1212
name = "duration_test",
13+
timeout = "short",
1314
srcs = ["duration_test.go"],
1415
embed = [":duration"],
16+
flaky = True,
1517
deps = ["@com_github_stretchr_testify//require"],
1618
)

resourcemanager/pooltask/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ go_library(
1818

1919
go_test(
2020
name = "pooltask_test",
21+
timeout = "short",
2122
srcs = ["task_test.go"],
2223
embed = [":pooltask"],
24+
flaky = True,
2325
deps = ["@com_github_stretchr_testify//require"],
2426
)

resourcemanager/util/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ go_library(
1818

1919
go_test(
2020
name = "util_test",
21+
timeout = "short",
2122
srcs = ["shard_pool_map_test.go"],
2223
embed = [":util"],
24+
flaky = True,
2325
deps = [
2426
"//util/intest",
2527
"@com_github_stretchr_testify//require",

sessiontxn/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ go_library(
2020

2121
go_test(
2222
name = "sessiontxn_test",
23-
timeout = "moderate",
23+
timeout = "short",
2424
srcs = [
2525
"txn_context_test.go",
2626
"txn_manager_test.go",

store/copr/copr_test/BUILD.bazel

+2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "copr_test_test",
5+
timeout = "short",
56
srcs = [
67
"coprocessor_test.go",
78
"main_test.go",
89
],
10+
flaky = True,
911
deps = [
1012
"//config",
1113
"//kv",

tablecodec/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ go_test(
3636
],
3737
embed = [":tablecodec"],
3838
flaky = True,
39+
shard_count = 30,
3940
deps = [
4041
"//kv",
4142
"//parser/mysql",

telemetry/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ go_library(
5151

5252
go_test(
5353
name = "telemetry_test",
54-
timeout = "moderate",
54+
timeout = "short",
5555
srcs = [
5656
"data_cluster_hardware_test.go",
5757
"data_feature_usage_test.go",

ttl/client/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ go_test(
2323
timeout = "short",
2424
srcs = ["command_test.go"],
2525
embed = [":client"],
26+
flaky = True,
2627
shard_count = 5,
2728
deps = [
2829
"@com_github_pingcap_errors//:errors",

ttl/metrics/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ go_test(
1616
timeout = "short",
1717
srcs = ["metrics_test.go"],
1818
embed = [":metrics"],
19+
flaky = True,
1920
shard_count = 5,
2021
deps = ["@com_github_stretchr_testify//require"],
2122
)

ttl/ttlworker/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ go_library(
4444

4545
go_test(
4646
name = "ttlworker_test",
47-
timeout = "moderate",
47+
timeout = "short",
4848
srcs = [
4949
"del_test.go",
5050
"job_manager_integration_test.go",

util/cgroup/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ go_library(
2121

2222
go_test(
2323
name = "cgroup_test",
24+
timeout = "short",
2425
srcs = [
2526
"cgroup_cpu_test.go",
2627
"cgroup_mock_test.go",

util/cpu/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ go_library(
1818

1919
go_test(
2020
name = "cpu_test",
21+
timeout = "short",
2122
srcs = ["cpu_test.go"],
2223
embed = [":cpu"],
2324
flaky = True,

util/gctuner/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ go_library(
2020

2121
go_test(
2222
name = "gctuner_test",
23+
timeout = "short",
2324
srcs = [
2425
"finalizer_test.go",
2526
"mem_test.go",

0 commit comments

Comments
 (0)