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:
parent
34743127fb
commit
c24c3a545c
1 changed files with 1 additions and 2 deletions
|
|
@ -287,13 +287,12 @@ steps:
|
|||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Accept: application/json" | \
|
||||
jq --arg img "$EXPECTED_IMAGE" '[.items[] | select(
|
||||
(now - (.status.startTime | fromdateiso8601)) < 60 and
|
||||
(.status.containerStatuses[]? | .ready == true) and
|
||||
(.spec.containers[]? | .image == $img)
|
||||
) | {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)
|
||||
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
|
||||
echo "$RESULT" | jq -r '.[] | " \(.name) age=\(.age)s image=\(.image) started=\(.started)"'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue