Skip to content

fix(ci): stop wedged browser installs from eating the pipeline - #67

Open
patriksimms wants to merge 1 commit into
mainfrom
fix/ci-playwright-hang
Open

fix(ci): stop wedged browser installs from eating the pipeline#67
patriksimms wants to merge 1 commit into
mainfrom
fix/ci-playwright-hang

Conversation

@patriksimms

Copy link
Copy Markdown
Owner

Problem

CI jobs have been hanging indefinitely on bunx playwright install --with-deps chromium. Today four jobs across three branches (main, feat/more-fonts, feat/more-layout-backgrounds) sat on that one step for between one and three hours with no output, while a healthy run cleared the same step in 3m19s. Nothing recovers them: without a timeout each job would have held a runner for the full six-hour limit, and the branch just looks "still running" the whole time.

The step shells out to apt-get, which blocks forever if it hits a debconf or needrestart prompt.

Solution

  • timeout-minutes: 10 on the browser install step, so a wedged package install fails fast and can be rerun
  • timeout-minutes: 30 on the job as a backstop for anything else that wedges
  • DEBIAN_FRONTEND=noninteractive and NEEDRESTART_MODE=a so apt cannot wait on a prompt
  • cache ~/.cache/ms-playwright, keyed on bun.lock, so the browser download drops off the common path

The apt portion still runs on every job, so this makes the failure loud and quick rather than removing it entirely. That is the point: a ten minute red run is recoverable, a three hour grey one is not.

Validation

Validated the workflow YAML locally. The real check is this branch's own CI run, which exercises every changed line.

No configuration outside the repository is required.


Changes made with Claude Code (harness) using Claude Opus 5 (1M context).

Summary:
- cap the Playwright install step at ten minutes and the whole
  verify job at thirty
- run apt non-interactively so it cannot block on a debconf or
  needrestart prompt
- cache ~/.cache/ms-playwright, keyed on bun.lock

Rationale:
- four jobs across three branches sat on
  "bunx playwright install --with-deps chromium" for one to three
  hours with no output while the same step took 3m19s on a healthy
  runner; without a timeout each one would have held its runner for
  the full six-hour job limit
- the step shells out to apt, which blocks forever on an
  interactive prompt unless the frontend is non-interactive
- caching the browsers removes the download from the common path,
  though the apt portion still runs on every job

Tests:
- validated the workflow YAML locally; the real check is this
  branch's own CI run

AI-Assisted-By: Codex
AI-Assisted: true
AI-Agent: claude-code
AI-Model: anthropic/claude-opus-5
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