Conversation
Bump the infrastructure jest job from --maxWorkers=2 to --maxWorkers=100%. On the 4-vCPU ubuntu-24.04 runner the old cap left half the cores idle (jest's own default there is 3 workers). With the backend suite now parallel (#1111), the infra job is the PR long pole at ~6m30s; ts-jest + CDK synth is CPU-bound so it parallelizes well. 16 GB RAM comfortably fits 4 workers.
Contributor
Author
|
Closing: measured regression — infra jest went 392s (--maxWorkers=2) to 977s (--maxWorkers=100%), 2.5x slower. ts-jest re-runs type-checking per worker with no shared cache and CDK synth is memory-heavy, so extra workers thrash. Correct fix is a cheaper per-worker transform (transpile-only) plus a single shared tsc gate, not more workers. |
DerrickF
added a commit
that referenced
this pull request
Sep 15, 2026
Make ts-jest transpile-only (isolatedModules) so jest workers stop re-type-checking the whole project each — the dominant cost of the infra suite (the long pole once backend went parallel in #1111). Add a single 'tsc --noEmit' (npm run build) step to the infra CI job so type safety is preserved on PRs (previously only ts-jest enforced it; tsc ran only in teardown.yml). Workers stay at 2 (the --maxWorkers bump regressed 2.5x in #1112). No const enum in the tree, so isolatedModules is safe. Verified: tsc clean; 178 tests green transpile-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumps the infrastructure jest job from
--maxWorkers=2to--maxWorkers=100%. With the backend suite parallelized in #1111, the infra job became the PR long pole (~6m30s). The old cap left half the runner's cores idle — jest's own default on a 4-vCPU box is 3 workers, so 2 was below default.Why it's safe
Measurement
Baseline infra job: ~6m32s (
--maxWorkers=2). Target: this PR's ownTest infrastructure (jest)run — comparing the two is the proof.Follows #1111 (backend pytest xdist: ~572s → 318s).