Limit root Jest parallelism to reduce memory pressure#1458
Limit root Jest parallelism to reduce memory pressure#1458kelvinkipruto wants to merge 2 commits intomainfrom
Conversation
|
We have |
@kilemensi I tried running jest across all the apps in my machine, and it consumed 40GB of RAM, freezing it. |
I'm aware of that problem and that's why I created a very detailed fix @kelvinkipruto . I'm going through the |
|
I assume you've had time to test |
Motivation
pnpm jest -- -u .) fans out many package-level test tasks and each task can spawn multiple Jest workers, producing multiplicative parallelism and very high memory usage; the root script should cap concurrency to avoid this.Description
jestscript inpackage.jsonto runturbo run jest --concurrency=2 -- --maxWorkers=50%, keepingjest:ciandjest:debugbehaviors unchanged.Testing
pnpm jest -- --helpto verify argument wiring through Turbo/Jest; the invocation reached package tasks but the execution failed in this environment due to Corepack network fetch errors (ENETUNREACH), not due to the script change, so argument forwarding was observed but full test execution could not complete.Codex Task