Skip to content

ci: run browser jobs in official Playwright container#20

Merged
rqbazan merged 1 commit into
mainfrom
fix/ci-playwright-container
May 27, 2026
Merged

ci: run browser jobs in official Playwright container#20
rqbazan merged 1 commit into
mainfrom
fix/ci-playwright-container

Conversation

@rqbazan
Copy link
Copy Markdown
Member

@rqbazan rqbazan commented May 27, 2026

Problem

The test job (CI) and the four browser E2E examples (spa-vite-dynamic, spa-vite-plugin, ssr-react-router, ssr-tanstack-start) hang indefinitely, blocking #18 and #19.

The hang is in mise run playwright:installpnpm dlx playwright@1.59.1 install --with-deps chromium: the browser download reaches 100% of 170.4 MiB and then never finalizes (never prints … downloaded to …). Since the jobs had no timeout-minutes, they ran until manually cancelled — hence every check shows CANCELLED, not FAILURE.

It is deterministic, not flaky — in #18's patched run it hung identically on 3 consecutive timeout-killed retries. That's why retry/cache/timeout patches can't fix it: retrying a deterministic hang just hangs again, and the cache only populates after a successful install that never happens. It reproduces on the Blacksmith blacksmith-4vcpu-ubuntu-2404 runners; the last green main run (#17, 2026-05-21) downloaded fine in non-TTY mode in ~3s, while the failing runs render an interactive progress bar and stall at 100%.

Not caused by either PR's code: #19 doesn't touch CI/toolchain at all and hangs the same way.

Fix

Run the browser jobs inside mcr.microsoft.com/playwright:v1.59.1-noble, whose browsers (chromium v1217) are pre-baked and match the repo-wide pinned playwright@1.59.1. This removes the playwright install download entirely.

  • ci.ymltest job runs in the container; dropped the playwright:install step (lib vitest browser tests use the baked browser via PLAYWRIGHT_BROWSERS_PATH=/ms-playwright).
  • e2e.yml — container applied conditionally only to matrix.browser entries (container: ${{ matrix.browser && '…' || '' }}, empty ⇒ no container); non-browser examples stay on the bare runner so their bun/deno toolchains are untouched. Dropped the playwright:install step.
  • Added timeout-minutes to both jobs as a safety net (so any future hang fails fast instead of running for hours).
  • No changes to mise.toml (the playwright:install task stays for local dev) or to any package code.

Unblocks

🤖 Generated with Claude Code

`pnpm dlx playwright install --with-deps chromium` hangs indefinitely
after the browser download reaches 100% on the Blacksmith runners (the
download stream never finalizes), so every job that installs browsers —
CI `test` and the four browser E2E examples — runs forever until manually
cancelled. Retries/timeouts don't help because the hang is deterministic.

Run those jobs inside `mcr.microsoft.com/playwright:v1.59.1-noble`, whose
browsers (chromium v1217) are pre-baked and match the pinned playwright
1.59.1, removing the `playwright install` download entirely. Non-browser
E2E examples stay on the bare runner so their bun/deno toolchains are
untouched. Add timeout-minutes as a safety net.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vland-bot
Copy link
Copy Markdown
Contributor

vland-bot Bot commented May 27, 2026

Preview release

Latest commit: b6feae9

No packages have been released.

@rqbazan rqbazan merged commit 3024d18 into main May 27, 2026
12 checks passed
@rqbazan rqbazan deleted the fix/ci-playwright-container branch May 27, 2026 22:10
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.

1 participant