Skip to content

Commit 8703204

Browse files
committed
fix(e2e): cap the clusters one suite binary builds at once
go test defaults -parallel to GOMAXPROCS, so peak live clusters follows the runner's core count: 8 today, from fluentd-aggregator's 4 tests plus volumedrain's 2 plus one each from two more suites. Every one of them imports the same six images, and all observed 16m deadline hits were kind load, none were kind create. -parallel 2 caps the peak at 6 and stops it growing with the core count. This reverses the reasoning that dropped -parallel 1 from kube-logging#2301, which measured fluentd-aggregator alone. elasticsearch-multiversion has two test functions but only one builds a cluster, so -parallel cannot serialise the suite; it is instead the largest beneficiary of a lower peak, because its runtime is mostly Elasticsearch readiness and that is what starves first. Measured: 856.4s at -parallel 4 (30625716801) against 387.9s at -parallel 1 (30590989952), while fluentd-aggregator went 272.5s to 490.7s. The longest package, which is what the job waits for, therefore fell from 856s to 491s. The kind command cap stays at 16m. Anchoring it to healthy timings was already measured as a regression: at 10m, runs failed that would have passed, because a degraded runner is 2.3-6.2x slower and the loads complete rather than wedge. -parallel 1 and 4 are measured; 2 is interpolated between them. If load timeouts survive this, 1 is the fallback and has two green runs behind it. Signed-off-by: Bence Csati <bence.csati@axoflow.com>
1 parent 0899d84 commit 8703204

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ OPERATOR_IMG_DEBUG ?= controller:debug
5353
CRD_OPTIONS ?= crd:maxDescLen=0
5454

5555
E2E_TEST_TIMEOUT ?= 20m
56+
57+
# Clusters one suite binary builds at once. Caps peak concurrency, which
58+
# otherwise follows the core count and starves the aggregators.
59+
E2E_SUITE_PARALLEL ?= 2
60+
5661
TEST_COV_DIR := $(shell mkdir -p build/_test_coverage && realpath build/_test_coverage)
5762

5863
CONTROLLER_GEN := ${BIN}/controller-gen
@@ -242,7 +247,7 @@ test-e2e-nodeps:
242247
KIND_IMAGE="$(KIND_IMAGE)" \
243248
PROJECT_DIR="$(PWD)" \
244249
E2E_TEST_COV_DIR=${TEST_COV_DIR} \
245-
go test -count=1 -v -timeout ${E2E_TEST_TIMEOUT} $$(go list ./${E2E_TEST}/... | grep -vE '/e2e/(common|internal)(/|$$)')
250+
go test -count=1 -v -parallel ${E2E_SUITE_PARALLEL} -timeout ${E2E_TEST_TIMEOUT} $$(go list ./${E2E_TEST}/... | grep -vE '/e2e/(common|internal)(/|$$)')
246251
go tool covdata textfmt -i=${TEST_COV_DIR}/covdatafiles -o ${TEST_COV_DIR}/coverage_e2e.out
247252
@echo "--- E2E test coverage report"
248253
go tool covdata percent -i=${TEST_COV_DIR}/covdatafiles

0 commit comments

Comments
 (0)