fix: allow bounded candidate startup discovery
CI / test (push) Failing after 37s

This commit is contained in:
m
2026-08-30 13:10:38 +03:00
parent 51e33e7283
commit 87ec7efd0f
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ ENV_FILE="${ENV_FILE:-/home/m/assistant-deploy/production-compose.env}"
COMPOSE_FILE="$BASE_DIR/deploy/docker-compose.prod.yml"
SUPERVISOR_CONTROL_URL="${SUPERVISOR_CONTROL_URL:-http://127.0.0.1:${SUPERVISOR_CONTROL_PORT:-18085}}"
REVISION="${1:?candidate revision is required}"
HEALTH_ATTEMPTS="${HEALTH_ATTEMPTS:-360}"
set -a
. "$ENV_FILE"
@@ -51,7 +52,7 @@ compose --profile assistant-canary build --build-arg "SOURCE_REVISION=$REVISION"
wait_healthy() {
local container="$1" status="" ready=""
ready=""
for attempt in $(seq 1 60); do
for attempt in $(seq 1 "$HEALTH_ATTEMPTS"); do
status=$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{else}}unknown{{end}}' "$container" 2>/dev/null || true)
if [[ "$status" == healthy ]]; then ready=true; break; fi
sleep 2
@@ -14,4 +14,6 @@ grep -Fq 'assert_stable_ids_unchanged' "$canary"
grep -Fq 'before=$(stable_ids)' "$supervisor"
grep -Fq 'after=$(stable_ids)' "$supervisor"
grep -Fq 'stable container IDs changed' "$supervisor"
grep -Fq 'HEALTH_ATTEMPTS="${HEALTH_ATTEMPTS:-360}"' "$canary"
grep -Fq 'seq 1 "$HEALTH_ATTEMPTS"' "$canary"
echo 'stable release-set guard: PASS'