Open rjpowers10 opened 1 month ago
The obvious workaround is to run the agents as separate users, and maybe that ends up being the final solution. But I figured I would at least raise the issue to gather thoughts about how PLAYWRIGHT_BROWSERS_PATH
is supposed to behave and if it is reasonable for that to affect the download location as well.
Sounds like an easy fix, I can see
const zipPath = path.join(os.tmpdir(), downloadFileName);
Version
1.44
Steps to reproduce
I'm using Azure DevOps Server with self-hosted agents (Windows). I am running many pipelines throughout the night and part of that is running Playwright tests (.NET and MSTest).
Each agent installs the browsers to an agent-specific directory using the
PLAYWRIGHT_BROWSERS_PATH
environment variable. This way each agent has its own copy of the browsers and everything is nicely isolated.The issue is that while the browsers are eventually installed to
PLAYWRIGHT_BROWSERS_PATH
, they are downloaded toC:\Users\username\AppData\Local\Temp
. While I have multiple agents, several of them are running on the same machine as the same user. This means that if agent 1 and agent 2 are running at roughly the same time, they will both try to download the browsers to the same location and will end up clobbering each other.Expected behavior
The
PLAYWRIGHT_BROWSERS_PATH
keeps the browsers completely isolated, including the download.Actual behavior
The agent will begin to download the browsers but it won't be long before you see this error.
Additional context
No response
Environment