Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Cache Playwright browser dependencies #826

Open
Rarst opened this issue Jul 27, 2022 · 3 comments
Open

Cache Playwright browser dependencies #826

Rarst opened this issue Jul 27, 2022 · 3 comments
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@Rarst
Copy link

Rarst commented Jul 27, 2022

Is your feature request related to a problem? Please describe.

The build image doesn't seem to come with browser binaries, which could be used by Playwright for testing.

They need to be explicitly installed, however their target location .cache/ms-playwright is not cached by Netlify and the dependencies are re-downloaded in every build.

Describe the solution you'd like

Playwright dependencies to be cached by default.

Describe alternatives you've considered

I've tried third party netlify-plugin-cache to cache it, but according to support Netlify has plugin issues with current Node 18 version.

Additional context

8:05:26 PM: > npx playwright install chromium
8:05:27 PM: Downloading Chromium 104.0.5112.20 (playwright build v1012)...
8:05:29 PM: |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 132.8 Mb
8:05:32 PM: Chromium 104.0.5112.20 (playwright build v1012) downloaded to /opt/buildhome/.cache/ms-playwright/chromium-1012
8:05:32 PM: Downloading FFMPEG playwright build v1007...
8:05:33 PM: |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.6 Mb
8:05:33 PM: FFMPEG playwright build v1007 downloaded to /opt/buildhome/.cache/ms-playwright/ffmpeg-1007

Can you submit a pull request?

No, fuzzy on nixes scripting, sorry. :)

@Rarst Rarst added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jul 27, 2022
@lukasholzer
Copy link
Contributor

lukasholzer commented Jan 9, 2023

@Rarst can you provide some details about the .cache location where is this directory located?

Furthermore node 18 support for plugins should be now available ;)

@Rarst
Copy link
Author

Rarst commented Jan 9, 2023

.cache location where is this directory located?

Log above says /opt/buildhome/.cache/ms-playwright/chromium-1012, looks like right in the build root.

Furthermore node 18 support for plugins should be now available ;)

Does this mean existing plugin should no longer have issues running on node 18, or the plugin's author would need to update it for it?

@lukasholzer
Copy link
Contributor

Does this mean existing plugin should no longer have issues running on node 18, or the plugin's author would need to update it for it?

Previously we had issues in the IPC communication between the build and the plugin. Now those are resolved and you can run the plugins with node18 (Generally speaking there should not be anything to "add support" from the plugin side except if the engine property was set to not include node 18)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

2 participants