Skip to content

Commit 0c661a9

Browse files
committed
fix(release): OpenAPI export readiness gate polls the served endpoint
The gate required /health to be healthy/degraded, but the throwaway CI config yields an unhealthy server (no AWS creds), so it spun the full 30s and never gated. Poll /openapi.json instead — 200 as soon as uvicorn serves.
1 parent cde98f0 commit 0c661a9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

dev-tools/release/export_openapi_spec.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ orb "${CONFIG_FLAG[@]}" server start --foreground --api-only --socket-path "$SOC
3535
SERVER_PID=$!
3636

3737
for _ in $(seq 1 30); do
38-
if curl -sf --unix-socket "$SOCK" http://localhost/health \
39-
| python3 -c "import sys,json; d=json.load(sys.stdin); sys.exit(0 if d.get('status') in ('healthy','degraded') else 1)" 2>/dev/null; then
38+
# Poll the OpenAPI endpoint directly: it becomes available as soon as uvicorn
39+
# is serving, regardless of provider health (AWS creds, etc.). The old loop
40+
# polled /health whose status depends on backend provider checks that always
41+
# fail in CI (no credentials), so the loop never broke early.
42+
if curl -sf --unix-socket "$SOCK" http://localhost/openapi.json >/dev/null 2>&1; then
4043
break
4144
fi
4245
sleep 1

0 commit comments

Comments
 (0)