From a3c83e2d5228d96228058b81f61e5a01ac8368d4 Mon Sep 17 00:00:00 2001 From: Tajudeen Date: Sat, 3 Jan 2026 11:20:27 +0000 Subject: [PATCH 1/4] fix: add missing X11 dependencies for Linux CI and build dependencies step for macOS CI - Add libx11-dev and libx11-xcb-dev to Linux test workflow to fix native-keymap build failure - Add missing 'Install build dependencies' step to macOS test workflow to ensure build/ folder dependencies are installed before main dependencies --- .github/workflows/pr-darwin-test.yml | 17 +++++++++++++++++ .github/workflows/pr-linux-test.yml | 2 ++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/pr-darwin-test.yml b/.github/workflows/pr-darwin-test.yml index e48140b9569..6fce35247a6 100644 --- a/.github/workflows/pr-darwin-test.yml +++ b/.github/workflows/pr-darwin-test.yml @@ -45,6 +45,23 @@ jobs: if: steps.cache-node-modules.outputs.cache-hit == 'true' run: tar -xzf .build/node_modules_cache/cache.tgz + - name: Install build dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + working-directory: build + run: | + set -e + + for i in {1..5}; do # try 5 times + npm ci && break + if [ $i -eq 5 ]; then + echo "Npm install failed too many times" >&2 + exit 1 + fi + echo "Npm install failed $i, trying again..." + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/pr-linux-test.yml b/.github/workflows/pr-linux-test.yml index 1861abf3792..521a038d6d5 100644 --- a/.github/workflows/pr-linux-test.yml +++ b/.github/workflows/pr-linux-test.yml @@ -39,6 +39,8 @@ jobs: ./build/azure-pipelines/linux/apt-retry.sh sudo apt-get install -y pkg-config \ xvfb \ libgtk-3-0 \ + libx11-dev \ + libx11-xcb-dev \ libxkbfile-dev \ libkrb5-dev \ libgbm1 \ From 5b69ef6f70425a956d91e33f28d5b8f45c4d99aa Mon Sep 17 00:00:00 2001 From: Tajudeen Date: Sat, 3 Jan 2026 11:30:02 +0000 Subject: [PATCH 2/4] fix: dispose KeybindingLabel instances in clear() to prevent memory leaks The clear() method was not disposing of currentDisposables, which contained KeybindingLabel instances. When render() was called multiple times, these disposables would accumulate and cause memory leaks in tests. Now clear() properly disposes of all currentDisposables before clearing them, ensuring KeybindingLabel instances are properly cleaned up. --- src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts index e7837b745fd..95b076c49e3 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts @@ -453,6 +453,8 @@ export class EditorGroupWatermark extends Disposable { private clear(): void { clearNode(this.shortcuts); this.transientDisposables.clear(); + this.currentDisposables.forEach(label => label.dispose()); + this.currentDisposables.clear(); } override dispose(): void { From 9465675857e560f5ea90023acd3a8438babf9cfd Mon Sep 17 00:00:00 2001 From: Tajudeen Date: Sat, 3 Jan 2026 11:31:44 +0000 Subject: [PATCH 3/4] fix: configure Electron chrome-sandbox permissions for Linux CI The Electron SUID sandbox helper binary needs to be owned by root and have mode 4755 to work properly on Linux. This step configures the sandbox permissions after Electron is downloaded, matching the Azure Pipelines configuration. --- .github/workflows/pr-linux-test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pr-linux-test.yml b/.github/workflows/pr-linux-test.yml index 521a038d6d5..fdf091d2cd7 100644 --- a/.github/workflows/pr-linux-test.yml +++ b/.github/workflows/pr-linux-test.yml @@ -155,6 +155,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Configure Electron sandbox permissions + if: ${{ inputs.electron_tests }} + run: | + set -e + ELECTRON_ROOT=.build/electron + if [ -f "$ELECTRON_ROOT/chrome-sandbox" ]; then + sudo chown root "$ELECTRON_ROOT/chrome-sandbox" + sudo chmod 4755 "$ELECTRON_ROOT/chrome-sandbox" + stat "$ELECTRON_ROOT/chrome-sandbox" + else + echo "Warning: chrome-sandbox not found at $ELECTRON_ROOT/chrome-sandbox" + fi + - name: 🧪 Run unit tests (Electron) if: ${{ inputs.electron_tests }} timeout-minutes: 15 From 2a599ce6bb5593950941eed7bb70ea64ade37a90 Mon Sep 17 00:00:00 2001 From: Tajudeen Date: Sat, 3 Jan 2026 11:32:07 +0000 Subject: [PATCH 4/4] fix: configure Electron sandbox for remote integration tests Remote integration tests also use Electron and require the chrome-sandbox to be configured. Updated the condition to run the sandbox configuration step for both electron_tests and remote_tests. --- .github/workflows/pr-linux-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-linux-test.yml b/.github/workflows/pr-linux-test.yml index fdf091d2cd7..f0b593c5913 100644 --- a/.github/workflows/pr-linux-test.yml +++ b/.github/workflows/pr-linux-test.yml @@ -156,7 +156,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Configure Electron sandbox permissions - if: ${{ inputs.electron_tests }} + if: ${{ inputs.electron_tests || inputs.remote_tests }} run: | set -e ELECTRON_ROOT=.build/electron