chore: make smoketests faster via test.concurrent, no sharding, 800% workers#773
Conversation
❌ Object Smoke Tests FailedTest Results❌ Some smoke tests failed Failed Tests:
Please fix the failing tests before checking coverage. |
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
| ], | ||
| // Add display name for smoke tests to make it clearer in output | ||
| ...((runSmoketests || runBuiltPackageTest) && { displayName: 'Smoke Tests' }), | ||
| ...(runSmoketests && { maxWorkers: 50 }), |
There was a problem hiding this comment.
Suggestion: Using a fixed maxWorkers: 50 for smoke tests can oversubscribe low-core CI/local machines and trigger worker spawn/resource exhaustion failures (for example spawn EAGAIN) or severe process thrashing. Use a CPU-relative value so worker count scales with available cores. [possible bug]
Severity Level: Major ⚠️
- ⚠️ Local `yarn test:smoke` can oversubscribe low-core machines.
- ⚠️ Heavy smoke suites may thrash or intermittently fail locally.
- ⚠️ Developer smoke-test feedback loop slowed or destabilized.| ...(runSmoketests && { maxWorkers: 50 }), | |
| ...(runSmoketests && { maxWorkers: '50%' }), |
Steps of Reproduction ✅
1. On a low-core developer machine (e.g., 2 CPUs), run `yarn test:smoke` from the
repository root, which executes the script defined in `package.json:21` as `"test:smoke":
"RUN_SMOKETESTS=1 jest --verbose tests/smoketests"`.
2. The Jest CLI starts without an explicit `--maxWorkers` flag, so it loads the default
configuration from `jest.config.ts:6-9`, where `runSmoketests` is set based on
`process.env['RUN_SMOKETESTS']` at `jest.config.ts:3`.
3. Because `RUN_SMOKETESTS=1` is set by the script, `runSmoketests` is `true` and the
spread at `jest.config.ts:38` applies, forcing `maxWorkers: 50` into the Jest
configuration for this run.
4. Jest now attempts to run the smoke test suite in `tests/smoketests/**` (triggered by
the script at `package.json:21`) with up to 50 workers on a machine with far fewer cores,
causing significant oversubscription; this can manifest as heavy CPU thrashing or, on
constrained environments with low process limits, worker-spawn failures such as `spawn
EAGAIN`, degrading or breaking local smoke-test runs.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** jest.config.ts
**Line:** 38:38
**Comment:**
*Possible Bug: Using a fixed `maxWorkers: 50` for smoke tests can oversubscribe low-core CI/local machines and trigger worker spawn/resource exhaustion failures (for example `spawn EAGAIN`) or severe process thrashing. Use a CPU-relative value so worker count scales with available cores.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
CodeAnt AI finished reviewing your PR. |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI Incremental review completed. |
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
User description
Format:
feat[optional scope]: <description>Examples:
feat: add new SDK method·feat(storage): support file uploads·feat!: breaking API changeDescription
Motivation
Changes
Testing
Breaking Changes
Checklist
feat:orfeat(scope):)CodeAnt-AI Description
Speed up smoke tests by running them in parallel
What Changed
Impact
✅ Shorter smoke test runs✅ Faster CI feedback✅ Clearer failed test reporting💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.