Skip to content

CI: parallelize the typescript-validation job#35346

Draft
valentinpalkovic wants to merge 1 commit into
valentin/build-linux-orchestrationfrom
valentin/ci-parallel-typecheck
Draft

CI: parallelize the typescript-validation job#35346
valentinpalkovic wants to merge 1 commit into
valentin/build-linux-orchestrationfrom
valentin/ci-parallel-typecheck

Conversation

@valentinpalkovic

@valentinpalkovic valentinpalkovic commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #35343, attacking the downstream job graph. This PR takes the serial typecheck job.

What

scripts/tasks/check.ts looped ~44 workspaces sequentially, each spawning yarn exec jiti scripts/check/check-package.ts (~0.7s shim + transform per spawn - the same overhead the compile task shed in #35343). The TypeCheck code step ran 291s on a medium+ executor while using one of its 3 vCPUs.

  • Run the per-package checks through a p-limit pool (8 wide on CI), scheduling the slowest packages (core, vue3, svelte, angular) first so they don't stretch the tail.
  • Launch check-package.ts with native node instead of yarn exec jiti (per the AGENTS.md jiti-to-node migration path). check-package.ts now computes the repo root locally because scripts/utils/constants.ts intentionally uses __dirname (it must stay loadable from CJS-transpiled contexts like the Playwright specs) and cannot load as native ESM.
  • Move the typescript-validation job from medium+ to xlarge so 8 checks actually run concurrently. Roughly cost-neutral: 364s x medium+ (15 credits/min) ≈ 91 credits vs an expected ~140s x xlarge (40 credits/min) ≈ 93 credits - while returning the cancel-on-failure signal (this job gates workflow cancellation) minutes earlier.
  • Per-package output is buffered and printed only on failure so the parallel log stays readable.

The cancelOnFailure behavior of the job is unchanged.

Baseline (workflow a65d3769-97c8-479f-aaae-39f92a2cb874, job 1697401)

Step Before After
TypeCheck code 291s 43s
TypeCheck scripts 17s 14s
Job total 364s 57s

This job is not on the workflow critical path (it ends ~10min into an 18.1min wall), so the win here is summed job-time and failure-feedback latency, not wall clock.

Verification

  • Full yarn task --task check --no-link run locally with the pool: all ~44 workspaces green, including the vue-tsc / svelte-check special cases (exit 0; any failure aggregates and throws).
  • check-package.ts smoke-tested under native node directly.
  • cd scripts && yarn check (now native node) passes.

Measured before/after tables will be updated from the CI run on this PR.

The check task looped ~44 workspaces sequentially, each spawning
'yarn exec jiti' (~0.7s shim + transform overhead per spawn, the same cost
the compile task shed in the native-node migration). The whole TypeCheck
code step ran 291s on a medium+ executor while using one of its vCPUs.

The task now runs the per-package checks through a p-limit pool and
launches check-package.ts with native node. The job executor moves to
xlarge so eight checks run concurrently; the slowest packages (core, vue3,
svelte, angular) are scheduled first so they don't stretch the tail of the
run. Per-package output is buffered and only printed on failure so the
parallel log stays readable.

check-package.ts computes the repo root locally instead of importing
scripts/utils/constants.ts, which intentionally uses __dirname (it must
stay loadable from CJS-transpiled contexts like the Playwright specs) and
therefore cannot load as native ESM. The scripts 'check' script moves from
jiti to native node for the same reason the compile launcher did.
@valentinpalkovic valentinpalkovic added build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs). labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫

PR is not labeled with one of: ["qa:needed","qa:skip","qa:success"]

🚫 PR title must be in the format of "Area: Summary", With both Area and Summary starting with a capital letter Good examples: - "Docs: Describe Canvas Doc Block" - "Svelte: Support Svelte v4" Bad examples: - "add new api docs" - "fix: Svelte 4 support" - "Vue: improve docs"
🚫 PR description is missing the mandatory "#### Manual testing" section. Please add it so that reviewers know how to manually test your changes.
Warnings
⚠️

This PR targets valentin/build-linux-orchestration. The default branch for contributions is next. Please make sure you are targeting the correct branch.

Generated by 🚫 dangerJS against 4dfe4ce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal Run our default set of CI jobs (choose this for most PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant