Repository navigation
ci: run extension host tests on Windows in a merge-only job - #16619
Merged
Merged
Conversation
Adds test-ext-host-windows.yml, called from test-merge.yml and test-full-suite.yml (not the PR workflow). It runs the Electron ext-host driver through test-integration.bat; the web driver is skipped (no web build on Windows) and so is Remote (WSL remote is covered by e2e). Previously the only Windows ext-host coverage was positron-r on shard 1 of the Windows e2e job, as a soft-fail whose Slack alert referenced a renamed job and never fired. It was failing 4 tests on main. That step and the dead alert are removed. - test-integration.bat: add the Positron extension suites run by test-integration.sh, and skip colorize as the .sh does (#7349). - positron-r rootSignature test: build expectations with path.join, since faking process.platform does not change the path module. - positron-r session-dispose test: stub RSessionManager.instance. On Windows the extension host loads the extension via a c:\ path and the tests via C:\, so they get separate module instances and the test's copy is never initialized. Closes #8853
Contributor
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
The agent host E2E runner spawns npm.cmd without shell: true when prelaunch is not skipped, which Node rejects with EINVAL on Windows. Prelaunch already ran in an earlier step, and upstream's Windows CI sets VSCODE_SKIP_PRELAUNCH=1 on its test steps the same way.
- test-integration.bat: resolve TMP/TEMP to the long path, as upstream's test-remote-integration.bat and test-web-integration.bat already do. On CI TMP is C:\Users\RUNNER~1\..., and under Node 24.16+ fs.watch on an 8.3 short-name path drops every event (nodejs/node#63638), so the providerCatalog watcher test never saw its file edit. - authentication tests: remove watched temp dirs with an async fs.promises.rm retry. Windows releases a closed watcher's directory handle on a later event loop turn, so an immediate rmSync fails with ENOTEMPTY/EPERM, and rmSync's own retries block the loop. - snowflake test: build the expected path with path.join.
- test-integration.bat: pass vscode-test a lowercase-drive config path.
The extension host loads extensions through c:\ and vscode-test
required the tests through C:\, so Node loaded each module twice and
tests reading extension state (positron-code-cells contexts and
decorations) saw a never-initialized copy.
- next-edit-suggestions: exact-filename keys in nextEditSuggestions.enabled
never matched on Windows, because the basename was taken at the last
'/' only. Split on either separator; add a Windows-path test.
- positron-data-driver-duckdb: recognize DuckDB's Windows lock conflict
("File is already open in ...") so it gets the explanatory message.
- positron-data-driver-odbc: resolve unixODBC config paths with path.posix,
since the platform is injected and these are always unix paths.
- sqlite/duckdb driver tests: remove temp dirs with an async retry; the
worker process still has the database open just after disconnect, and
Windows will not delete an open file.
- positron-r session-dispose test: reword the stub's rationale.
Their test entry points globbed path.posix.join(testRoot, ...). On Windows testRoot has backslashes, which glob reads as escapes, so no files matched and both suites passed with 0 tests. Glob relative to testRoot instead. Windows now runs the same 9 CSS and 71 HTML tests as Linux.
- css/html server tests: fail when the glob matches no test files, so a pattern regression cannot pass silently with 0 tests again. - next-edit-suggestions: take the basename from document.uri.path with path.posix, like isFileExcludedFromAI in the same file, instead of splitting fileName on both separators. - test-ext-host-windows.yml: timeout 150 minutes (as in the Windows e2e workflow) so it covers the npm install retry; drop id-token: write, since no step uses OIDC.
…-tests-a096f3 # Conflicts: # .github/workflows/test-e2e-windows-run.yml
jonvanausdeln
marked this pull request as ready for review
October 14, 2026 16:06
testlabauto
approved these changes
Oct 14, 2026
lionel-
approved these changes
Oct 15, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Moves Windows extension host tests into their own merge-only workflow job, and fixes what that turned up on Windows. Fixes #8853.
Today the only Windows ext-host coverage is positron-r, run on shard 1 of the Windows e2e job (added in #8816). That step is soft-fail:
continue-on-error, alwaysexit 0. Its Slack alert intest-merge.ymlreadsneeds.e2e-windows-electron.outputs.extensions_failed, but #11014 renamed that job toe2e-windows, so the alert has never fired since. Meanwhile positron-r is failing 4 tests on Windows onmain(e.g. merge run 38429410345, shard 1: 204 passing, 4 failing).Workflow changes
test-ext-host-windows.yml, called fromtest-merge.ymlandtest-full-suite.yml(newrun_ext_host_tests_windowsinput). It is not called from the PR workflow. It runs the Electron driver viascripts\test-integration.batand fails the job when tests fail.e2e-windowsjob in the same merge run owns the save.VSCODE_SKIP_PRELAUNCH=1on the test step, as upstream's Windows CI does. Prelaunch already ran, and otherwise the agent host E2E runner callsspawnSync('npm.cmd')withoutshell: true, which Node rejects with EINVAL.test-e2e-windows-run.yml: removes the positron-r step, its log save/upload steps, and theextensions_failedoutput. Removes the deadslack-notify-win-extensionsjob fromtest-merge.yml. PRs tagged@:winno longer run positron-r ext-host tests on Windows; that coverage moves to merge.filter_jobsregex in both callers now matchesext-host-win.test-full-suite.ymlis now at the 25-input limit forworkflow_dispatch.scripts/test-integration.battest-integration.shruns, and skips colorize as the.shdoes (Test: fix MS colorize integration tests #7349). The Positron suites are skipped when--suiteis given, since they are not selectable by name.TMP/TEMPto the long path, the same line upstream already has intest-remote-integration.batandtest-web-integration.bat. On CITMPisC:\Users\RUNNER~1\..., and under Node 24.16+fs.watchon an 8.3 short-name path drops every event (Potential regression with libuv in Node 24.16.0 nodejs/node#63638; plain Node asserts in libuvfs-event.c).--configpointing at.vscode-test.jsthrough a lowercase drive letter. The extension host loads an extension throughc:\, while vscode-test required the test files throughC:\. Node keys its module cache by path, so a test importing extension modules got a second, never-initialized copy (confirmed with a probe: bothrequire.cachekeys present while the extension was active). This is what broke positron-code-cells' context and decoration tests and positron-r'sRSessionManager.Product bugs found (Windows only)
nextEditSuggestions.enabled(e.g."Dockerfile": false) never matched on Windows, because the basename was taken fromdocument.fileNameat the last/only. It now comes frompath.posix.basename(document.uri.path), asisFileExcludedFromAIin the same file already does, with a Windows-path test so Linux CI covers it.... File is already open in <process> (PID n)), so users got the raw error instead of the "another session has it locked" explanation. The pattern now also matches DuckDB's ownFile is already open intext (the OS part of the message is localized).Test fixes
rootSignaturebuilds expectations withpath.join(fakingprocess.platformdoes not changepath);session-disposestubsRSessionManager.instanceinstead of depending on activation order, which also keeps its fake sessions out of the live manager.snowflakepath expectation usespath.join. Tests that start the provider catalog watcher remove their temp dir with an asyncfs.promises.rmretry: Windows releases a closed watcher's directory handle on a later event loop turn, andrmSync's own retries block the loop.resolveUnixConfigPathsusespath.posix. The module takes the platform from an injected host and already usespath.posix/path.win32explicitly elsewhere; this was the one spot using the hostpath. No change on Unix.path.posix.join(testRoot, ...); on WindowstestRoothas backslashes, which glob reads as escapes, so both suites ran 0 tests and passed. Now glob relative totestRoot, and fail if no test files match. Windows runs the same 9 CSS / 71 HTML tests as Linux. Upstream has the same code.disconnect()kills the worker process without waiting for it to exit, so the database file is briefly still open, and Windows will not delete an open file. (Makingdisconnect()await worker exit would be the product-side fix; left out of scope here.)Unrelated
configureSnippets.ts: one-line indent fix from the formatter. The file is unformatted onmainsince fix: snippet picker matching after upstream label/description swap #16607, and the pre-commit hook blocked the merge commit that synced this branch withmain.Release Notes
New Features
Bug Fixes
nextEditSuggestions.enablednow apply on Windows.Validation Steps
.batnow runs them: 12 pass. positron-r's R-session tests could not start an R kernel from this machine's agent-launched shell (a known local environment issue with Ark's ZeroMQ poller);main's Windows e2e job shows those tests starting R sessions fine on the CI runner.run_ext_host_tests_windows:npm.cmdEINVAL.authentication.05908324ee, now including 9 CSS / 71 HTML server tests. Review follow-ups after it (7dcca78d53: empty-glob guard, NES basename, job timeout 150, noid-token) were verified locally.7dcca78d53(the PR head). All 33 sections oftest-integration.batran with no failures; the job took about 1 hour.