fix(e2e): 傳遞驗證過的 API URL 給後續步驟
- Health Check 輸出 working_api_url (VIP 或 fallback) - E2E Verification 使用已驗證可用的 URL - 解決 VIP 不通時 E2E 腳本連線失敗問題 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
8
.github/workflows/daily-e2e-health.yaml
vendored
8
.github/workflows/daily-e2e-health.yaml
vendored
@@ -93,6 +93,7 @@ jobs:
|
||||
kubectl get endpoints -n awoooi-prod awoooi-api || echo "⚠️ kubectl 失敗"
|
||||
|
||||
- name: Check API Health
|
||||
id: health
|
||||
run: |
|
||||
API_URL="${{ github.event.inputs.api_url || env.DEFAULT_API_URL }}"
|
||||
echo "🔗 檢查 API 健康狀態..."
|
||||
@@ -111,6 +112,7 @@ jobs:
|
||||
if [ "$HTTP_CODE" = "200" ]; then
|
||||
echo "✅ API 可用: $API_URL (HTTP $HTTP_CODE)"
|
||||
cat /tmp/health_response.txt
|
||||
echo "working_api_url=$API_URL" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "❌ API 無法連線: $API_URL (HTTP $HTTP_CODE)"
|
||||
echo "📋 Response:"
|
||||
@@ -125,6 +127,7 @@ jobs:
|
||||
if [ "$FALLBACK_CODE" = "200" ]; then
|
||||
echo "✅ 備用端點可用,VIP 可能有問題"
|
||||
cat /tmp/fallback_response.txt
|
||||
echo "working_api_url=$FALLBACK_URL" >> $GITHUB_OUTPUT
|
||||
exit 0 # 備用成功,不算失敗
|
||||
fi
|
||||
|
||||
@@ -137,11 +140,12 @@ jobs:
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}/apps/api
|
||||
run: |
|
||||
API_URL="${{ github.event.inputs.api_url || env.DEFAULT_API_URL }}"
|
||||
# 使用 Health Check 驗證過的可用 URL
|
||||
API_URL="${{ steps.health.outputs.working_api_url }}"
|
||||
DRY_RUN="${{ github.event.inputs.dry_run || 'true' }}"
|
||||
|
||||
echo "🎯 執行 E2E Tool Call Verification v2.0"
|
||||
echo " API: $API_URL"
|
||||
echo " API: $API_URL (verified working)"
|
||||
echo " Dry Run: $DRY_RUN"
|
||||
|
||||
if [ "$DRY_RUN" = "true" ]; then
|
||||
|
||||
Reference in New Issue
Block a user