Fix deployment verification: install git and improve fallback logic

- Install git in deployment verification jobs (was missing in Alpine image)
- Add string comparison fallback when git commands fail
- Safer approach: wait for deployment when commit comparison fails
- This ensures we don't run performance tests against wrong versions
- Fixes 'No such file or directory: git' error in CI
This commit is contained in:
Oliver Falk
2025-10-24 12:39:08 +02:00
parent 43b8b2abef
commit 8fbdf35c02
2 changed files with 13 additions and 5 deletions

View File

@@ -427,13 +427,21 @@ def test_deployment(
)
version_ok = False
else:
# Git comparison failed - use simple string comparison as fallback
colored_print(
"⚠️ Warning: Could not determine version relationship",
"⚠️ Git comparison failed - using string comparison fallback",
Colors.YELLOW,
)
# If commits are different, assume we need to wait
# This is safer than proceeding with wrong version
colored_print(
f"⚠️ Deployed version ({deployed_commit[:8]}) differs from expected ({current_commit[:8]})",
Colors.YELLOW,
)
colored_print(
"This might be due to shallow git clone in CI - treating as version mismatch",
Colors.YELLOW,
f"Waiting for deployment to update... (attempt {attempt}/{max_retries})",
Colors.BLUE,
)
version_ok = False