Improve CI output visibility and remove buffering

- Add flush=True to all colored_print calls for immediate output
- Add PYTHONUNBUFFERED=1 to all deployment and performance test jobs
- Replace simple sleep with countdown progress indicator
- Show 'Retrying in X seconds...' with real-time countdown
- Clear progress line after countdown completes
- Better visibility of what the script is doing during long waits
This commit is contained in:
Oliver Falk
2025-10-24 13:06:57 +02:00
parent 8fbdf35c02
commit 27dd40b4aa
2 changed files with 12 additions and 3 deletions

View File

@@ -54,8 +54,8 @@ class Colors:
def colored_print(message: str, color: str = Colors.NC) -> None:
"""Print a colored message."""
print(f"{color}{message}{Colors.NC}")
"""Print a colored message with immediate flush."""
print(f"{color}{message}{Colors.NC}", flush=True)
def get_current_commit_hash() -> Optional[str]:
@@ -485,7 +485,11 @@ def test_deployment(
colored_print(
f"Waiting {retry_delay} seconds before next attempt...", Colors.BLUE
)
time.sleep(retry_delay)
# Show progress during wait
for remaining in range(retry_delay, 0, -1):
print(f"\r⏳ Retrying in {remaining:2d} seconds...", end="", flush=True)
time.sleep(1)
print("\r" + " " * 30 + "\r", end="", flush=True) # Clear the line
colored_print(
f"❌ FAILED: {name} deployment verification timed out after {max_retries} attempts",