Run the E2E runner as the invoking user so its artifacts aren't root-owned #62

Merged
lilleman merged 4 commits from e2e-artifact-ownership into main 2026-08-05 23:04:19 +02:00
Owner

The Playwright runner ran as root with e2e-tests/artifacts bind-mounted into the checkout, so every run left root-owned files needing sudo to delete.

Every documented invocation now passes --user "$(id -u):$(id -g)" — the idiom README already uses for lockfile edits. Two supporting pieces: the mount point is tracked (.gitkeep), since an absent bind-mount source is daemon-created as root and an unprivileged runner then cannot write it; and the runner image points HOME + npm's cache at /tmp, since an arbitrary uid has no home in the Playwright image.

Baking a USER into the image was tried first and dropped: pwuser is 1001 in the noble image, so it EACCES'd on a 1000-owned checkout, and no fixed uid matches every host.

Guards: src/compose.test.ts covers every documented command plus the tracked mount point, src/ci-gate.test.ts the gate's own two runs.

The Playwright runner ran as root with `e2e-tests/artifacts` bind-mounted into the checkout, so every run left root-owned files needing `sudo` to delete. Every documented invocation now passes `--user "$(id -u):$(id -g)"` — the idiom README already uses for lockfile edits. Two supporting pieces: the mount point is tracked (`.gitkeep`), since an absent bind-mount source is daemon-created as root and an unprivileged runner then cannot write it; and the runner image points `HOME` + npm's cache at `/tmp`, since an arbitrary uid has no home in the Playwright image. Baking a `USER` into the image was tried first and dropped: `pwuser` is 1001 in the noble image, so it EACCES'd on a 1000-owned checkout, and no fixed uid matches every host. Guards: `src/compose.test.ts` covers every documented command plus the tracked mount point, `src/ci-gate.test.ts` the gate's own two runs.
lilleman added 1 commit 2026-08-05 22:25:32 +02:00
lilleman added 1 commit 2026-08-05 22:40:38 +02:00
lilleman added 1 commit 2026-08-05 22:46:09 +02:00
lilleman marked the pull request as ready for review 2026-08-05 22:49:29 +02:00
lilleman added 1 commit 2026-08-05 22:55:51 +02:00
Record macOS as a supported dev host and the commands still unverified there
CI / full-gate (push) Successful in 2m37s
Mirror / github-mirror (push) Successful in 3s
f5240ef7f6
lilleman merged commit f5240ef7f6 into main 2026-08-05 23:04:19 +02:00
lilleman deleted branch e2e-artifact-ownership 2026-08-05 23:04:19 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: larvit/plainpages#62