Skip to content

devops: balance playwright shards - #13064

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
aslushnikov:shard-balancing
Oct 21, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
aslushnikov:shard-balancing

Conversation

@aslushnikov

Copy link
Copy Markdown
Contributor

I was looking at your repo and noticed that your shards are unbalanced, so here's a shard balancing PR.

This patch uses Flakiness.io Playwright shard balancing to evenly distribute tests across shards.
The timings.json file could be either fetched from Flakiness.io or built from your local runs.

We wrote about shard balancing awhile ago: https://blog.flakiness.io/posts/2026/playwright-test-shard-balancing/

I hope this would be useful!

This patch uses Flakiness.io Playwright shard balancing to evenly
distribute tests across shards.
@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 7d0f513
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6ad8fc3c9dc1ae91b05059fc
😎 Deploy Preview https://deploy-preview-13064--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 4 from production)
Accessibility: 82 (no change from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@matmair

matmair commented Oct 21, 2026

Copy link
Copy Markdown
Member

We have forks running in GHES with restricted network access; does this mean the ci job needs access to flakiness to run?
How does this behave if we add tests, which we do often?

@aslushnikov

Copy link
Copy Markdown
Contributor Author

We have forks running in GHES with restricted network access; does this mean the ci job needs access to flakiness to run?

@matmair no, shard allocation relies solely on timings.json which is part of the PR; no need for Flakiness.io service or anything like that.

How does this behave if we add tests, which we do often?

The timings.json goes stale softly: new tests fall back to a default weight, and entries for deleted tests are ignored. The more information timings.json has for your tests, the better shard allocation is.

  • In the best case, timings.json has a duration for each test, and you end up with a perfect shard allocation
  • In the worst case, timings.json has no entries, and you end up with a count-based shard allocation, like the one Playwright does by default.

@matmair matmair added this to the 1.7.0 milestone Oct 21, 2026
@matmair matmair added the CI CI / unit testing ecosystem label Oct 21, 2026
@matmair

matmair commented Oct 21, 2026

Copy link
Copy Markdown
Member

Looks reasonable, thanks @aslushnikov

@SchrodingersGat
SchrodingersGat merged commit 113cc83 into inventree:master Oct 21, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI / unit testing ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants