Repository navigation
Fix remote extension init: await installs and match the synced extension - #340771
Minho Yoo (irontaek) wants to merge 2 commits into
Conversation
- RemoteExtensionsInitializerContribution passed Promise.allSettled a map callback with a block body and no return, so it settled immediately instead of waiting for installInServer. - RemoteExtensionsInitializer looked up the synced extension with remoteExtensions.find(e => areSameExtensions(e.identifier, e.identifier)). The callback parameter shadows the gallery extension e, so it compared each entry with itself and always took the first synced extension's preRelease flag. Claude-Session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq
There was a problem hiding this comment.
🟢 Approval recommended
Both focused changes correctly address the identified promise and extension-matching defects.
0 open findings
What changed in this PR
Fixes two remote-extension initialization bugs.
Changes:
- Awaits remote extension installation promises.
- Matches each gallery extension to its corresponding synced extension.
| File | Description |
|---|---|
src/vs/workbench/contrib/extensions/electron-browser/remoteExtensionsInit.ts |
Fixes install synchronization and pre-release selection. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks for the contribution. The changes look plausible from code inspection, but it is difficult for us to take this change without a concrete user-facing bug or reproduction and validation of the fix. This touches remote extension initialization and installation behavior, where a seemingly small change can cause regressions, and the PR has not been tested in a remote setup. Could you please provide a concrete scenario demonstrating the current failure and expected behavior, and add a focused regression test or document manual remote validation covering both changes? |
|
@microsoft-github-policy-service agree |
|
Sandeep Somavarapu (@sandy081) thanks for the review, and sorry for not replying here earlier. I pushed 4d104f4 and updated the description on Oct 24 but didn't follow up in the thread. Concrete scenario (pre-release choice): A user syncs two workspace extensions, one installed as pre-release and one as stable, then opens a fresh remote. Regression coverage: What I have not done: I have not validated this end to end on an SSH, container or tunnel remote, and the description says so. The other change, returning the |
Remote extension initialization can apply the first synced extension’s pre-release choice to every extension being installed. This PR matches each gallery extension to its own synced entry. It also returns the installation promises in
InstallRemoteExtensionsContributionsoPromise.allSettledwaits for them.Changes and reproduction
preReleasevalues. Before this change, both installations receive the first synced entry’s flag. Afterward, each receives its own flag. Regression tests cover both flag orders and reversed gallery result order.remote.defaultExtensionsIfInstalledLocallyto a locally installed extension that is absent remotely and keep itsinstallInServerpromise pending. Previously,installExtensionsIfInstalledLocallyInRemoteresolved before the installation settled. It now waits. The constructor does not await this method, so this is not evidence that the change fixes a user-visible startup race.Validation
Added
remoteExtensionsInit.test.ts, exercising the actual contribution and initializer with stubbed remote services. The initializer is exported for these tests.On macOS arm64, with only the two original fixes reverted, all three new tests fail. With the fixes restored, all three pass (four total including the runner’s clean-state check). Targeted ESLint passes.
This is service-boundary regression coverage, not SSH/container end-to-end validation. Normal dependency installation failed in
node-gypbecause of the local Xcode toolchain; dependencies were installed with scripts disabled. The Electron runner emitted a missingvscode_fs.nodewarning in both runs. An isolated type check reports dependencyTimeout/TimeoutHandleconflicts, so a clean full build/type check is not claimed.No linked issue; the changes were found while reading the file.
Original implementation session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq