From 41c5414a5ecc8333c999b5e16e51f535aefcead2 Mon Sep 17 00:00:00 2001 From: Pankaj Singh Date: Tue, 20 Oct 2026 14:03:55 +0530 Subject: [PATCH] Stop the EKS executor concurrency test from starving its own builders The watcher thread spun on os.environ.get without yielding, holding the GIL against the client-building threads. The test took about 95 seconds locally and exceeded its 60 second timeout in the lowest-dependencies CI job. Co-Authored-By: Claude --- .../unit/amazon/aws/executors/eks/test__client_factory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py b/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py index 29ffa632d0ca1..45306e27316a5 100644 --- a/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py +++ b/providers/amazon/tests/unit/amazon/aws/executors/eks/test__client_factory.py @@ -21,6 +21,7 @@ import signal import tempfile import threading +import time from base64 import b64encode from concurrent.futures import ThreadPoolExecutor from pathlib import Path @@ -152,6 +153,8 @@ def test_concurrent_builds_never_change_sts_regional_endpoints_env_var(self, moc def watch(): while building.is_set(): seen.add(os.environ.get("AWS_STS_REGIONAL_ENDPOINTS")) + # A bare spin loop holds the GIL against the builders and can push the test past its timeout. + time.sleep(0.001) building.set() watcher = threading.Thread(target=watch)