From aefd2effc5ead3c414d8d85fbe35d06cbbd0d337 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 16 Sep 2025 15:59:52 +0200 Subject: [PATCH] test: automatically lower Ginkgo parallelism when using race detection When race detection is enabled, merely running 25 e2e.test instances was too much and the OOM killer shut down the Prow test pod because of the memory overhead. A CI job could control that via GINKGO_PARALLEL_NODES, but we should also have saner defaults which take this into account. --- hack/ginkgo-e2e.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index b0fc78e6bca..1a4f97f18ab 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -181,7 +181,16 @@ case "${E2E_TEST_DEBUG_TOOL:-ginkgo}" in if [[ -n "${GINKGO_PARALLEL_NODES:-}" ]]; then program+=("--nodes=${GINKGO_PARALLEL_NODES}") elif [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then - program+=("--nodes=25") + if [[ "${KUBE_RACE:-}" == "-race" ]]; then + # When race detection is enabled, merely running 25 e2e.test instances was too much + # and the OOM killer shut down the Prow test pod because of the memory overhead. + # + # A CI job could control that via GINKGO_PARALLEL_NODES, but we should also have + # saner defaults which take this into account. + program+=("--nodes=10") + else + program+=("--nodes=25") + fi fi program+=("${ginkgo_args[@]:+${ginkgo_args[@]}}") ;;