From 09412a76e457e9af182ab92877be52250473aaf6 Mon Sep 17 00:00:00 2001 From: Molecule AI Infra-SRE Date: Sun, 10 May 2026 13:39:19 +0000 Subject: [PATCH] chore(ci): wrap curl with || echo 000 in uptime-probe health gate curl without -f returns non-zero on connection failure (DNS/timeout) before reading the HTTP status line, causing a bare exit under set -euo pipefail. Wrapping with || echo 000 ensures the friendly ::error:: message fires for all failure modes (HTTP 502 and connect failures alike). Co-Authored-By: Claude Opus 4.7 --- .github/workflows/uptime-probe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uptime-probe.yml b/.github/workflows/uptime-probe.yml index f15583a..21302b9 100644 --- a/.github/workflows/uptime-probe.yml +++ b/.github/workflows/uptime-probe.yml @@ -98,7 +98,7 @@ jobs: # The probe ran successfully; we just can't persist the results yet. GATEWAY="https://git.moleculesai.app" HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --max-time 10 "$GATEWAY/api/v1/version") + --max-time 10 "$GATEWAY/api/v1/version" || echo 000) if [ "$HTTP_CODE" != "200" ]; then echo "::error::Gitea unhealthy (HTTP $HTTP_CODE) — cannot push results." echo "::error::Probe data is in history/. Next successful push after Gitea" -- 2.45.2