mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 12:08:04 +00:00
Fix deployment verification to wait for correct version
- Modified check_deployment.py to wait for the correct commit hash - Now retries until the expected version is deployed (not just site responding) - Prevents performance tests from running against old versions - Maintains existing retry logic with proper version checking - Only runs functionality tests after version verification passes
This commit is contained in:
@@ -345,6 +345,8 @@ def test_deployment(
|
|||||||
|
|
||||||
# Check if we're looking for a specific version and compare
|
# Check if we're looking for a specific version and compare
|
||||||
current_commit = get_current_commit_hash()
|
current_commit = get_current_commit_hash()
|
||||||
|
version_ok = True
|
||||||
|
|
||||||
if current_commit and deployed_commit != "Unknown":
|
if current_commit and deployed_commit != "Unknown":
|
||||||
if deployed_commit == current_commit:
|
if deployed_commit == current_commit:
|
||||||
colored_print(
|
colored_print(
|
||||||
@@ -363,15 +365,25 @@ def test_deployment(
|
|||||||
)
|
)
|
||||||
elif comparison is False:
|
elif comparison is False:
|
||||||
colored_print(
|
colored_print(
|
||||||
"⚠️ Warning: Deployed version appears to be older than expected",
|
f"⚠️ Deployed version ({deployed_commit[:8]}) is older than expected ({current_commit[:8]})",
|
||||||
Colors.YELLOW,
|
Colors.YELLOW,
|
||||||
)
|
)
|
||||||
|
colored_print(
|
||||||
|
f"Waiting for deployment to update... (attempt {attempt}/{max_retries})",
|
||||||
|
Colors.BLUE,
|
||||||
|
)
|
||||||
|
version_ok = False
|
||||||
else:
|
else:
|
||||||
colored_print(
|
colored_print(
|
||||||
"⚠️ Warning: Could not determine version relationship",
|
"⚠️ Warning: Could not determine version relationship - proceeding with tests",
|
||||||
Colors.YELLOW,
|
Colors.YELLOW,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Only proceed with functionality tests if version is correct
|
||||||
|
if not version_ok:
|
||||||
|
# Version is not correct, skip tests and retry
|
||||||
|
pass # Will continue to retry logic below
|
||||||
|
else:
|
||||||
# Run functionality tests
|
# Run functionality tests
|
||||||
colored_print("Running basic functionality tests...", Colors.YELLOW)
|
colored_print("Running basic functionality tests...", Colors.YELLOW)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user