You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deploy-preview gives up after 3 minutes, but Pages can take up to 10 minutes to serve a new preview #166
The deploy-preview job in .github/workflows/pr-preview.yml ("Wait for Pages deployment and verify accessibility") polls the preview URL in two phases:
Phase 1: 18 attempts × 10 s = 3 minutes waiting for any successful HEAD response, then exit 1 with ERROR: No HTTP response after 3 minutes.
Phase 2: 24 attempts × 5 s = 2 minutes waiting for a 200 whose git-commit comment/meta tag matches the PR head.
GitHub Pages deployments of the shared preview.wafer.space repo regularly take longer than 3 minutes to become live, so Phase 1 fails on healthy deployments and the job has to be re-run by hand. Meanwhile the verify-preview job in preview-verification.yml already waits 10 minutes (120 × 5 s) for the same thing, so the two workflows disagree about how long a deployment is allowed to take.
21:54:25 onwards: every attempt HTTP/2 404, x-cache: HIT, age climbing by 10 s each poll (10, 20, 30 … 172)
21:57:06 ERROR: No HTTP response after 3 minutes. → job failed
Re-run (gh run rerun --failed): pushed a new commit at 21:59:05 and attempt 1/18 at 21:59:15 already got a 200 with the right commit. The original deployment had gone live on its own in roughly 5 minutes; only the wait was too short.
Earlier cases of the same failure, each passing on a plain re-run: PRs #140 and #141 on 2026-10-20.
Cache interaction
The age / x-cache: HIT headers show the first poll's 404 being cached by the Pages CDN (Fastly) and served back for the rest of the wait. The step therefore cannot see the deployment going live until the cached 404 expires, which makes the effective wait even shorter than 3 minutes of real polling. The polls should send Cache-Control: no-cache (as the muffet step already does) or add a cache-busting query string, and treat a cached response (age > 0) as not yet conclusive.
Suggested fix
Raise the Phase 1 wait to match verify-preview: up to 10 minutes.
Make the polls cache-busting so a stale 404 can't mask a finished deployment.
Consider polling the Pages deployment status via the API (GET /repos/{owner}/{repo}/pages/deployments/{id} or the deployment_status of the preview repo) instead of guessing from HTTP, and only fall back to HTTP probing after it reports success.
Share one wait implementation between pr-preview.yml and preview-verification.yml so the two timeouts can't drift apart again.
Activity