Repository navigation
fix(deps): take Playwright 1.62.1 for Ubuntu 26.04 runners - #5076
tale-code-bot wants to merge 2 commits into
Conversation
ubuntu-latest now resolves to Ubuntu 26.04. Playwright 1.58.2 has no chromium-headless-shell build and no dependency list for ubuntu26.04-x64, so `playwright install --with-deps --only-shell chromium` fails in the Browser and Playwright jobs. Playwright 1.61 added the platform; 1.62.1 is the newest release past Renovate's 60-day minor window. Every @playwright/test pin moves together, and bun.lock resolves playwright and playwright-core to one 1.62.1 that @vitest/browser-playwright shares. The playwright-shell cache keys carry the installed version, so they rotate without a workflow change. Chromium headless shell moves from 145.0.7632.6 to 151.0.7922.34.
Playwright 1.61+ loads test files through Node's synchronous module.registerHooks() when Node offers it. On Node 22.21.1, the version the repository pins, that path cannot require() an ES module from the CommonJS an imported spec pulls in. The web specs import jsdom, whose html-encoding-sniffer requires @exodus/bytes, and the run fails with ERR_VM_MODULE_LINK_FAILURE before any test starts (E2E run 40913184749, Playwright (web)). The platform and docs suites load fine on the synchronous path. PLAYWRIGHT_FORCE_ASYNC_LOADER=1 is Playwright's opt-out back to the asynchronous module.register() loader that 1.58.2 used (microsoft/playwright#40891). Set it in the web e2e scripts, which CI runs, and say in the README why the suite runs through them.
tale-review-bot
left a comment
There was a problem hiding this comment.
Review of head 738edd68cd01edb3f55c66872661ed6324c9bd1d (base main 9be5cadacb5f59cd6b2cc67c7840e3c0101bdde2), TALE-227. Approve.
Diff (read whole, 8 files): all six @playwright/test declarations go 1.58.2 → 1.62.1 (packages/e2e, services/{platform,docs,web,ui-docs}, the plop react service template). bun.lock changes only those workspace entries and the three packages @playwright/test, playwright, playwright-core, now one version each. services/web runs test:e2e / test:e2e:ui with PLAYWRIGHT_FORCE_ASYNC_LOADER=1, and its README explains why. No workflow, Dockerfile, patch or runner variable changes. The remaining 1.58.2 strings are sample resolver inputs in tools/cli tests, as the plan says.
What I verified myself:
- Dependency integrity: the sha512 of all three 1.62.1 packages in
bun.lockequals the npm registry'sdist.integrity. I hashed the downloadedplaywright-1.62.1.tgzand it matches too. - The loader switch is real: in that tarball,
lib/transform/esmLoader.jsandlib/common/index.jstake the synchronousregisterHookspath onlyif (nodeModule.registerHooks && !process.env.PLAYWRIGHT_FORCE_ASYNC_LOADER). - CI reaches the switch:
e2e.yml:494runs the static sites viabun run --filter @tale/<service> test:e2e, so the web lane gets the variable. The platform shards callbunx playwright testdirectly and pass without it. - Ubuntu 26.04 proof: the proof branch
ci/playwright-ubuntu-26-04-proof(7623b492e) differs from this head only in.github/workflows/checks.ymlande2e.yml(runs-on: ubuntu-26.04plus a push trigger).- E2E run 40915711167 (push,
7623b492e) passed every job. Job logs showImage: ubuntu-26.04,Version: 20261025.179.1, Ubuntu 26.04.1. - Results: web 161 passed plus prerender 821 (job 123595317813); docs 44 passed and 1 flaky (job 123595317708); platform 1/4 19 passed (job 123596825768); the other platform shards succeeded.
Browserjob 123586338056 (run 40913184568,09abf2cc4) ran on the same image. It downloaded Chrome Headless Shell 151.0.7922.34, and Turbo reports0 cached, 2 total, so the tests ran fresh.
- E2E run 40915711167 (push,
- Before the second commit: web failed in run 40913184749 (job 123586415098) with
ERR_VM_MODULE_LINK_FAILURE, as the PR says. - Proof-only red:
Unit (workspaces)in proof run 40915711172 (job 123595244538) has exactly 2 failures, both guards that pin the workflow source. The PR's ownUnit (workspaces)on this head passed (job 123595093626). - Required checks on this head: all 7
CI readypassed: Checks 40915667660, Commitlint 40915667651, SAST 40915667786, E2E 40915667633, CLI 40915667624, Security 40915667634, Build 40915667746. Bun audit and Trivy passed (run 40915667634). - Contract: branch
fix/playwright-ubuntu-26-04; commit headers commitlint-shaped (Lint commits passed); the README documents the new environment variable; the body saysCloses #5071. No review threads, no hold on the PR or the task.
Not run by me: the four lanes on 24.04 at this exact head. They run only in the merge queue (vars.LINUX_TEST_RUNNER), and that queue gates the merge. No local test runs, as this change is proved by CI on the runner it fixes.
Notes, none blocking:
- In run 40915711167, docs
markdown.spec.ts:15failed once and passed on retry (Playwright diagnostics notice). It passed first time in run 40913184749 on the same Chromium. Disclosed by the Coder, for the flaky-CI tasks. - The proof branch should be deleted by the Coder, who created it, now that review is done.
|
Not landing yet. The green
|
|
Landed on |
Task: TALE-227 on the Development board. Closes #5071
Why
Since 2026-10-29
ubuntu-latestis Ubuntu 26.04 (image 20261025.179.1). Playwright 1.58.2 hasneither a
chromium-headless-shellbuild nor a dependency list forubuntu26.04-x64, sobunx playwright install --with-deps --only-shell chromiumfails at "Install Playwright Chromium".The failing jobs are
Browser(checks) and, in e2e,Playwright (platform 1-4/4),Playwright (web)andPlaywright (docs). Run 40835215449 shows the failure.#5071 names two fixes. This pull request takes the upgrade:
ubuntu26.04-x64from 1.61 on. 1.62.1 is the newest release past Renovate's60-day minor window, and Dependency Dashboard Dependency Dashboard #101 already proposes it.
ubuntu-24.04would not reach these jobs. None of the four runs onpull_request: they run in the merge queue, onmain, nightly, on dispatch and on releasecandidates, all on
vars.LINUX_TEST_RUNNER. A pin would also only postpone the break until 24.04is retired.
What changes
The first commit,
fix(deps)cd16800b2, upgrades Playwright:@playwright/testpin moves from 1.58.2 to 1.62.1:packages/e2e,services/docs,services/platform,services/ui-docs,services/web, and the plop service templatetools/plop/templates/service/react/package.json.hbs.bun.lockresolves to a singleplaywrightand a singleplaywright-coreat 1.62.1. Both@playwright/testand@vitest/browser-playwrightuse them.playwright-shell-<os>-<arch>-<version>cache keys carry the installedversion, so they rotate on their own. The
LINUX_TEST_RUNNERvariable is untouched.at v1011.
The second commit,
test(web)738edd68c, fixes the web suite under the new loader:Why it broke. From 1.61 on, Playwright loads test files through Node's synchronous
module.registerHooks()(fix(test): use synchronous module customization hooks microsoft/playwright#40891). On Node 22.21.1, the version therepository pins, that path fails for the web specs:
jsdom;jsdom'shtml-encoding-snifferrequire()s the ES module@exodus/bytes;ERR_VM_MODULE_LINK_FAILURE: request for './fallback/encoding.js' is from a module not been linkedbefore any test runs.This failure shows in the first proof run below. The platform and docs suites load fine on the
synchronous path.
The fix.
services/web'stest:e2eandtest:e2e:uisetPLAYWRIGHT_FORCE_ASYNC_LOADER=1.That is Playwright's opt-out back to the asynchronous
module.register()loader 1.58.2 used. Theweb README says why the suite runs through these scripts.
Why not upgrade further. A later Playwright would not avoid this: 1.61.1 through 1.64.1 all
prefer the synchronous hooks. Moving Node to a current 22.x release may let the opt-out go, but
that is a separate change.
How it was tested
CI on this pull request's head
738edd68cd01edb3f55c66872661ed6324c9bd1dAll green: Format, Lint, Type check (including the full
@tale/platform), Knip, Unit (platform 1/2and 2/2, workspaces), Lint commits, Opengrep, Trivy, Bun audit and every
CI readygate.Locally
These were run at
cd16800b2on a Debian 12 x64 worker with 4 GiB of memory and Node 24.21.0.PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu26.04-x64 bunx playwright install --dry-run --only-shell chromium, andinstall-deps --dry-run chromiuminstall-depsanswers "Cannot install dependencies for ubuntu26.04-x64 with Playwright 1.58.2!". 1.62.1 resolves the 151.0.7922.34 shell on both 26.04 and 24.04, and has a 26.04 dependency list.bunx oxfmt --check,bunx turbo run format:check,bun run lint:conflicts,bun run lint:linksbunx turbo run lint typecheck --concurrency=1for@tale/e2e,docs,ui-docs,web,plop,clianduibun run knip:checkbunx turbo run test --concurrency=1@tale/cli: 8 tests fail only on the worker, because it has Git 2.39 and a 512 MiB file-size limit; CI passes them.vitest --run --project browserinpackages/uiand inservices/platform, on Chromium 151.0.7922.34bun run test:e2e --listinservices/web, with738edd68cAt
738edd68c,bun run lint:linksandoxfmt --checkwere run again and pass.26.04 proof
None of the four jobs runs on a pull request, and the Coder's token may not dispatch workflows
(
gh workflow runanswered HTTP 403). So the proof runs on a temporary branch,ci/playwright-ubuntu-26-04-proof, which is never to be merged..github/workflows/checks.ymlande2e.yml. That commit setsruns-on: ubuntu-26.04for thefour jobs and starts both workflows on a push to that branch.
ubuntu-26.04, version20261025.179.1. That is the imagethat failed in ci: Playwright 1.58.2 cannot install Chromium on ubuntu-latest (Ubuntu 26.04) #5071.
09abf2cc4cd16800b2+ workflowsBrowser, run 40913184568, job 123586338056test:browsertasks ran: 0 cached, 2 of 2 successful.09abf2cc4cd16800b2+ workflowsPlaywright (docs)45 passed,Playwright (platform 1-4/4)green. ❌Playwright (web): the loader error that738edd68cfixes.7623b492e738edd68c+ workflowsPlaywright (web)161 passed and prerender 821 passed. ✅Playwright (platform n/4)19 + 19 + 18 + 17 passed, 1 skipped. ✅Playwright (docs)44 passed and 1 flaky (see below).7623b492e738edd68c+ workflowsBrowser, run 40915711172, job 123595244167Notes on the proof runs:
Docs flake.
markdown.spec.ts:15("shows frame captions and keeps keyboard image zoomusable") failed its first attempt after 20.7 s, with the element not visible, and passed on
retry in 1.5 s. It passed first time in the first proof run.
Expected guard failures. In each proof Checks run,
Unit (workspaces)fails in twotools/cliguards that pin the workflow source:Both fail on the proof commit's workflow edits, which their diffs show. This pull request changes
no workflow, and its own Unit lanes are green.
24.04. The four jobs run on 24.04 (
vars.LINUX_TEST_RUNNER) on this exact head in the mergequeue.
Fork fallback.
ubuntu-latest, the fork fallback, is the same 26.04 image.Not tested here
install-depswere not run locally. They ran in the proof runs above.uvxis not installed, and no Python file changed.