fix(mosaic): retry the Invariant R pi version probe under CI load (#1441)
ci/woodpecker/push/publish Pipeline was canceled

This commit was merged in pull request #1441.
This commit is contained in:
2026-08-27 16:38:53 +00:00
parent e605c83b27
commit 1c79af25d4
@@ -75,7 +75,7 @@ def run_pi_registry_command(
runner=subprocess.run, runner=subprocess.run,
sleeper=time.sleep, sleeper=time.sleep,
) -> subprocess.CompletedProcess[str]: ) -> 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): for attempt in range(1, PI_PROBE_ATTEMPTS + 1):
try: try:
@@ -106,13 +106,7 @@ def probe_pi_registry() -> list[dict[str, object]]:
if pi is None: if pi is None:
raise AssertionError("installed Pi runtime is required for Invariant R") raise AssertionError("installed Pi runtime is required for Invariant R")
version = subprocess.run( version = run_pi_registry_command([pi, "--version"], dict(os.environ))
[pi, "--version"],
check=False,
capture_output=True,
text=True,
timeout=10,
)
if version.returncode != 0: if version.returncode != 0:
raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}") raise AssertionError(f"Pi version probe failed: {version.stderr.strip()}")
if version.stdout.strip() != PI_VERSION: if version.stdout.strip() != PI_VERSION: