ITADN

Flaky CI: playwright-examples shard fails when the remote Playwright server port is already in use (EADDRINUSE)

#2444Openschloerke 创建于 7 天前
ai-generated-issueflaky test
S
schloerkecommented
Every test in the `playwright-examples (3.11, firefox, 0)` shard failed because the remote Playwright server never came up: the container's `playwright run-server` could not bind its port, so the readiness check timed out. - Failed job: https://github.com/posit-dev/py-shiny/actions/runs/31626891028/job/94215473182 - Commit: `ed140dd9` (PR #2441) - Job: `playwright-examples (3.11, firefox, 0)` (run attempt 1) - Re-run of the same job on the same commit: passed (run attempt 2) ## Error ``` Timed out waiting for Playwright firefox server on ws://127.0.0.1:43424/: BrowserType.connect: WebSocket error: socket hang up Error: listen EADDRINUSE: address already in use 0.0.0.0:43424 ``` ## Notes The `EADDRINUSE` comes from inside the server container, which is started by `.github/py-shiny/setup-playwright-remote/action.yaml` as: ``` docker run ... -p "127.0.0.1:43424:43424" ... \ /bin/sh -c "npx --no -- playwright run-server --port 43424 --host 0.0.0.0" ``` The port appears to be derived per-job rather than probed for availability, so two shards scheduled onto the same runner (or a lingering container from an earlier step) can collide on it. `run-server` then exits immediately, the "Wait for Playwright server" step gets `socket hang up` for the full timeout, and the whole shard fails before running a single test. This is an infra race in the setup action, not a test-code bug — the same commit passed on re-run with no changes. Related but distinct: #2424 is the same setup action failing *after* the server is up (`TargetClosedError` from the readiness check closing a shared browser). This one is the server failing to start at all.
0 条评论