Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
docs: add retry and fail-on-error to health check workflow
Transient network blips from GitHub Actions runners were triggering false Slack alerts. Add a single retry with 3s backoff to filter those out, and fail the job when endpoints are genuinely down. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmitha Mallesh committed
Feb 22, 2026 at 12:42 UTC
faa8e45259c99eee831514ff7e4a90e5aba320b5
1 file changed
+20
-6
.github/workflows/docs.health-check.yml
+20
-6
@@ -23,12 +23,22 @@ jobs:
23
local url="$2"
24
shift 2
25
CHECKED=$((CHECKED + 1))
26
- if STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 "$@" "$url" 2>/dev/null); then
27
- :
28
- else
29
- STATUS="000"
30
- fi
31
- if [ "$STATUS" -ge 400 2>/dev/null ] || [ "$STATUS" = "000" ]; then
26
+ local attempt=0
27
+ local STATUS="000"
28
+ while [ "$attempt" -lt 2 ]; do
29
+ if STATUS=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 "$@" "$url" 2>/dev/null); then
30
+ :
31
+ else
32
+ STATUS="000"
33
+ fi
34
+ if [ "$STATUS" -ge 400 2>/dev/null ] || [ "$STATUS" = "000" ]; then
35
+ attempt=$((attempt + 1))
36
+ [ "$attempt" -lt 2 ] && sleep 3
37
+ else
38
+ break
39
+ fi
40
+ done
41
+ if [ "$STATUS" -ge 400 2>/dev/null ] || [ "$STATUS" = "000" ]; then
42
echo "FAIL: ${label} → ${STATUS}"
43
echo "${label} → ${STATUS}" >> "$FAIL_FILE"
44
FAIL_COUNT=$((FAIL_COUNT + 1))
@@ -103,3 +113,7 @@ jobs:
113
payload: ${{ steps.check.outputs.slack_payload }}
114
env:
115
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_POD_DX_WEBHOOK_URL }}
116
+
117
+ - name: Fail on unhealthy endpoints
118
+ if: steps.check.outputs.has_failures == 'true'
119
+ run: exit 1