From 1c79af25d48ec823e3c099863034cc8929a7db7e Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 27 Aug 2026 16:38:53 +0000 Subject: [PATCH] fix(mosaic): retry the Invariant R pi version probe under CI load (#1441) --- .../mosaic/src/lease-broker/invariant_r_unittest.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/mosaic/src/lease-broker/invariant_r_unittest.py b/packages/mosaic/src/lease-broker/invariant_r_unittest.py index c673dd2f..4c3907fb 100644 --- a/packages/mosaic/src/lease-broker/invariant_r_unittest.py +++ b/packages/mosaic/src/lease-broker/invariant_r_unittest.py @@ -75,7 +75,7 @@ def run_pi_registry_command( runner=subprocess.run, sleeper=time.sleep, ) -> subprocess.CompletedProcess[str]: - """Run the registry probe with bounded retries for concurrent-Pi stalls.""" + """Run a Pi probe command with bounded retries for concurrent-Pi stalls.""" for attempt in range(1, PI_PROBE_ATTEMPTS + 1): try: @@ -106,13 +106,7 @@ def probe_pi_registry() -> list[dict[str, object]]: if pi is None: raise AssertionError("installed Pi runtime is required for Invariant R") - version = subprocess.run( - [pi, "--version"], - check=False, - capture_output=True, - text=True, - timeout=10, - ) + version = run_pi_registry_command([pi, "--version"], dict(os.environ)) if version.returncode != 0: raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}") if version.stdout.strip() != PI_VERSION: