Repository navigation
Private Marketplace extension blocking: add workbench UX and update gating - #341049
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Latest-only gallery queries can still return a blocked version instead of retrying for an older permitted version.
1 open finding
What changed in this PR
Adds end-to-end handling of Marketplace-blocked extensions across extension management and the workbench.
Changes:
- Parses blocking metadata and gates version selection and installation.
- Surfaces blocked status and disables updates, installation, and chat search exposure.
- Adds focused platform and workbench tests.
| File | Description |
|---|---|
abstractExtensionManagementService.ts |
Rejects blocked installations. |
extensionGalleryService.ts |
Parses blocking metadata and filters versions. |
extensionManagement.ts |
Defines blocking contracts. |
extensionManagementUtil.ts |
Provides origin-aware messages. |
extensionGalleryService.test.ts |
Tests parsing and version filtering. |
extensionManagement.test.ts |
Tests messages and install enforcement. |
extensionsSync.ts |
Handles blocked sync installations. |
extensions.ts |
Exposes blocking metadata to workbench models. |
extensionsWorkbenchService.ts |
Refreshes metadata and gates updates/installations. |
extensionsActions.ts |
Updates actions and status messaging. |
searchExtensionsTool.ts |
Excludes blocked extensions. |
extensionsWorkbenchService.test.ts |
Tests refresh and gating behavior. |
extensionsActions.test.ts |
Tests toggle and status behavior. |
searchExtensionsTool.test.ts |
Tests search filtering. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
8ab6ba4 to
76998d9
Compare
|
Resolved the current \main\ conflict and pushed \215d2fe7134\ on top of the clean restack. The resolution preserves both upstream's polling/install-inventory coverage and the extension-blocking tests.\n\nThe post-merge review also found and fixed two version-level blocking edge cases:\n- display fallback now selects the first unblocked version rather than dropping an extension when only the newest fallback candidate is blocked;\n- installed extensions retain the exact installed version's blocking metadata when the gallery selects an older permitted version, so status, update gating, and search safeguards remain active.\n\nValidated with 409 affected tests passing, targeted ESLint, |
d4b4c5e to
edbe224
Compare
|
Final restack/status correction:
The fresh run completed all 32 executable checks successfully, including Compile & Hygiene. The PR is mergeable, there are no unresolved review threads, and the remaining VS Code PR Check is waiting only for the required collaborator approvals (0/3), not code or CI remediation. Local validation remains: 409 affected tests, targeted ESLint, 🤖 This update was authored by GitHub Copilot CLI on behalf of Michael Cummings (MSFT) (@mcumming). |
|
Karthik Nadig (@karthiknadig) this is ready for your review |
Karthik Nadig (karthiknadig)
left a comment
There was a problem hiding this comment.
Thanks for splitting this out. The simpler gates look good: auto-update, the toggle, the context key, the chat search filter, and the status that depends on install state.
Requesting changes for two issues in syncInstalledExtensionsWithGallery (details inline):
- The installed version's block is copied onto a different gallery version. If the installed version is blocked but a newer version is permitted, the permitted update gets marked blocked. Auto-update, the Update button and install are then all disabled, so the user is stuck on the blocked version.
- Search now waits on the sync, plus a new request.
queryGallery,getPageandgetExtensionsnow await work that used to run in the background. That includes a new exact-version lookup for every outdated installed extension, on any marketplace.
Smaller items, also inline:
- The new request has no error handling.
- The wording is wrong when the installed version is the blocked one.
- There's no test for the case in (1).
Review assisted by Copilot.
|
The workbench PR has been cleanly restacked on the updated #333859 head and is conflict-free. It preserves the exact installed version's blocking metadata when gallery selection falls back to an older permitted version, so installed status, update gating, and search safeguards remain active. The workbench service suite, targeted ESLint, and client type-check pass locally, and all GitHub Actions checks are green. There are no unresolved review threads; only the shared external VS Code PR Check remains pending. Karthik Nadig (@karthiknadig), this PR is ready for review after its platform dependency. 🤖 This reply was authored by GitHub Copilot CLI on behalf of Michael Cummings (MSFT) (@mcumming). |
|
Karthik Nadig (@karthiknadig) this is ready for your review |
Karthik Nadig (karthiknadig)
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround. Everything from my last review is addressed: target and installed blocking are separate, search no longer waits on the sync, the exact-version lookup only runs on private update checks and handles errors, the installed-version wording is in, and the reverse-case test is there.
A few new issues, mostly from the follow-ups (details inline):
- A whole-extension block still counts as outdated, so the update badge can't be cleared and Update All tries to install it.
- A known installed-version block is cleared when the exact-version lookup doesn't return that version.
fromGallerynow replaces the installed extension's gallery object, which skips the per-server platform check and the change event.- The
getExtensionStatechange isn't related to blocking. Can it be split out?
Review assisted by Copilot.
|
Karthik Nadig (@karthiknadig) this is ready for your review again |
|
Maria Ghiondea (@mariaghiondea) I don't see fixes since my last review? just a merge from main into the PR. |
|
Michael Cummings (MSFT) (@mcumming) you re-requested the review yesterday. Can you please check? Have the comments been addressed? |
|
Yep, missed the new review, addressed the comments. |
|
Karthik Nadig (@karthiknadig) now it's ready for your review. Thank you |
|
Karthik Nadig (@karthiknadig) this is ready for your review 🙏 |
Karthik Nadig (karthiknadig)
left a comment
There was a problem hiding this comment.
Thanks for the quick follow-up. All four of my Oct 21 items are fixed and covered by tests: blocked targets no longer count as outdated, a missing lookup result keeps a known block, fromGallery copies only the blocking state and fires a change, and the getExtensionState change is gone.
Requesting changes for one issue introduced by the latest commit, plus one older one (inline):
-
Blocked extensions can still be installed through two paths. A whole-extension block now leaves
extension.galleryas the last unblocked object whileextension.blockingInforeports the block. Two install paths don't callcanInstalland pass that stale object to the platform:- Install in Remote/Local →
installInServer - Switch to Pre-Release/Release →
togglePreRelease(the action only checks the allow list)
The platform only checks
blockingInfoon the object it receives, and doesn't re-check the versiongetCompatibleVersionpicks. So nothing on the client stops the install; it only fails if the marketplace also refuses the download. Please reject whenextension.blockingInfois set in_installandinstallInServer, disable both actions, and ideally re-checkcompatibleExtension.blockingInfoincheckAndGetCompatibleVersion. - Install in Remote/Local →
-
The installed-version lookup only runs for
privateextensions.
Also, the Oct 15 merge (3a09f839b5) dropped the getCompatibleExtension shortcut for whole-extension blocks and its test; the description still lists both.
Review assisted by Copilot.
Co-authored-by: Copilot App <[email protected]> Copilot-Session: e4f76261-7b46-409e-91cd-b7bede8c7392
5f8ecd6 to
3a119ac
Compare
|
Karthik Nadig (@karthiknadig) ready for your review again |
Karthik Nadig (karthiknadig)
left a comment
There was a problem hiding this comment.
Thanks, this addresses everything from my last review:
_installandinstallInServerreject blocked extensions, and Install in Remote/Local and the pre-release toggle are disabled for them.- The platform re-checks the selected version's
blockingInfobefore resolving the manifest. - The installed-version lookup is gated on a configured Private Marketplace instead of
private. - The
getCompatibleExtensionshortcut and its test are back.
LGTM.
Review assisted by Copilot.

Summary
blockingInfo) separate from the currently installed version's blocking metadata (installedBlockingInfo)Relationship
Follow-up to #333859, which has merged. This PR is now based on
main.Validation
npm run build-fast -- --client-only— passed.\scripts\test.bat --reporter dot --run src/vs/platform/extensionManagement/test/common/extensionGalleryService.test.ts --run src/vs/platform/extensionManagement/test/common/extensionManagement.test.ts --run src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts --run src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts— 426 tests passednpm run eslint -- src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts src/vs/platform/extensionManagement/common/extensionGalleryService.ts src/vs/platform/extensionManagement/test/common/extensionGalleryService.test.ts src/vs/platform/extensionManagement/test/common/extensionManagement.test.ts src/vs/workbench/contrib/extensions/browser/extensionsActions.ts src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts— passednpm run typecheck-client— passednpm run valid-layers-check— passed🤖 This pull request description was authored by GitHub Copilot CLI on behalf of Michael Cummings (MSFT) (@mcumming).