Skip to content

Patch @vscode/test-electron 2.5.2 so a dropped VS Code download retries - #2328

Merged
anton-107 merged 1 commit into
mainfrom
anton/patch-test-electron-download-crash
Nov 17, 2026
Merged

anton-107 merged 1 commit into
mainfrom
anton/patch-test-electron-download-crash

Conversation

@anton-107

Copy link
Copy Markdown
Contributor

Changes

The vscode-isolated-nightly run on 2026-11-17 (run) failed in one Linux e2e job. A connection reset (ECONNRESET) while downloading VS Code crashed the run instead of retrying:

✖ Error downloading, retrying (attempt 1 of 3): aborted
node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
Error: aborted ... code: 'ECONNRESET'

wdio-vscode-service@8 depends on @vscode/test-electron@^2.4.1, which resolves to 2.5.2. In 2.5.2, unzipVSCode() starts a validateStream checksum promise and never handles its rejection when the file write fails first. On Node 22 the unhandled rejection kills the process, so the built-in retry never runs for errors that happen mid-download. Upstream added the missing handler (checksum.catch(() => {})) in microsoft/vscode-test#340, but it shipped only in 3.0.0. No 2.x release has it.

This PR backports that one line as a yarn patch:

  • Adds .yarn/patches/@vscode-test-electron-npm-2.5.2-7b7f19ec88.patch, which adds checksum.catch(() => { }); to out/download.js.
  • Adds a resolutions entry that points @vscode/test-electron@^2.4.1 at the patched 2.5.2, in the same style as the existing @databricks/sdk-experimental patch.
  • Updates yarn.lock. The repo's direct @vscode/test-electron@^3.1.0 dependency is unchanged.

Forcing the 2.x copy up to 3.x would also work, but nobody has checked that wdio-vscode-service@8 works with the 3.x API, so this patch is the lower-risk option.

Tests

  • yarn install --immutable (yarn 3.2.1, Node 22) passes the resolution step locally, so the lockfile matches package.json. The fetch step couldn't run on my devbox because it has no access to the public registry, so CI's install is the full check.
  • The e2e suite hasn't been run against this change yet.
  • Companion change in eng-dev-ecosystem that downloads VS Code once per OS, so the nightly is less likely to hit this path: databricks-eng/eng-dev-ecosystem PR 1610 (internal).

This pull request and its description were written by Isaac.

wdio-vscode-service@8 pulls in @vscode/test-electron@^2.4.1 (2.5.2). Its
unzipVSCode() leaves the stream-checksum promise unawaited when the write
fails first, so a mid-download ECONNRESET becomes an unhandled rejection
that kills the e2e run before the built-in retry runs. Backport the
upstream fix (microsoft/vscode-test#340), which only shipped in 3.x.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2328
  • Commit SHA: cc94ac30448a2e961cbb6303f05c5faa4d5a99ea

Checks will be approved automatically on success.

@anton-107
anton-107 deployed to test-trigger-is November 17, 2026 13:36 — with GitHub Actions Active
@anton-107
anton-107 deployed to test-trigger-is November 17, 2026 13:37 — with GitHub Actions Active
@rugpanov

rugpanov commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Integration tests ✅ passed for cc94ac30.
View run

@anton-107

Copy link
Copy Markdown
Contributor Author

@louis-johnston-db @rclarey could one of you review this? It's a one-line yarn patch (backport of microsoft/vscode-test#340) that keeps a dropped VS Code download from crashing the e2e run before its retry. CI and integration tests pass on cc94ac3.

@anton-107
anton-107 merged commit eb5bebe into main Nov 17, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
test-trigger-is — cc94ac30 Deployed Nov 17, 2026 by anton-107 via Trigger Tests #2567
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