Fix API verify-deploy timeout by removing pod age filter

The jq filter required pods to be younger than 60 seconds AND ready,
but pods often take longer than 60s to become ready (alembic migrations,
image pull, etc.), causing the check to never match. The image tag check
is sufficient to confirm the new version is running. This aligns the API
verify-deploy with the frontend verify-deploy which has no age filter.
This commit is contained in:
Viktor Barzin 2026-02-22 17:20:19 +00:00
parent 34743127fb
commit c24c3a545c
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -287,13 +287,12 @@ steps:
-H "Authorization: Bearer $TOKEN" \ -H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json" | \ -H "Accept: application/json" | \
jq --arg img "$EXPECTED_IMAGE" '[.items[] | select( jq --arg img "$EXPECTED_IMAGE" '[.items[] | select(
(now - (.status.startTime | fromdateiso8601)) < 60 and
(.status.containerStatuses[]? | .ready == true) and (.status.containerStatuses[]? | .ready == true) and
(.spec.containers[]? | .image == $img) (.spec.containers[]? | .image == $img)
) | {name: .metadata.name, age: (now - (.status.startTime | fromdateiso8601) | floor), image: .spec.containers[0].image, started: .status.startTime}]') ) | {name: .metadata.name, age: (now - (.status.startTime | fromdateiso8601) | floor), image: .spec.containers[0].image, started: .status.startTime}]')
COUNT=$(echo "$RESULT" | jq 'length' 2>/dev/null || echo 0) COUNT=$(echo "$RESULT" | jq 'length' 2>/dev/null || echo 0)
echo " Attempt $i/60: $COUNT pod(s) younger than 60s, ready, running $EXPECTED_IMAGE" echo " Attempt $i/60: $COUNT pod(s) ready, running $EXPECTED_IMAGE"
if [ "$COUNT" -gt 0 ] 2>/dev/null; then if [ "$COUNT" -gt 0 ] 2>/dev/null; then
echo "$RESULT" | jq -r '.[] | " \(.name) age=\(.age)s image=\(.image) started=\(.started)"' echo "$RESULT" | jq -r '.[] | " \(.name) age=\(.age)s image=\(.image) started=\(.started)"'