diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f5cb7b..50332b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -232,7 +232,7 @@ verify_dev_deployment: MAX_RETRIES: 30 RETRY_DELAY: 60 before_script: - - apk add --no-cache curl + - apk add --no-cache curl git - pip install Pillow script: - echo "Waiting for dev.libravatar.org deployment to complete..." @@ -250,7 +250,7 @@ verify_prod_deployment: MAX_RETRIES: 10 RETRY_DELAY: 30 before_script: - - apk add --no-cache curl + - apk add --no-cache curl git - pip install Pillow script: - echo "Verifying production deployment..." diff --git a/scripts/check_deployment.py b/scripts/check_deployment.py index becb750..06e4136 100755 --- a/scripts/check_deployment.py +++ b/scripts/check_deployment.py @@ -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