ci: declare the Playwright image in-repo for both browser jobs #62
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!62
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/probe-job-container"
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?
Promotes the probe to the real change, and extends it to
e2e.What the probe established
It asked one question: does act_runner still apply its global
container.optionsto a workflow-declared container? It answered yes, on the run in this PR's history:So the tag can live in the repo at no functional cost.
Why it should
With
runs-on: playwright, the tag lives in host-side runner config that nothing in this repo — Renovate included — can see. Bumping theplaywrightpackage then breaks every browser job until somebody SSHes into the runner box. #38 and #66 are the worked examples:#66 could never go green on its own, because only half the pair was visible to Renovate.
Both browser jobs, not just visual-tests
They share one lockfile, so pinning
visual-teststo an in-repo tag whilee2ekept the label would relocate the mismatch onto the half left behind rather than fix it.e2e's exposure is currently masked: it hasneeds: checks, so on #66 it shows "skipped" rather than failing — meaning its status there is unknown, not passing.e2eis also the job that leans hardest on the runner's global options, so it asserts them before anything depends on them. Docker reachability is the one thing the probe did not cover; it is proven by thedocker versioncall ending "Provide a docker CLI", which fails immediately and legibly rather than mid-job.The tag stays at v1.61.1-noble
mainresolvesplaywright1.61.1 and the label maps to v1.61.1-noble — they match today. Bumping the tag here would create the same mismatch in the opposite direction and breakmain. The bump belongs in whichever PR bumps the package, i.e. #66 on rebase. This PR's job is to move the tag into the repo and couple the two.Two guards per browser job
Both additive — step lists before/after show
+2and-0for each job, no existing step touched.Container options — shm ≥ 1GB,
/ci-cachewritable,host.docker.internalresolves. The probe proved these survive, but that is act_runner behaviour we do not control, and silently losing--shm-sizebecomes confusing Chromium crashes deep in a test run. Assert, don't assume.Browser builds — ask the installed playwright which builds it expects via
playwright install --dry-run(whose paths are image paths, becausePLAYWRIGHT_BROWSERS_PATHis/ms-playwright) and verify the image contains them. No version string is duplicated anywhere, so there is nothing to drift.That second guard also closes the hole
renovate.json5documents on #38:minimumReleaseAgegates the version Renovate selects, but thepnpm dedupepostUpgradeTask re-resolves afterwards and can write a newerplaywright-coreinto the same lockfile. Grouping makes the pair move together; comparing installed-package expectations against actual image contents catches a divergence even inside one PR, because it trusts neither version number.Renovate
mcr.microsoft.com/playwrightjoins thetesting toolinggroup, so the image and the packages move in one PR instead of two that are each green alone and breakmaintogether.One honest caveat, recorded in the config rather than glossed over: the
github-actionsmanager documents extracting "a Docker image specified in a job'scontainer:field" with depTypedocker, but it does not document the depName it assigns.mcr.microsoft.com/playwrightis the conventional docker-datasource form, not a guarantee. If it is wrong the entry silently never matches — the same failure shape as the labels that were dropped in silence before 2026-07-29 — so it carries a note to confirm with aLOG_LEVEL=debugdry-run. The workflow guard is the backstop either way.Testing
run:block in both jobs parses asbash -n.PLAYWRIGHT_BROWSERS_PATHat a populated directory.v1.61.1-noble: the image ships exactly the five builds 1.61.1 expects, matching--dry-run1:1.renovate.json5still parses as JSON5 with the image in the group.visual-tests6 → 8,e2e16 → 18, zero removals.This PR's own CI is the first real exercise of the converted
e2ejob. Both guards are designed to make any surprise legible at the top of the job rather than deep inside a browser launch.4181f431092591c61164ci: probe declaring the Playwright image in-repo instead of via runner labelto ci: declare the Playwright image in-repo for both browser jobs