From cbbb60e08121b20c0225feee92776cfa72d1f532 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sun, 30 Aug 2026 12:07:24 +0300 Subject: [PATCH] fix: simplify candidate health shell assignments --- deploy/run-production-canary.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/run-production-canary.sh b/deploy/run-production-canary.sh index c48e0ce..50360b5 100644 --- a/deploy/run-production-canary.sh +++ b/deploy/run-production-canary.sh @@ -29,12 +29,12 @@ compose --profile assistant-canary up -d --no-build "${services[@]}" for container in "${containers[@]}"; do ready="" for attempt in $(seq 1 60); do - status="$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{else}}unknown{{end}}' "$container" 2>/dev/null || true)" + 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 done [[ "$ready" == true ]] || fail_rollback - image_revision="$(docker inspect -f '{{index .Config.Labels "org.opencontainers.image.revision"}}' "$container" 2>/dev/null || true)" + image_revision=$(docker inspect -f '{{index .Config.Labels "org.opencontainers.image.revision"}}' "$container" 2>/dev/null || true) [[ "$image_revision" == "$REVISION" ]] || fail_rollback done @@ -52,7 +52,7 @@ release_json="$(cat </dev/null || fail_rollback control /v1/traffic/canary || fail_rollback -headers="$(mktemp)" +headers=$(mktemp) trap 'rm -f "$headers"' EXIT if ! curl -fsS --max-time 10 -D "$headers" -H 'X-Assistant-Canary: true' "https://assistant.cin.su/login" -o /dev/null; then fail_rollback; fi grep -qi '^X-Assistant-Traffic-Target: candidate' "$headers" || fail_rollback