Skip to content

Commit cbc41c3

Browse files
committed
fix(ci): keep canon-quality retry loop alive on curl transport failures
1 parent 3af60ce commit cbc41c3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/canon-quality.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,18 @@ jobs:
8484
AUDIT_OK=false
8585
HTTP_CODE=000
8686
for attempt in 1 2; do
87+
# `|| true` guards against curl exit codes (DNS, connection refused,
88+
# TLS errors, --max-time timeout) tripping bash -e via the command
89+
# substitution and aborting the retry loop. `-w '%{http_code}'` still
90+
# emits "000" on transport failure, which the loop already handles.
8791
HTTP_CODE=$(curl -sS -o /tmp/resp.raw -w '%{http_code}' \
8892
-X POST \
8993
-H 'Content-Type: application/json' \
9094
-H 'Accept: application/json, text/event-stream' \
9195
-H "User-Agent: $USER_AGENT" \
9296
--max-time 120 \
9397
-d @/tmp/req.json \
94-
"$ODDKIT_MCP_URL")
98+
"$ODDKIT_MCP_URL" || true)
9599
echo "Attempt $attempt -> HTTP $HTTP_CODE"
96100
if [ "$HTTP_CODE" = "200" ]; then
97101
AUDIT_OK=true

0 commit comments

Comments
 (0)