ci(docker-deploy): retry smoke run once after aggressive re-warm
CI / Architecture Guardrails (push) Successful in 3m21s
CI / Typecheck (push) Successful in 4m1s
CI / Lint (push) Successful in 4m0s
CI / Assistant Split Regression (push) Successful in 4m33s
CI / Unit Tests (push) Successful in 7m45s
CI / Build (push) Successful in 7m31s
CI / E2E Tests (push) Successful in 4m44s
CI / Fresh-Linux Docker Deploy (push) Failing after 11m44s
CI / Release Images (push) Has been cancelled
CI / Architecture Guardrails (push) Successful in 3m21s
CI / Typecheck (push) Successful in 4m1s
CI / Lint (push) Successful in 4m0s
CI / Assistant Split Regression (push) Successful in 4m33s
CI / Unit Tests (push) Successful in 7m45s
CI / Build (push) Successful in 7m31s
CI / E2E Tests (push) Successful in 4m44s
CI / Fresh-Linux Docker Deploy (push) Failing after 11m44s
CI / Release Images (push) Has been cancelled
Next.js dev mode on the QNAP runner intermittently drops its listening socket for ~1-2s during route-transition compiles — smoke test #2 (page.goto('/')) has hit ERR_CONNECTION_REFUSED despite both warm-ups and the immediately preceding health test succeeding. Playwright's in-process retry fires while the socket is still down. Wrap the playwright invocation in a shell-level retry: if the first full run fails, re-warm / aggressively (up to 10 probes waiting for 307) and rerun the whole suite once.
This commit is contained in:
@@ -620,7 +620,30 @@ jobs:
|
||||
- name: Run smoke tests
|
||||
# Use the pinned APP_BASE_URL (explicit IP) so Chromium hits the same
|
||||
# container as the warm-up probes.
|
||||
run: PLAYWRIGHT_BASE_URL="$APP_BASE_URL" /tmp/pw-install/node_modules/.bin/playwright test --config apps/web/playwright.ci.config.ts
|
||||
#
|
||||
# Next.js dev mode on QNAP briefly drops the listening socket on
|
||||
# route-transition compiles — test #2 (`/`) has hit ERR_CONNECTION_
|
||||
# REFUSED between a warm-up and the test even though the same URL
|
||||
# returned 307 moments earlier. Playwright's in-process retry runs
|
||||
# while the socket is still down. Wrap the whole playwright
|
||||
# invocation in a shell retry: if the first run fails, re-warm /
|
||||
# aggressively and run the full suite once more.
|
||||
run: |
|
||||
run_smoke() {
|
||||
PLAYWRIGHT_BASE_URL="$APP_BASE_URL" \
|
||||
/tmp/pw-install/node_modules/.bin/playwright test \
|
||||
--config apps/web/playwright.ci.config.ts
|
||||
}
|
||||
if run_smoke; then exit 0; fi
|
||||
echo "First smoke run failed — aggressive re-warm + retry"
|
||||
for i in $(seq 1 10); do
|
||||
CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 30 "${APP_BASE_URL}/" || echo "000")
|
||||
echo "Post-fail warm / $i: HTTP $CODE"
|
||||
[ "$CODE" = "307" ] && break
|
||||
sleep 3
|
||||
done
|
||||
sleep 5
|
||||
run_smoke
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: failure()
|
||||
|
||||
Reference in New Issue
Block a user