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

Reserve more CPU cores for integration tests with high rate of flakes #27257

Merged
merged 2 commits into from
May 9, 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
3 changes: 3 additions & 0 deletions test/extensions/filters/http/local_ratelimit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ envoy_extension_cc_test(
size = "large",
srcs = ["local_ratelimit_integration_test.cc"],
extension_names = ["envoy.filters.http.local_ratelimit"],
tags = [
"cpu:3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i experimentally added something similar here https://github.com/envoyproxy/envoy/pull/27243/files#diff-3ca343c3f15cbe6a9354d5c44647e85b92d118a4a01123b470c7866cc5c088adR62

i wasnt 100% clear how this works but iiuc its indicative to bazel - bazel schedules less local jobs according to their cpu reservation

i think in the RBE case it doesnt help - we get mostly 2-core workers (ive seen sometimes 16-core also but infrequently) - but i think this flag doesnt come into to play in that case

also ~related #27243 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does help in RBE case as well. It will prevent scheduling two integration test processes from running on the same two core VM. Reduce CPU over subscription by half.

],
deps = [
"//source/extensions/filters/http/local_ratelimit:config",
"//test/integration:http_protocol_integration_lib",
Expand Down
3 changes: 3 additions & 0 deletions test/extensions/filters/network/local_ratelimit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ envoy_extension_cc_test(
size = "large",
srcs = ["local_ratelimit_integration_test.cc"],
extension_names = ["envoy.filters.network.local_ratelimit"],
tags = [
"cpu:3",
],
deps = [
"//source/extensions/filters/network/local_ratelimit:config",
"//source/extensions/filters/network/tcp_proxy:config",
Expand Down
46 changes: 45 additions & 1 deletion test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ envoy_cc_test(
srcs = envoy_select_admin_functionality(
["ads_integration_test.cc"],
),
tags = [
"cpu:3",
],
deps = [
":ads_integration_lib",
":http_integration_lib",
Expand Down Expand Up @@ -415,6 +418,9 @@ envoy_cc_test(
"http2_flood_integration_test.cc",
],
shard_count = 8,
tags = [
"cpu:3",
],
deps = [
":autonomous_upstream_lib",
":http_integration_lib",
Expand All @@ -441,6 +447,9 @@ envoy_cc_test(
"multiplexed_integration_test.cc",
],
shard_count = 16,
tags = [
"cpu:3",
],
deps = [
":http_protocol_integration_lib",
":socket_interface_swap_lib",
Expand Down Expand Up @@ -510,6 +519,9 @@ envoy_cc_test(
"buffer_accounting_integration_test.cc",
],
shard_count = 4,
tags = [
"cpu:3",
],
deps = [
":base_overload_integration_test_lib",
":http_integration_lib",
Expand Down Expand Up @@ -622,6 +634,9 @@ envoy_cc_test(
"filter_integration_test.cc",
]),
shard_count = 16,
tags = [
"cpu:3",
],
deps = [
":http_protocol_integration_lib",
":socket_interface_swap_lib",
Expand Down Expand Up @@ -696,6 +711,9 @@ envoy_cc_test(
# As this test has many H1/H2/v4/v6 tests it takes a while to run.
# Shard it enough to bring the run time in line with other integration tests.
shard_count = 48,
tags = [
"cpu:3",
],
deps = [
":protocol_integration_test_lib",
],
Expand All @@ -719,6 +737,9 @@ envoy_cc_test(
"multiplexed_upstream_integration_test.cc",
],
shard_count = 4,
tags = [
"cpu:3",
],
deps = [
":http_protocol_integration_lib",
"//source/common/http:header_map_lib",
Expand Down Expand Up @@ -836,6 +857,9 @@ envoy_cc_test(
# As this test has many pauses for idle timeouts, it takes a while to run.
# Shard it enough to bring the run time in line with other integration tests.
shard_count = 8,
tags = [
"cpu:3",
],
deps = [
":http_protocol_integration_lib",
"//test/integration/filters:backpressure_filter_config_lib",
Expand Down Expand Up @@ -1160,6 +1184,9 @@ envoy_cc_test(
"integration_test.h",
],
shard_count = 2,
tags = [
"cpu:3",
],
deps = [
":http_integration_lib",
"//envoy/registry",
Expand Down Expand Up @@ -1222,6 +1249,9 @@ envoy_cc_test(
"websocket_integration_test.h",
],
shard_count = 4,
tags = [
"cpu:3",
],
deps = [
":http_protocol_integration_lib",
"//source/common/http:header_map_lib",
Expand Down Expand Up @@ -1362,6 +1392,9 @@ envoy_cc_test(
size = "large",
srcs = ["overload_integration_test.cc"],
shard_count = 8,
tags = [
"cpu:3",
],
deps = [
":base_overload_integration_test_lib",
":http_protocol_integration_lib",
Expand Down Expand Up @@ -1536,6 +1569,9 @@ envoy_cc_test(
"//test/config/integration/certs",
],
shard_count = 2,
tags = [
"cpu:3",
],
deps = [
":integration_lib",
":tcp_proxy_integration_proto_cc_proto",
Expand Down Expand Up @@ -1571,7 +1607,7 @@ envoy_cc_test(
],
shard_count = 1,
tags = [
"cpu:4",
"cpu:3",
],
deps = [
":integration_lib",
Expand Down Expand Up @@ -1603,6 +1639,9 @@ envoy_cc_test(
"//test/config/integration/certs",
],
shard_count = 16,
tags = [
"cpu:3",
],
deps = [
":http_integration_lib",
":http_protocol_integration_lib",
Expand Down Expand Up @@ -2068,6 +2107,7 @@ envoy_cc_test(
data = ["//test/config/integration/certs"],
shard_count = 12,
tags = [
"cpu:4",
"nofips",
],
deps = select({
Expand Down Expand Up @@ -2105,6 +2145,7 @@ envoy_cc_test(
# Each of these tests exceeds 20s;
# QuicHttpIntegrationTests/QuicHttpIntegrationTest.MultipleQuicConnections[With|No]BPF*
tags = [
"cpu:3",
"fails_on_clang_cl",
"fails_on_windows",
"nofips",
Expand Down Expand Up @@ -2192,6 +2233,9 @@ envoy_cc_test(
data = [
"//test/config/integration/certs",
],
tags = [
"cpu:3",
],
deps = [
":ads_integration_lib",
":fake_upstream_lib",
Expand Down