Fix Playwright artifact ownership under rootless Docker #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/playwright-rootless-chown"
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?
Problem
scripts/playwright.shruns the Playwright container as root and then chowns the artifacts back to$(id -u):$(id -g). Under rootless Docker those UIDs live inside the container user namespace: container UID 0 maps to the invoking user, while container UID 1000 maps to host UID 100999. The cleanup therefore leftweb/e2e/.auth,web/test-resultsandweb/playwright-reportowned by an unmapped id, andgit worktree remove/rm -rfcould not delete them.Change
Detect rootless Docker with
docker info --format '{{json .SecurityOptions}}'and chown to0:0there. Rootful Docker keeps the host uid.Verification
bash -n scripts/playwright.sh0:0; a chown with that owner produced artifacts owned by1000:1000.docker info, resolving to1000:1000.web/e2e/.authandweb/test-resultswere owned by100999; no100999files remain outside Docker storage.The full Playwright suite was not rerun: this change affects only the post-run ownership cleanup.
Documentation
No documentation change: the script behavior and the documented commands stay the same.
Migrations and rollback
No schema or data changes.
Some checks were not successful
1 failing, 6 successful checks
16
1 failing check
6 successful checks
You can also merge this with the command line.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.