Repository navigation
feat(sharding): respect --fully-parallel when sharding - #64
Conversation
This patch updates sharding behavior so that it follows Playwright's sharding behavior more closely. Specifically: - by default, we use files as a sharding unit - to use per-test sharding, the `fullyParallel` mode should be enabled either per project or per test suite With these changes, the `flakiness-playwright-shard` binary should be an easy drop-in replacement for the native Playwright sharding.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f69e88682
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const testEntryId = createTestEntryId(testCase, config.rootDir); | ||
| const shardGroupId = outermostSerialSuite(testCase) ?? testEntryId; | ||
| const shardGroupId = computeShardSuite(testCase)?.titlePath().join(' › ') ?? testEntryId; |
There was a problem hiding this comment.
Preserve suite identity in shard keys
When fullyParallel is enabled and a file contains two distinct sequential suites with the same title path, such as two test.describe.serial('checkout', ...) blocks, this string key collapses them into one ShardGroup. The previous Suite object key kept those suites independent, so unrelated serial/default groups can no longer be balanced across shards and two equally heavy duplicate suites would all land on the same shard. Keep the Suite object as the key for suite-based groups and only use the test id for per-test groups.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ef2ba784d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This patch updates sharding behavior so that it follows Playwright's
sharding behavior more closely.
Specifically:
fullyParallelmode should be enabledeither per project or per test suite
With these changes, the
flakiness-playwright-shardbinary should be aneasy drop-in replacement for the native Playwright sharding.