Skip to content

Conversation

@marionebl
Copy link
Contributor

Summary

Sharding breaks execution by producing groups of length 0.

This was caused b naively using Math.ceil to determine the uniform shard size; this affects cases where both n % Math.ceil(n / s) === 0 and n % s !== 0 are true (n is number of tests, s is chosen shard count).

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

can you add a changelog entry?

also, ESLint with type info is unhappy 🙂 run yarn lint-ts-files locally to see

@SimenB SimenB changed the title fix: distribute rest files over shards #13027 fix: distribute rest files over shards Oct 20, 2022
@SimenB SimenB merged commit 571c940 into jestjs:main Oct 20, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: default jest config will sometimes result in shards with 0 tests

3 participants