Skip to content

πŸ”§ chore(ci): cache Playwright browsers + bump npm-ci timeout to 15m#397

Merged
s-b-e-n-s-o-n merged 1 commit into
mainfrom
fix/ci-playwright-cache
May 28, 2026
Merged

πŸ”§ chore(ci): cache Playwright browsers + bump npm-ci timeout to 15m#397
s-b-e-n-s-o-n merged 1 commit into
mainfrom
fix/ci-playwright-cache

Conversation

@s-b-e-n-s-o-n
Copy link
Copy Markdown
Contributor

Summary

Three consecutive Playwright runs failed at the same step on cdn.playwright.dev CDN throttling:

Each attempt: chromium download reaches 100% at ~9m30s, then node install.js SIGTERMs at the 10-min wall clock. Same workflow file, same package versions β€” CDN throttling is currently routing each runner pool through a slow edge.

Changes

  • actions/cache for ~/.cache/ms-playwright keyed on lockfile hash + github.ref_name. Each branch gets its own cache namespace (matches the scoping pattern in quality-mutation-monthly.yml). After the first cold-cache run, subsequent runs short-circuit the postinstall download.
  • timeout_minutes 10 β†’ 15 covers the worst observed throttled-download case with margin for the npm install post-extraction work.
  • Inline # zizmor: ignore[cache-poisoning] pragma with rationale; the workflow's push:main + PR triggers cause zizmor to flag any actions/cache as a poisoning risk regardless of key scope.

The dedicated Install Playwright Chromium step that runs after npm ci keeps its 10-min retry budget and will now hit the warm cache on every run.

Test plan

  • Pre-push gates green locally (clean-tree, biome, qlty, qlty-smells, typecheck, 100% coverage, build, zizmor)
  • zizmor passes on the edited workflow
  • PR-event Playwright workflow run passes on this commit
  • After merge: rerun the failed main-branch Playwright on 7dc8b2d3 (which won't have the fix on its tree but will share the cache β€” chromium binary persists), OR re-dispatch release-cut against the new merge commit

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-demo Ready Ready Preview, Comment May 28, 2026 2:19am
drydock-website Ready Ready Preview, Comment May 28, 2026 2:19am

Copy link
Copy Markdown
Member

@biggest-littlest biggest-littlest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: cache + timeout fix for the chromium-download CDN throttle.

ALARGECOMPANY
ALARGECOMPANY previously approved these changes May 28, 2026
Copy link
Copy Markdown
Member

@ALARGECOMPANY ALARGECOMPANY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread .github/workflows/e2e-playwright.yml Fixed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

Three consecutive Playwright runs (rc.28 PR + main post-merge + retry)
failed with the same shape: @playwright/browser-chromium's postinstall
hits cdn.playwright.dev under throttling, chromium download reaches
100% at ~9 min 30 s, then `node install.js` SIGTERMs at the 10-min
wall-clock. Two-part fix:

- actions/cache for ~/.cache/ms-playwright keyed on e2e/package-lock
  so the binary survives across runs. Cold cache only hits once per
  lockfile change.
- timeout_minutes 10 -> 15 covers the worst observed throttled
  download with margin to spare.

The dedicated `Install Playwright Chromium` step that runs after this
keeps its own 10-min retry budget and now hits the warm cache.
Copy link
Copy Markdown
Member

@biggest-littlest biggest-littlest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after zizmor pragma placement fix.

Copy link
Copy Markdown
Member

@ALARGECOMPANY ALARGECOMPANY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pragma now adjacent to the flagged line.

@s-b-e-n-s-o-n s-b-e-n-s-o-n merged commit cac1793 into main May 28, 2026
25 checks passed
@s-b-e-n-s-o-n s-b-e-n-s-o-n deleted the fix/ci-playwright-cache branch May 28, 2026 02:35
s-b-e-n-s-o-n added a commit that referenced this pull request May 28, 2026
… browsers

The cucumber job actually launches a real browser via @playwright/test
(features/ui.feature β†’ ensureBrowser β†’ chromium.launch). Setting
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 at the workflow level made `npm ci`
skip the chromium postinstall, so every "Authenticated UI view renders
in a browser" scenario failed with:

    browserType.launch: Executable doesn't exist at
    /home/runner/.cache/ms-playwright/chromium_headless_shell-1223/...

The original commit message claimed "no job here uses Playwright" β€” that
was wrong about cucumber. Fix:

- Drop the workflow-level env.
- Add `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` as job-level env on the three
  load-test jobs (Artillery only, no browser).
- Add an actions/cache step on the cucumber job for ~/.cache/ms-playwright,
  using the same per-ref scoping pattern as quality-mutation-monthly.yml so
  an untrusted PR can't poison main's binary. Cold cache pays the 167 MiB
  cdn.playwright.dev fetch once per branch; subsequent runs short-circuit.
- Bump the cucumber `npm ci` retry timeout 5m β†’ 15m so a throttled cold-
  cache fetch still finishes inside its budget (mirrors e2e-playwright.yml
  PR #397).

Update the workflow test that asserted the now-removed workflow-level env
to assert the inverted invariant: skip lives on load-test jobs, cucumber
caches instead.
s-b-e-n-s-o-n added a commit that referenced this pull request May 28, 2026
…or rc.28 prep (#399)

## Summary

Consolidates **45 commits** of CI hardening, security scanner
improvements, dependency bumps, and the resulting test fixes onto `main`
so rc.28 can be cut cleanly. Builds on top of the already-merged #396
(rc.28 app code) and #397/#398 (Playwright cache/runner-image fixes).

**Theme breakdown:**
- πŸ“¦ **Dependency bumps** (12) β€” Biome, Vitest, Playwright, Artillery,
Codecov, CodeQL, Snyk, Nuclei, ZAP, cosign, Docker actions, zizmor
- πŸ”’ **Security workflow hardening** (14) β€” Scorecard, ZAP/Snyk SARIF
uploads, Nuclei DAST, CodeQL query pack pin, Crowdin sync, DAST
credential masking, Harden Runner coverage, Renovate scoping, release
SBOM attestation/verification with pinned Trivy, Docker build metadata
standardization, release retry normalization
- πŸ”§ **Workflow hygiene** (8) β€” Playwright host-install download skip,
mutation artifact layout verification, Stryker shard dashboards,
Artillery advisory gates, Crowdin emoji prefix, Playwright image sync,
share runtime path filters, move workflow tests out of the app suite
- ⚑ **Performance** (1) β€” split load test profiles into parallel jobs
- πŸ§ͺ **Test coverage** (5) β€” ZAP SARIF converter branches, Playwright
retry artifact retention, workflow tests (release metadata, action pin
fixtures, retry attempts, Playwright download env), script tests wired
into local + CI gates
- πŸ› **Follow-up fixes from this consolidation** (3):
- `🎨 style(lint): apply Biome auto-fixes after bumped rules` β€” bumped
Biome flagged pre-existing literal-key / template-string / formatter
issues
- `πŸ› fix(ci): drop invalid artifact-metadata permission scope` β€”
`artifact-metadata` isn't a real GHA scope; `attestations: write`
already covers it
- `πŸ§ͺ test(ui): align crowdin-config invariant with
single-source-of-truth` β€” `377b6bdf` moved language scoping into
`crowdin.yml`, so the pre-existing UI test had to flip its assertion

Local pre-push pipeline all green (clean-tree β†’ biome β†’ qlty β†’
qlty-smells β†’ scripts-test β†’ workflow-tests β†’ typecheck-ui β†’ coverage
100% sharded β†’ build sharded β†’ zizmor).

## Test plan

- [ ] CI Verify (`ci-verify.yml`) passes β€” load-test and cucumber jobs
now skip the Playwright postinstall download
- [ ] E2E Playwright (`e2e-playwright.yml`) passes inside the official
Playwright container (#398 carry-forward)
- [ ] Mutation slices unchanged from main + new mutation artifact layout
check passes
- [ ] CodeQL + Scorecard + zizmor + qlty all green
- [ ] Workflow tests (`.github/tests/`, 26 tests) pass in CI
- [ ] After merge: `gh workflow run release-cut.yml --ref main -f
release_tag=v1.5.0-rc.28`
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.

4 participants