Skip to content

chore: best-effort cleanup for output folders that are mounted#12300

Merged
aslushnikov merged 6 commits into
microsoft:mainfrom
aslushnikov:cleanup-output-folders-that-are-mounted-to-container
Feb 23, 2022
Merged

chore: best-effort cleanup for output folders that are mounted#12300
aslushnikov merged 6 commits into
microsoft:mainfrom
aslushnikov:cleanup-output-folders-that-are-mounted-to-container

Conversation

@aslushnikov
Copy link
Copy Markdown
Contributor

Fixes #12106

@aslushnikov aslushnikov force-pushed the cleanup-output-folders-that-are-mounted-to-container branch from b9edcbd to 5f028c3 Compare February 23, 2022 09:36
@aslushnikov aslushnikov force-pushed the cleanup-output-folders-that-are-mounted-to-container branch from 77c95b9 to 1a44ad2 Compare February 23, 2022 16:43
removeFolder(dir, { maxBusyTries: 10 }, error => {
fulfill(error ?? undefined);
removeFolder(dir, { maxBusyTries: 10 }, async error => {
if (!error) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's check for error?.code === 'EBUSY'

@aslushnikov aslushnikov merged commit e5c9d1e into microsoft:main Feb 23, 2022
@aslushnikov aslushnikov deleted the cleanup-output-folders-that-are-mounted-to-container branch February 23, 2022 20:55
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Feb 23, 2022
aslushnikov added a commit that referenced this pull request Feb 23, 2022
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Feb 23, 2022
microsoft#12300)"

This reverts commit e5c9d1e.

Reason for revert: turns out this fix results in a 5-second delay
when starting tests in docker, with `test-results` folder being
a non-removable mount.

The reason for the delay is the `maxBusyTries` option that we
supply by default to rimraf when trying to remove the folder.

While this option might come handy when removing temporary
browser profile folder, it doesn't serve us well in this particular
usecase.
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Feb 23, 2022
…output folders that are mounted (microsoft#12318)"

This reverts commit 0a1c1da.

Reason for revert: turns out this fix results in a 5-second delay
when starting tests in docker, with `test-results` folder being
a non-removable mount.

The reason for the delay is the `maxBusyTries` option that we
supply by default to rimraf when trying to remove the folder.

While this option might come handy when removing temporary
browser profile folder, it doesn't serve us well in this particular
usecase.

References microsoft#12106
aslushnikov added a commit that referenced this pull request Feb 23, 2022
#12300)" (#12321)

This reverts commit e5c9d1e.

Reason for revert: turns out this fix results in a 5-second delay
when starting tests in docker, with `test-results` folder being
a non-removable mount.

The reason for the delay is the `maxBusyTries` option that we
supply by default to rimraf when trying to remove the folder.

While this option might come handy when removing temporary
browser profile folder, it doesn't serve us well in this particular
usecase.

References #12106
aslushnikov added a commit that referenced this pull request Feb 23, 2022
…lders that are mounted (#12318)" (#12322)

This reverts commit 0a1c1da.

Reason for revert: turns out this fix results in a 5-second delay
when starting tests in docker, with `test-results` folder being
a non-removable mount.

The reason for the delay is the `maxBusyTries` option that we
supply by default to rimraf when trying to remove the folder.

While this option might come handy when removing temporary
browser profile folder, it doesn't serve us well in this particular
usecase.

References #12106
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Feb 23, 2022
aslushnikov added a commit that referenced this pull request Feb 23, 2022
aslushnikov added a commit to aslushnikov/playwright that referenced this pull request Feb 23, 2022
… output directories

SHA: 71edad3

- Previous attempt: microsoft#12300
- Revert with reasoning: ebc52d1

Fixes microsoft#12106
aslushnikov added a commit that referenced this pull request Feb 23, 2022
…irectories (#12324)

SHA: 71edad3

- Previous attempt: #12300
- Revert with reasoning: aslushnikov@ebc52d1

Fixes #12106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Error: EBUSY: resource busy or locked when using volumes in docker-compose with playwright 1.19.0 and mcr.microsoft.com/playwright:v1.15.0-focal

2 participants