fix(ci): give gitlab perf job a discoverable chromium (ADR-0028) #243
Reference in New Issue
Block a user
Delete Branch "fix/gitlab-perf-chrome"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix the GitLab
perfjob, which failed at the Lighthouse CI healthcheck withChrome installation not found. Follow-up on ADR-0028 Phase 2 (.gitlab-ci.ymllanded in #241).Root cause
The
perfjob ran onmcr.microsoft.com/playwright:v1.55.0-jammy. That image does ship Chromium, but under/ms-playwright/chromium-<rev>/chrome-linux/chrome— a non-standard path/name. Lighthouse CI useschrome-launcher, which discovers Chrome by probing thePATH(google-chrome,chromium,chromium-browser) or theCHROME_PATHenv var. It cannot find Playwright's bundled Chromium, so the healthcheck fails before any run starts.The same class of failure ("absence de Chrome pour Lighthouse") was hit and solved on the Gitea side — there the
catthehacker/ubuntu:full-22.04image happened to carry Chrome at a standard location.Fix
Decouple the two browser-driving tools instead of forcing one image to serve both:
imagemcr.microsoft.com/playwright:v1.55.0-jammynode:24-bookworm(same as the.node-jobbase)apt-get install --no-install-recommends chromium→/usr/bin/chromiumCHROME_PATH/usr/bin/chromium(explicit, removes any PATH ambiguity)before_script!reference [.node-job, before_script]+ the apt installRationale for not pinning Playwright's Chromium via
CHROME_PATHinstead: that couples the perf job to an exact match between the npm@playwright/testversion and the Docker image tag. A Renovate bump of@playwright/testwhile the image stays atv1.55.0would silently breakexecutablePath(). The apt-installed Debianchromiumhas no such coupling.The future ADR-0016 axe-core e2e job — which drives Playwright directly — will use the Playwright image. Lighthouse wants a standard Chrome; Playwright wants its own browsers. Different tools, different images.
lighthouserc.jsalready passes--no-sandbox(containerised-CI requirement), so no change needed there — that flag's rationale applies identically on GitLab Runner.Trade-off noted
The
apt-get install chromiumre-downloads ~100 MB per perf run (the package lands in the job container's ephemeral writable layer, not a cached image layer). Acceptable for now. If perf-job duration orvm-gitlabbandwidth becomes a pain, the clean optimisation is a small custom image with Chromium pre-installed, pushed to GitLab's Container Registry — out of scope here, flagged for later.Test plan
perfjob reaches the Lighthouse run (no moreChrome installation not found) and the ADR-0017 assertions evaluate.chromiumapt install completes onnode:24-bookworm(Debian bookwormmaincarries the package)..gitlab-ci.ymlpasses GitLab CI Lint (Project → Build → Pipeline Editor → Validate) — confirms the!reference+ added keys parse.check,audit,commits,a11y,sast,secret_detection) unaffected.Related
.gitlab-ci.yml(#241).