Skip to content

[code-infra] Fix playwright hash#43880

Closed
Janpot wants to merge 6 commits intomui:masterfrom
Janpot:playwright-hash
Closed

[code-infra] Fix playwright hash#43880
Janpot wants to merge 6 commits intomui:masterfrom
Janpot:playwright-hash

Conversation

@Janpot
Copy link
Member

@Janpot Janpot commented Sep 25, 2024

The cache key calculation is executed before packages are installed, and this always results in an empty file.
The --filter parameter is for filtering workspace packages this command operates on, not to filter listed packages. This command always returns an empty string. The cache key never changes. Thus we're always both downloading an old cache and re-installing playwright browsers.

I'm moving the cache handling steps after the install step and I'm changing the command to filter on installed packages only. It's the positional argument in pnpm list. I'm also removing --json as it's unnecessary and adding -r because playwright is not installed at the top level. It's not the most ideal (*) output but probably closest to what we want that is doable with a simple pnpm command.

I noticed restoring the cache takes as exactly long as running playwright install.

Current situation:
Screenshot 2024-09-25 at 11 23 05

After the changes, we see the following numbers:

  • Storing the cache takes about ~45s.
  • Restoring the cache takes about ~22s
  • Installing from cached takes about ~6s
  • Installing from fresh takes about ~18s

In Circleci

In both cases this increases the CI time. I propose to remove the cache altogether. cc @mui/code-infra for your thoughts Superseded by #43881.

Also removing a dead CircleCi link


(*) technically this output will invalidate a bit more often than strictly necessary, but we can probably live with it, no need to add extra complexity.

@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Sep 25, 2024
@mui-bot
Copy link

mui-bot commented Sep 25, 2024

Netlify deploy preview

https://deploy-preview-43880--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against d160d3b

@Janpot Janpot added scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). and removed scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Sep 25, 2024
@Janpot Janpot changed the title Fix playwright hash [code-infra] Fix playwright hash Sep 25, 2024
@Janpot
Copy link
Member Author

Janpot commented Sep 25, 2024

Superseded by #43880

@Janpot Janpot closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants