Repository navigation
fix(install): fail fast on browser cache permission errors - #43613
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks for the quick fix, confirmed this is the right layer — much better than the pre-flight access() check I’d sketched in the issue. Two small thoughts, take or leave: Windows (and some protected macOS paths) report this as EPERM rather than EACCES, so it might be worth adding to the same condition; and a one-line hint about PLAYWRIGHT_BROWSERS_PATH alongside the EACCES error would have saved us some head-scratching on the CI runner where we hit this. |
Yury Semikhatsky (yury-s)
left a comment
There was a problem hiding this comment.
Optional: users still see a bare EACCES ... __dirlock. A hint that names PLAYWRIGHT_BROWSERS_PATH in the catch of Registry.install (like the ELOCKED box) would help.
| @@ -312,6 +312,9 @@ function lockImpl( | |||
|
|
|||
| operation.attempt(() => { | |||
| acquireLock(canonicalFile, resolvedOptions, (err, mtime, mtimePrecision) => { | |||
There was a problem hiding this comment.
On Windows, access denied from mkdir is EPERM, so the 8 min wait stays there. Leaving EPERM out on Windows is right (it can be temporary while a dir is pending delete). On other platforms EPERM is permanent (chattr +i, SIP) and could be added. Not blocking.
There was a problem hiding this comment.
If this is the case and we still stall for 8 minutes, we should not be making this change as we risk breaking other people for the edge case scenario.
There was a problem hiding this comment.
yeah this fixes the reported EACCES case while preserving locking and EPERM retries
is there a known transient EACCES or EROFS case that this would break?
|
|
||
| const browsersPath = testInfo.outputPath('readonly-browsers'); | ||
| await fs.promises.mkdir(browsersPath, { mode: 0o555 }); | ||
| const installer = childProcess({ |
There was a problem hiding this comment.
Can be exec('npx playwright install chromium', { env: { PLAYWRIGHT_BROWSERS_PATH: browsersPath }, expectToExitWithError: true }) + toContain, like the tests above. Test timeout is 5 min and the old behavior takes ~8, so a regression still fails. Also childProcess forwards all of process.env, which exec avoids on purpose.
Yury Semikhatsky (yury-s)
left a comment
There was a problem hiding this comment.
Looks good, but maybe
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b14d6a4 to
eeaed70
Compare
Test results for "MCP"5189 passed, 614 skipped Merge workflow run. |
Test results for "tests 1"23566 passed, 703 skipped Merge workflow run. |
fixes #43606