mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 13:38:03 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user