Skip to content

devops: balance Playwright shards by duration#79479

Draft
aslushnikov wants to merge 2 commits into
WordPress:trunkfrom
aslushnikov:shard-balancing
Draft

devops: balance Playwright shards by duration#79479
aslushnikov wants to merge 2 commits into
WordPress:trunkfrom
aslushnikov:shard-balancing

Conversation

@aslushnikov

@aslushnikov aslushnikov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Right now, one of the shards takes ~25 minutes to complete, whereas
others take 10-15 minutes.

https://github.com/WordPress/gutenberg/actions/runs/28085764857?attempt=1&check_suite_focus=true

This patch will shard tests by their historic duration, which should
even out shards.

Balanced sharding documentation: https://github.com/flakiness/playwright#balanced-sharding

Right now, one of the shards takes ~25 minutes to complete, whereas
others take 10-15 minutes.

https://github.com/WordPress/gutenberg/actions/runs/28085764857?attempt=1&check_suite_focus=true

This patch will shard tests by their historic duration, which should
even out shards.
@aslushnikov aslushnikov requested a review from desrosj as a code owner June 24, 2026 09:05
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aslushnikov <aslushnikov@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@aslushnikov

Copy link
Copy Markdown
Contributor Author

@Mamaduka The shard balancing algorithm works very well on our tests, and I'm eager to see how it'll perform for your suite.

Could you please take a look?

@Mamaduka Mamaduka added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jun 24, 2026
@Mamaduka Mamaduka self-requested a review June 24, 2026 09:15
@aslushnikov

aslushnikov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Oops, for the prs-from-forks, we can't authorize at the flakiness.io service to fetch historical durations. As a result, all bots fail.

That's a bummer! We'll discuss how to accomodate this usecase with the team.

@Mamaduka I've converted this to draft while we're figuring this out.

@aslushnikov aslushnikov marked this pull request as draft June 24, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants