Each e2e run serves sak on a free port of its own, so two runs on one host no longer collide #140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3776-sak-s-e2e-suites-serve-on-fixed-ports-18"
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?
Tracker: #3776
The e2e suites served sak on fixed loopback ports: 18987 (main and shots), 18988 (runner), 19000 (navigator), 19001 (perf), and 19002 and 19003 for the navigator's crowded and tall-project servers. A second e2e run on the same host took the same port. That second run could be another runner's gate, an agent running the suites by hand, or a session outside sak. One of the runs then failed at global setup with
sak serve never answered on http://127.0.0.1:18988, or its specs talked to the other run's sak.What this PR delivers
web/e2e/server.tspicks the run's port. The first process of a run that loads it asks the kernel for a free loopback port, the same waysandbox.free_port()does for the sx tests, and stores it inSAK_E2E_PORT. The Playwright workers inherit that variable, so the config'sbaseURL, the global setup'ssak serveand every spec use the same port. IfSAK_E2E_PORTis already set, the run serves on that port.sak serveandsak-runner --url, the navigator suite and the perf suite all serve on the run's port. The navigator's crowded and tall-project servers each pick a free port of their own (freePort()).location.origin. Before each shot,drawOriginsets the origin in that text to one fixed reading,http://127.0.0.1:18987, the same wayfreezefixes ids and clocks. Golden set added or changed: none.SAK_E2E_PORT.Regression: the runner suite twice at once
Each arm is a
git archivecopy of the tree, withdist/sakanddist/sak-runnerbuilt bysak-gate fastand the gate cache'snode_modules. In each pair, both arms rannpx playwright test -c playwright.runner.config.tsat the same moment on m5.8cda22f: one arm passed 10/10. The other failed at global setup withsak serve exited with code 1andError: sak serve never answered on http://127.0.0.1:18988.d22af19: both arms passed 10/10. Run again withpssampling, they again passed 10/10 each, serving on ports 62096 and 62097.Other checks
drawOriginremoved from Add a runner, all 8 of its goldens fail by 89–90 px. With it in place,add-a-runner.spec.tsandtokens.spec.tspass 25/25 on a picked port.hud.spec.ts:200"Phone finder golden, light" failed by 51 px. Every differing pixel was at the dialog's four rounded corners, which sit over the WebGL canvas. No text differed.--repeat-each 3at master and 6/6 at the head.npm run e2e:perf). It measures frame rate on the host's GPU. Its only change is that it takes its port fromserver.ts.Gates at the head
fast, tracker gate run 357 (Implementer run 644's #1), passed. It ran on base8cda22fwith the change not yet committed.full, tracker gate run 359 (run 644's #2), passed at headd22af19on a clean tree, on m5. Every step passed:full(job 131, s32) failed atd22af19on one shot only:accounts.spec.ts"dark › paints a sign-in waiting on its device code", by 144 px. Its main Playwright config took 10.4 min, against the usual 4–5. That shot is the sign-in flake of #3796, and this PR touches no accounts file.git archivearms on s32: base8cda22ffailed 8 of 8 device-code sign-in shots at 1280×800 (79, 143 and 144 px), and headd22af19failed 6 of 8. The phone shots and the pasted-code shots passed in both.aaec0d0applied unchanged to the head, all 24 passed.full, tracker gate run 383 (Implementer run 689's #1), passed at headd22af19on a clean tree, on s32. Every step passed: