Skip to content

ci: run the Linux Agent Host E2E tests in their own job - #343814

Merged
Logan Ramos (lramos15) merged 1 commit into
lramos15/split-electron-unit-testsfrom
lramos15/split-electron-integration-tests
Oct 26, 2026
Merged

Logan Ramos (lramos15) merged 1 commit into
lramos15/split-electron-unit-testsfrom
lramos15/split-electron-integration-tests

Conversation

@lramos15

@lramos15 Logan Ramos (lramos15) commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The Electron / Linux job ran Agent Host E2E and then the node.js integration and extension host tests on one machine. With Agent Host E2E it took 18.3 min (p90 22.2), which could make it the last job of the run. Agent Host E2E now runs in parallel in its own job, Agent-Host-E2E / Linux, as it already does on Windows:

  • Electron / Linux runs the integration tests, about 13.6 min, when the product-tests output of Detect Changes is set.
  • Agent-Host-E2E / Linux runs Agent Host E2E, about 9.3 min, when the agent-host-e2e output is set, as the step did before. PR Gate requires it.

macOS keeps running Agent Host E2E in its Electron job: since #344146 it runs the suites only when the test plan selects them, and the job finishes before the Windows jobs. An earlier version of this PR also split the Windows integration tests into node.js and extension host jobs. Since #344146, most PRs run no node.js integration test on Windows, so that saved 0.1 min at the median and 0.4 at p90 for $0.14 more per PR, and it's gone.

Saves: median −0.5 min on top of #343813. With the rest of the stack, leaving this PR out adds 0.6 min to the median and 2.2 to p90. Linux runners are free for this repository.

Validation

  • cd build && node --test lib/test/agentHostTestSelection.test.ts lib/test/detectChanges.test.ts lib/test/detectMissingCaches.test.ts lib/testAgentHostE2EStartup.test.ts: 30 passed (updated for the Linux Agent Host E2E job).
  • npm run eslint -- build/lib/test/agentHostTestSelection.test.ts build/lib/test/detectChanges.test.ts: clean.
  • actionlint on the changed workflows: nothing new.

Part of a stack to speed up PR CI

GitHub stack #344140: #343812 → #343813 → #343814 → #343815 (#343817 is separate). Each PR shows only its own changes, and CI runs on every layer as if it targeted main.

A split only helps if it shortens the job that finishes last in typical PRs, so the stack keeps only those. Run time in minutes is from replaying measured job times (20 CI runs of the stack and 56 PR runs of main), including the waits for Windows runners, over a mix of PRs that follows the test plan since #344146: on macOS and Windows, 72% of PRs run no node.js integration test, 20% some and 8% all; Agent Host E2E runs for about 25% on Windows and 42% on Linux; and about a quarter of PRs run every unit test. Cost is at GitHub list prices: Windows 8-core $0.042/min, macOS xlarge $0.102/min, and standard Linux runners are free for this repository.

Median p90 Jobs (avg) GitHub cost / PR
main (Windows on 1ES), weekday runner waits 21.6 27.6 27 $7.38 + 1ES
main (Windows on 1ES), weekend, no waits 18.0 22.4 27 $7.38 + 1ES
#343812: Windows on larger runners 21.1 24.9 28 $11.72
+ #343813: Linux unit test split 21.1 24.9 29 $11.72
+ #343814: Linux Agent Host E2E job 20.6 24.8 30 $11.71
+ #343815: Windows smoke and Remote splits 17.7 20.4 32 $12.07

With the whole stack, the job that finishes last is usually the WSL smoke shard on Windows (about 40% of PRs), then the Linux Remote job and the macOS unit tests. #343812 on its own is no faster than main at the median, so it should merge with the rest of the stack. Leaving out any one piece makes the run slower:

Without Median p90
Windows Agent Host E2E in 2 shards (#343812) +0.2 +4.6
Linux unit test split (#343813) +0.4 +0.0
Linux Agent Host E2E job (#343814) +0.6 +2.2
Windows smoke 3rd shard (#343815) +1.0 +4.3
Windows Remote split (#343815) +1.6 +0.9

Earlier versions of the stack also split the macOS jobs, the Linux smoke and Remote tests, the browser unit tests (#343816, closed), the Windows unit tests and the Windows integration tests, and halved some test suites with --testSplit. Since #344146, macOS and Windows run few integration tests in most PRs, and none of those splits changed the median by more than 0.2 min or p90 by more than 0.5 min, so they're gone: for a PR that runs everything, that's 22 fewer jobs and about $4 less than the first version.

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.

🔵 Needs a closer look

Successful cross-platform CI execution is still needed to confirm the new job matrix, Windows batch paths, and required-check aggregation.

No open issues 🎉

What changed in this PR

This PR shortens VS Code’s pull request CI by running Electron integration suites in parallel, building on the earlier Electron unit-test split while preserving required check names.

Changes:

  • Splits integration tests into two node.js shards and one extension host job per platform, with separate Agent Host E2E jobs.
  • Adds suite-selection flags to both integration scripts and changes Electron test sharding to round-robin distribution.
  • Updates artifact names, change-detection tests, required-check wiring, and documentation.

No actionable defects were identified.

File Description
test/​unit/​electron/​renderer.js Distributes test files across shards round-robin.
src/​vs/​platform/​agentHost/​test/​node/​e2e/​README.md Documents separate E2E jobs on every platform.
scripts/​test-integration.sh Adds node-only and extension-host-only modes.
scripts/​test-integration.bat Adds equivalent Windows suite-selection modes.
build/​lib/​test/​detectChanges.test.ts Updates expected change-detection outputs.
build/​lib/​test/​agentHostTestSelection.test.ts Updates assertions for separate E2E jobs and integration inputs.
.github/​workflows/​pr.yml Adds parallel integration jobs and updates required-check aggregation.
.github/​workflows/​pr-win32-test.yml Passes suite and shard inputs with distinct artifact names.
.github/​workflows/​pr-linux-test.yml Passes suite and shard inputs with distinct artifact names.
.github/​workflows/​pr-darwin-test.yml Passes suite and shard inputs with distinct artifact names.
.github/​skills/​integration-tests/​SKILL.md Documents selection flags and the revised CI layout.

Review effort: Balanced

@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from 24b3f20 to 4d73248 Compare October 23, 2026 21:35
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from 4d73248 to d8d2290 Compare October 24, 2026 21:36
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from d8d2290 to 4f5f8d0 Compare October 25, 2026 13:17
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from 4f5f8d0 to 4ecbb6a Compare October 25, 2026 14:43
@lramos15 Logan Ramos (lramos15) changed the title ci: split the Electron integration PR checks into parallel jobs ci: run Agent Host E2E in its own Linux job and split the Windows integration tests Oct 25, 2026
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch 2 times, most recently from 3aec533 to 9d59a38 Compare October 25, 2026 18:07
@lramos15 Logan Ramos (lramos15) changed the title ci: run Agent Host E2E in its own Linux job and split the Windows integration tests ci: run the Linux Agent Host E2E tests in their own job Oct 25, 2026
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from 9d59a38 to 107e308 Compare October 25, 2026 18:32
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/split-electron-integration-tests branch from 107e308 to 37e5948 Compare October 25, 2026 23:05
The Linux Electron job ran Agent Host E2E and then the node.js integration and
extension host tests on one machine, and with Agent Host E2E it could be the
slowest job of the workflow (18.3 min). Agent Host E2E now runs in parallel in
`Linux (agent host) / Agent-Host-E2E`, as Windows already does, and the Linux
Electron job runs when the integration tests can be affected. macOS keeps
running Agent Host E2E in its Electron job, which finishes sooner than other
jobs.

Co-authored-by: Copilot <[email protected]>
@lramos15
Logan Ramos (lramos15) merged commit 5ca29b6 into main Oct 26, 2026
87 of 89 checks passed
@lramos15
Logan Ramos (lramos15) deleted the lramos15/split-electron-integration-tests branch October 26, 2026 14:29
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 26, 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