From 21aadf6d82a2e89f4d19ed407adf0566e2062f3f Mon Sep 17 00:00:00 2001 From: Michal Date: Fri, 14 Aug 2026 23:45:16 +0100 Subject: [PATCH] fix(deploy): stop running the smoke suite twice and crying wolf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 7 called release.sh — which restarts mcplocal and runs the smoke suite against the binary it just installed — and then restarted mcplocal and ran the whole suite again. Two full suites inside a minute trips mcpd's rate limiter, so the second run came back with six 429s and printed SMOKE TESTS FAILED — system may be unhealthy. Consider rollback over a deploy that was fine. Seen for real on 35d506d: the first suite was 162/162 green, the second failed only on `mcpd returned 429: Rate limit exceeded`, and a clean re-run afterwards was 162/162 again. A deploy script that recommends rolling back a healthy release is worse than one that says nothing. One run, one verdict — release.sh's exit status. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01JNXFvxanvM6uiFcb4Mp3xU --- scripts/deploy-k8s.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/deploy-k8s.sh b/scripts/deploy-k8s.sh index eff872a..189c93e 100755 --- a/scripts/deploy-k8s.sh +++ b/scripts/deploy-k8s.sh @@ -187,14 +187,16 @@ trap - ERR # ── 7. RPM + smoke ── say "7/7 Build/install CLI RPM + smoke tests" -bash scripts/release.sh -systemctl --user restart mcplocal && sleep 2 -if pnpm test:smoke > /tmp/deploy-smoke.log 2>&1; then - grep -E "Tests |passed" /tmp/deploy-smoke.log | tail -2 +# release.sh already restarts mcplocal and runs the smoke suite against the +# binary it just installed. This step used to restart and re-run it a second +# time, which put two full suites inside a minute and tripped mcpd's rate +# limiter: the second run failed with 429s and printed a false +# "SMOKE TESTS FAILED — consider rollback" over a perfectly healthy deploy. +# One run, one verdict. +if bash scripts/release.sh; then say "Deploy complete — $TAG live. Rollback tag: $ROLLBACK_TAG" else - tail -40 /tmp/deploy-smoke.log - warn "SMOKE TESTS FAILED — system may be unhealthy. Consider rollback:" + warn "RELEASE OR SMOKE TESTS FAILED — system may be unhealthy. Consider rollback:" rollback_recipe exit 1 fi