Skip to content

ci: split the slowest Windows PR test jobs - #345835

Merged
Logan Ramos (lramos15) merged 2 commits into
mainfrom
ci/windows-job-splits
Nov 3, 2026
Merged

Logan Ramos (lramos15) merged 2 commits into
mainfrom
ci/windows-job-splits

Conversation

@lramos15

@lramos15 Logan Ramos (lramos15) commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Note

#345871 (Agent Host E2E suites in two processes) is stacked on this PR. Merge this one first.

Part of an effort to get the required PR checks under 10 minutes. In the last 5 days, a clean PR Gate run (no runner wait, node_modules cache hit) took ~11.6 min at the median, and the Windows jobs below were among the last to finish. This PR splits them so the work runs on more machines in parallel. macOS jobs are unchanged.

Changes (pr-win32-test.yml)

Before After Why
Windows / Electron (extension host tests + planned node.js integration tests, p90 ~12–17 min) Windows / Electron (node.js) + Windows / Electron (extension host) Same split as Linux, via INTEGRATION_TEST_SUITE. The node.js job is skipped when the plan selects no node.js integration tests (selected-node-integration-tests).
Windows / Browser (integration ~3 min + smoke ~3.5 min, ~9.2 min job) Windows / Browser (integration) + Windows / Browser (smoke) Both suites ran back to back.
Windows / Remote (smoke) (~6 min of smoke, ~8.9 min job) Windows / Remote (smoke, shard 1/2) + (shard 2/2) The step passes --shard when SMOKE_SHARD_TOTAL > 1.
Windows / Agent-Host-E2E (shard 1/2, 2/2) (~9.8 min job) (shard 1/3) – (shard 3/3) Still the slowest Windows job when it runs.

Smoke shard balance (test/smoke/src/shard.ts)

Many suites take much less time on the Windows runners than the shared estimates assume. For example, Data Loss takes ~125s rather than 210s, and the SDK sandbox suite ~15s rather than 55s. Shard 1 also runs WSL setup (~110s) before its suites and the WSL Kerberos proxy run (~50s) after them. On main, shard 1 did ~400s of work, versus ~195s and ~295s for the other shards.

The new win32SuiteDurations (medians of 7 runs) overrides the shared table on Windows only, and its WSL entry includes that extra work. In a simulation with the measured times, the three Electron shards get ~320–335s each (ideal 326s), and the two remote smoke shards ~180s each. Linux and macOS estimates are unchanged. No Azure pipeline uses --shard.

CI results on this PR

Workflow changes force a full test run (all unit and node.js integration tests), so these runs are slower than a typical PR. For comparison, #345836 is a full-coverage run on the old Windows layout. Its PR Gate finished at 21.1 min, with Windows / Electron alone taking 18.8 min.

Job (full-coverage run 41666158189) Duration
Electron (node.js) / (extension host) 12.3 / 5.8 min
Browser (integration) / (smoke) 6.8 / 6.1 min
Remote (smoke, shard 1/2) / (2/2) 6.7 / 5.1 min
Agent-Host-E2E (shard 1/3) / (2/3) / (3/3) 9.0 / 6.6 / 6.3 min

PR Gate finished at 14.9 min, with the full node.js integration run last. A second run (41670929142) with the Windows estimates passed too. In that run, one smoke shard landed on a slow runner (Terminal took 177s against a usual 122–154s), and two jobs waited 2.3 min for a Windows runner. Runner variance (about ±20%) and runner availability now dominate.

Cost

Adds 5 Windows jobs per run on vscode-large-runners-windows-8-core (~2.5 min of setup each). Estimated peak concurrency is about 110 of the pool's max of 200, up from 72.

Tests

Updated build/lib/test/detectChanges.test.ts and build/lib/test/agentHostTestSelection.test.ts, which pin the job names, skip conditions and step wiring.

  • cd build && node --test lib/test/detectChanges.test.ts lib/test/agentHostTestSelection.test.ts lib/test/detectMissingCaches.test.ts: 33/33 pass
  • actionlint on pr.yml and pr-win32-test.yml: clean, apart from the custom runner labels it doesn't know
  • eslint test/smoke/src/shard.ts: clean

The Windows jobs that ran two kinds of tests one after the other, or many smoke suites, were the last to finish in most pull request runs. Run them on more machines in parallel:

- Electron: node.js integration tests and extension host tests in separate jobs, as on Linux. The node.js job is skipped when the test plan selects no node.js integration test.
- Browser: integration and smoke tests in separate jobs.
- Remote (smoke): two shards.
- Agent-Host-E2E: three shards instead of two.

Rebalance the Windows Electron smoke shards: the WSL suite's estimate now counts the WSL setup and Kerberos proxy run that only shard 1 runs, and Data Loss takes about 125s on Windows instead of 210s. macOS and Linux keep their jobs and estimates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the Windows CI test-job splitting and sharding changes.

No open issues 🎉

What changed in this PR

This PR aims to shorten required PR checks by distributing slow Windows test workloads across more parallel CI jobs. macOS jobs remain unchanged.

Changes:

  • Separates Windows Electron and Browser suites, splits remote smoke tests into two shards, and expands Agent Host E2E to three shards.
  • Rebalances Windows smoke-test estimates to account for WSL overhead and measured Data Loss duration.
  • Updates workflow assertions and documentation for the new job layout and skip conditions.
File Description
test/​smoke/​src/​shard.ts Adjusts Windows smoke-test duration estimates.
src/​vs/​platform/​agentHost/​test/​node/​e2e/​README.md Documents three Windows E2E shards and separate integration jobs.
build/​lib/​test/​detectChanges.test.ts Updates expected job names, selection wiring, and skip conditions.
build/​lib/​test/​agentHostTestSelection.test.ts Updates assertions for E2E shards and integration-suite separation.
.github/​workflows/​pr.yml Clarifies the Windows node.js job’s skip behavior in comments.
.github/​workflows/​pr-win32-test.yml Splits Windows test jobs and configures additional shards.
.github/​skills/​smoke-tests/​SKILL.md Documents remote smoke shards and WSL balancing overhead.
.github/​skills/​integration-tests/​SKILL.md Updates Windows Agent Host E2E shard documentation.

Review effort: Balanced

Several suites take much less time on the Windows runners than the shared estimates, so the first run of the split jobs gave the third Windows Electron smoke shard 364s of suites and the second 230s. Measured from 7 runs, the Windows estimates balance the three shards to about 320-335s each (ideal 326s), and the two remote smoke shards to about 180s each.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lramos15
Logan Ramos (lramos15) merged commit a1c1376 into main Nov 3, 2026
59 checks passed
@lramos15
Logan Ramos (lramos15) deleted the ci/windows-job-splits branch November 3, 2026 20:45
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants