-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Remove NodeJS runtime from package #1850
Comments
We consider Node.js runtime to be an implementation detail of Playwright. I'm not sure how deduping Node.js helps addressing the CI/CD challenges. We would still need Node.js on CI to run the tests.
My understanding is that we are talking about tens of milliseconds, not even hundreds. Given that the typical test run is minutes, this should be within the error.
Could you elaborate on what is getting restored?
Do I understand it right that playwright binaries are a part of the build artifacts? More information would help us understand and prioritize this request. |
Well,
There is Node.js installed on all Azure hosted build agents or github actions. Otherwise you would use a docker image with Node, or a separate step to install node as part of you pipeline. Including NodeJS as part of the package is unnecessary in wast majority of cases.
Nuget package references are being restored on each CI build. If the Microsoft.Playwright package is 200MB instead of ten, it is it slower about ten seconds. Azure Hosted agent, each pipeline run does a fresh restore, so it has to be downloaded from nuget.org each time.
Yes. If an asp.net core project references Playwright, then the node runtime is being published with the project -> this means that output (pipeline artifacts) of my CI pipeline includes now node binaries. In my case about 1GB of node binaries since I have multiple projects referencing Playwright. This slows down my CI yet another 60 seconds. In order to deploy the project, I need to download my build artifacts in CD pipeline. Yet another dozen of seconds. Did I mentioned, that my server where the app is running already has Node runtime, so all those gigabytes are unnecessary? You could make the path to node.exe configurable and make the node binaries optional. Maybe you could download node using Playwright.CLI just like browsers? |
It isn't hard for us to point to a compatible Node binary, but I don't think it is going to affect your experience. From what you are reporting, we are talking about 'up to the single digit seconds' per several minutes of the test run. |
Overall I think your request is clear, so I'm marking it as collecting feedback to collect votes. |
Until recently, there were 4x node runtimes (win32, win64, mac, linux) = cca 250MB, now there are 3 - 197MB. They are all being copied to output directory of each project, that references it directly or indirectly I have following projects that I build in CI pipeline and some of them deploy in CD pipeline:
If I publish them I get 4x .playwright folder in the publish output. Additionally I have following projects:
I don't need .playwright for running IntegrationTests, so I remove it after build. Although if I was about to test the PDF rendering, I would need it. Additionally I have following have .playwright in the output directory as well, but they run only in CI pipeline, so I don't care:
|
+1 |
In the next version only the selected platform gets included see here: #1955 We'll release it today or tomorrow. |
Perfect. Thank you @mxschmitt |
when using |
Is it just not possible to use an already installed node and not have to bundle this huge dependency with every application? Why can't |
Thanks, better than nothing, but still far from what I was hoping for :( It's like Microsoft.EntityFrameworkCore.SqlServer package included the actual SQL Server and make it 3x for each platform! Literally everybody who integrated Playwright into CD pipeline has the same complaint. |
FYI This could be relevant as its a "P3-collecting-feedback" issue. |
For now our team is working on a workaround where we're having to:
It would be nice to see this issue being resolved as it's a big blocker for adoption. |
I'm voting up on this. I actually work with a solution containing over 34 projects using Playwright. |
Feedback and votes have been collecting for nearly 2 years. I reckon that's been long enough. |
Yeah. Two years is a long time. But it took me an HOUR to find this Feature Request! Most devs seeing this waste of time/disk/IO would not look that long! :( |
It seems Playwright
It seems it can override Node.js executable path by setting Currently it can control bundled files by |
As a temporary workaround.
Note When using above custom target. Example Code
|
@filzrev what's the use of string.copy in the .props file? |
@304NotModified If there is a more simpler syntax, please let me know. |
Feature request
Please, remove NodeJS runtime from a nuget package.
NodeJs could be included in separate nuget package out of convenience. Playwright could use environment variable to determine path to node binaries.
The problem
Including a NodeJS binaries slows down a CI/CD pipeline.
It has to be restored on each build (Azure Hosted pipeline).
Given that I have multiple projects referencing playwright, I have a gigabyte of unnecessary binaries that I have to upload as build artifacts and downloads in my release pipeline. My CI produces 300GB of build artifacts per months with only two developers pushing the code.
Now imagine, that other nuget references would include NodeJS runtime as well!
It has to be removed or made optional.
The text was updated successfully, but these errors were encountered: