Skip to content

fix(ci): e2e-browser readiness must prove Phoenix, not just Vite (#964)#973

Merged
Rasbandit merged 3 commits into
mainfrom
fix/e2e-browser-readiness
Jul 9, 2026
Merged

fix(ci): e2e-browser readiness must prove Phoenix, not just Vite (#964)#973
Rasbandit merged 3 commits into
mainfrom
fix/e2e-browser-readiness

Conversation

@Rasbandit

Copy link
Copy Markdown
Member

Summary

  • e2e-browser's Playwright webServer readiness gates were shallow: Phoenix polled /api/health (HealthController.index/2 — "always 200 once the app is up", no Postgres check), and both Vite entries used a bare port: check that never proves the /api proxy can reach Phoenix. That let Playwright start tests before the full stack (Vite → proxy → Phoenix → Postgres) was actually serving, producing Req.TransportError connection refused + vite proxy errors + element(s) not found (runs 28923600235 attempt 2, 28938773572).
  • Switched all four webServer entries in frontend/playwright.config.ts to /api/health/deep, which round-trips Ecto.Repo (check_postgres), so readiness only passes once the backend can genuinely serve a request.
  • frontend/ is a deployable path per the pre-push/version-check policy, so bumped mix.exs 0.5.649 → 0.5.650.

Verification

No reliable local repro exists — this is a CI-only boot race. Verified by code-reading (confirmed /api/health's docstring and that /api/health/deep checks Postgres; confirmed Vite's /api proxy target and that its old check was a bare TCP port) plus tsc --noEmit and biome check locally. Will watch this PR's own e2e-browser CI run to confirm no regression; the race is intermittent (2 failures in 12h) so a single green run is corroborating, not conclusive.

Test plan

  • e2e-browser CI job passes on this PR
  • No new flakiness introduced (compare against baseline pass rate over next few runs)

Closes #964

Playwright's webServer gates were shallow: Phoenix polled /api/health
("always 200 once the app is up", no Postgres check), and both Vite
entries used a bare port check that never proves the /api proxy can
actually reach Phoenix. Switch all four to /api/health/deep, which
round-trips Ecto.Repo, so tests only start once the whole chain
(Vite -> proxy -> Phoenix -> Postgres) is genuinely serving.

Closes #964
@Rasbandit
Rasbandit enabled auto-merge (squash) July 8, 2026 23:40
Rasbandit added a commit that referenced this pull request Jul 9, 2026
#974)

* fix(deps): OTP 27.1.2 -> 27.3.4.14 — ssl session-ticket VM crash

Bump the release/CI toolchain to OTP 27.3.4.14 (ssl 11.2.12.10), whose
release notes fix the exact prod crash class from the Jul 3 incident:
tls_client_ticket_store crashing on TLS 1.3 session tickets in auto mode
(OTP-20232, erlang/otp PR-11311), plus ticket/session store recovery
resilience (OTP-20216) and the 2026-06/07 ssl CVE fixes.

Also harden rel/env.sh.eex: retry when hostname -I is transiently empty
during boot, then fail loudly instead of booting undistributed forever
(the #966 secondary anomaly).

Closes #966

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump to 0.5.651 (avoid collision with #973's 0.5.650)

---------

Co-authored-by: Rasbandit <Rasbandit@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Rasbandit and others added 2 commits July 8, 2026 18:48
The Vite webServer URLs proxy /api/health/deep through to Phoenix, so
their old 15s timeout (sized for a bare TCP check) would fail the run
while Phoenix is still legitimately booting within its own 120s budget.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Rasbandit
Rasbandit merged commit 828466a into main Jul 9, 2026
55 of 57 checks passed
@Rasbandit
Rasbandit deleted the fix/e2e-browser-readiness branch July 9, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e-browser: web-server boot race — Playwright starts before Phoenix/Vite are up (connection refused)

1 participant