From 2337a03dfa1f72aec33d68ea0e41dc4ee2244675 Mon Sep 17 00:00:00 2001 From: OG T Date: Tue, 24 Mar 2026 18:24:18 +0800 Subject: [PATCH] fix(cd): Use Python httpx for health check instead of curl - Container uses python:3.11-slim without curl - httpx is already installed as API dependency - Fixes: "curl: executable file not found in $PATH" Co-Authored-By: Claude Opus 4.5 --- .github/workflows/cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index b183957e..90c4b5b3 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -236,8 +236,8 @@ jobs: run: | sleep 15 API_POD=$(kubectl get pods -n awoooi-prod -l app=awoooi-api -o jsonpath='{.items[0].metadata.name}') - # 指定容器名稱避免 "container not found" 錯誤 - kubectl exec -n awoooi-prod $API_POD -c api -- curl -sf http://localhost:8000/api/v1/health || echo "Health check failed but deployment succeeded" + # 使用 Python httpx (容器沒有 curl,但有 httpx) + kubectl exec -n awoooi-prod $API_POD -c api -- python -c "import httpx; r=httpx.get('http://localhost:8000/api/v1/health', timeout=5); print(r.status_code)" || echo "Health check failed but deployment succeeded" - name: Notify OpenClaw if: always()