Skip to content
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

Fix caching and fonts in playwright.yml #212

Merged
merged 1 commit into from
Aug 20, 2023
Merged

Conversation

djahandarie
Copy link
Collaborator

When playwright is installed (i.e., not pulled from cache), the --with-deps flag causes it to pull in system dependencies as well. That makes the current caching strategy incoherent, as those dependencies will not be part of the cache as defined. Causing different behavior when pulling from cache vs installing fresh.

In particular, some of the dependencies it pulls in are fonts, which causes the output of the test to change due to the available fonts changing.

In fact, fonts are the only dependencies it pulls in, everything else is already present in the stock ubuntu image. So it seems fine to just remove --with-deps and just pull in the image. If we discover we need system deps at any point, we can use npx playwright install-deps chromium in a separate command to pull in those deps, and figure out an alternate caching strategy for them.

@github-actions
Copy link

github-actions bot commented Aug 19, 2023

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

When playwright is installed (i.e., not pulled from cache), the `--with-deps` flag causes it to pull in system dependencies as well. That makes the current caching strategy incoherent, as those dependencies will not be part of the cache as defined. Causing different behavior when pulling from cache vs installing fresh.

In particular, some of the dependencies it pulls in are fonts, which causes the output of the test to change due to the available fonts changing.

In fact, fonts are the _only_ dependencies it pulls in, everything else is already present in the stock ubuntu image. So it seems fine to just remove `--with-deps` and just pull in the image. If we discover we need system deps at any point, we can use `npx playwright install-deps chromium` in a separate command to pull in those deps, and figure out an alternate caching strategy fo rthem.
@djahandarie djahandarie added the kind/meta The issue or PR is meta label Aug 19, 2023
Copy link

@EwanFox EwanFox left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@EwanFox EwanFox left a comment

Choose a reason for hiding this comment

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

Approved!

@djahandarie djahandarie merged commit bfe6c06 into master Aug 20, 2023
5 checks passed
@djahandarie djahandarie deleted the playwright-fix-caching branch August 20, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/meta The issue or PR is meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants