From f4e50c4a406ecacf3a3b474307784d8decd32a94 Mon Sep 17 00:00:00 2001 From: shoemoney Date: Tue, 30 Jun 2026 17:48:27 -0500 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20post-verify=20marker=20=E2=86=92?= =?UTF-8?q?=20/healthz=20(invite/revoke=20went=20stale=20once=20M8a=20ship?= =?UTF-8?q?ped)=20=F0=9F=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The live hub already returns 401 for /v1/invite/revoke (M8a deployed), so that marker no longer proves a swap took β€” it'd pass even on the old binary. /healthz is the clean oldβ†’new discriminator (pre-round-1 hub 404s it; new code 200s with version), plus a /readyz DB-ping check. Used this to verify the 7-round redeploy. --- deploy/redeploy-hub.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/deploy/redeploy-hub.sh b/deploy/redeploy-hub.sh index 8e41da3..5621801 100755 --- a/deploy/redeploy-hub.sh +++ b/deploy/redeploy-hub.sh @@ -66,11 +66,18 @@ rollback() { echo "πŸ›‘ redeploy FAILED β€” rolled back to the previous binary"; exit 1 } curl --retry 20 --retry-connrefused --retry-delay 1 --max-time 25 -sf "$URL/metrics" >/dev/null || rollback -code=$(curl -s -o /dev/null -w '%{http_code}' -X POST "$URL/v1/invite/revoke") -[ "$code" = 401 ] || { echo " βœ— /v1/invite/revoke = $code (want 401 β€” new code not live)"; rollback; } -echo " βœ“ /v1/invite/revoke present (401 unauth) β€” P2 code is LIVE" +# Marker: /healthz is the clean oldβ†’new discriminator β€” the pre-round-1 hub 404s +# it, the new code returns 200 "ok ". (invite/revoke is already 401 on the +# live M8a hub, so it can no longer prove the swap took.) +code=$(curl -s -o /dev/null -w '%{http_code}' "$URL/healthz") +[ "$code" = 200 ] || { echo " βœ— /healthz = $code (want 200 β€” new code not live; the old hub 404s it)"; rollback; } +echo " βœ“ /healthz present (200) β€” new hub code is LIVE: $(curl -s --max-time 5 "$URL/healthz")" +# /readyz pings the DB β€” proves the metadata store opened post-migration. +rcode=$(curl -s -o /dev/null -w '%{http_code}' "$URL/readyz") +[ "$rcode" = 200 ] || { echo " βœ— /readyz = $rcode (DB not ready)"; rollback; } +echo " βœ“ /readyz present (200) β€” metadata DB is reachable" say "πŸ”’ post-deploy counts (compare to pre β€” device/share/chunk should match)" echo "$(counts)" -say "βœ… hub redeployed safely β€” P2 (+s attenuation Β· invite revocation) + P3 (gc-every) are live." +say "βœ… hub redeployed safely β€” 7 rounds live (push-verify, HTTP_PROXY fix, backup⇄gc flock, fsck, /healthz+/readyz, /metrics counters, device/share ls, …)."