ci: bounded retries around playwright browser install — flaky CDN, progress accumulates

This commit is contained in:
2026-09-19 07:53:22 +00:00
parent 35493f92f0
commit aa5eabeb78
2 changed files with 13 additions and 1 deletions
+12 -1
View File
@@ -104,8 +104,19 @@ jobs:
path: $HOME/.cache/ms-playwright
key: ${{ runner.os }}-pw-browsers-${{ hashFiles('package.json') }}
# Retried: cdn.playwright.dev is flaky from this runner — Playwright's internal 5-retry
# window (~40-90s) is often not enough, but runs get through with a longer one. Progress
# accumulates across attempts: playwright skips already-installed browsers.
- name: Install browsers (local)
run: npx playwright install --with-deps chromium
run: |
set -u
ok=0
for i in 1 2 3 4 5 6; do
if npx playwright install --with-deps chromium; then ok=1; break; fi
echo "::warning::browser install attempt $i/6 failed (flaky cdn.playwright.dev) — retrying in 5s" >&2
sleep 5
done
[ "$ok" = "1" ] || { echo "::error::browser install failed after 6 attempts" >&2; exit 1; }
# Cache the base image on the shared daemon up front: a single loud failure here
# beats a 6-minute BuildKit "failed to solve" when the daemon's outbound net is down.