From 75e04b3d997a4f3da4e62b052e69be58b1d087e3 Mon Sep 17 00:00:00 2001 From: Patrik Simms Date: Wed, 19 Aug 2026 12:38:13 +0200 Subject: [PATCH] fix(ci): stop wedged browser installs from eating the pipeline 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 --- .github/workflows/ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cc7704..3d5ad7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,13 @@ on: jobs: verify: runs-on: ubuntu-latest + # Backstop: a wedged step should not hold a runner for the default six hours. + timeout-minutes: 30 env: + # apt runs inside `playwright install --with-deps`; without these it can block forever + # on a debconf or needrestart prompt instead of failing. + DEBIAN_FRONTEND: noninteractive + NEEDRESTART_MODE: a DATABASE_URL: postgresql://sakekeep:sakekeep@127.0.0.1:54321/sakekeep S3_ENDPOINT: http://127.0.0.1:19000 S3_REGION: us-east-1 @@ -34,7 +40,16 @@ jobs: - run: docker compose up -d --wait - run: bun run db:migrate - run: bun run db:seed - - run: bunx playwright install --with-deps chromium + - name: Cache Playwright browsers + uses: actions/cache@v6 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ hashFiles('bun.lock') }} + # Hosted runners have hung here for hours with no output. Cap the step so a stuck + # package install fails fast and can be rerun. + - name: Install Chromium and its system dependencies + timeout-minutes: 10 + run: bunx playwright install --with-deps chromium - run: bun run verify - if: always() run: docker compose logs --no-color