Repository navigation
extensions: migrate auto update setting to on/off values - #321039
Merged
Sandeep Somavarapu (sandy081) merged 3 commits intoJun 12, 2026
Merged
Sandeep Somavarapu (sandy081) merged 3 commits into
Sandeep Somavarapu (sandy081) merged 3 commits into
Conversation
Migrate `extensions.autoUpdate` from the boolean/enum values (`true`, `onlyEnabledExtensions`, `false`) to simple `on`/`off` string values: - `on` replaces the previous `onlyEnabledExtensions` behavior (the retired `true` and insiders `delayed` values also map to `on`) - `off` replaces `false` (and the internal `onlySelectedExtensions`) Also add a new `extensions.autoUpdateDelay` setting (in hours) to control the delay before a published update is auto-installed, replacing the previously hardcoded 2 hour period. Both settings are policy-enabled for enterprise management. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Extensions workbench’s global auto-update setting (extensions.autoUpdate) from legacy boolean/enum values to a strict 'on' | 'off' model, introduces a configurable auto-update delay (extensions.autoUpdateDelay, in hours), and adds enterprise policy support for both settings. This aligns extension and plugin auto-update consumers around a single normalized setting shape and makes the previously hardcoded delay configurable.
Changes:
- Replace legacy
extensions.autoUpdatevalues with normalized'on' | 'off'handling (including configuration migration) and update call sites/tests accordingly. - Introduce
extensions.autoUpdateDelay(hours) and use it in the delayed auto-update calculation. - Add policy definitions for both settings under the
Extensionspolicy category.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts | Updates normalization test cases for legacy vs. migrated extensions.autoUpdate values. |
| src/vs/workbench/contrib/extensions/common/extensions.ts | Adds the new delay config key and narrows AutoUpdateConfigurationValue to 'on' | 'off'. |
| src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts | Normalizes auto-update behavior to 'on'/'off' and replaces hardcoded delay with the configurable delay setting. |
| src/vs/workbench/contrib/extensions/browser/extensionsActions.ts | Adjusts enablement gating logic to the new 'on' value. |
| src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts | Updates settings schema, adds extensions.autoUpdateDelay, adds policies, and registers a migration for legacy stored values. |
| src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts | Updates stubs to reflect getAutoUpdateValue(): 'on' | 'off'. |
| src/vs/workbench/contrib/chat/test/browser/plugins/pluginAutoUpdate.test.ts | Updates plugin auto-update tests to the new auto-update value shape. |
| src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts | Aligns plugin marketplace auto-update enablement check with 'off' gating. |
| src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts | Aligns plugin auto-update gating and updates docs to reference 'on'/'off'. |
Copilot's findings
Comments suppressed due to low confidence (2)
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts:762
- The global auto-update mode no longer has an “All Extensions” behavior (it’s now effectively “on = only enabled extensions”). This command title still says “for All Extensions”, which is inconsistent with the new setting semantics shown in the
extensions.autoUpdateenumDescriptions.
const enableAutoUpdateWhenCondition = ContextKeyExpr.equals(`config.${AutoUpdateConfigurationKey}`, 'off');
this.registerExtensionAction({
id: 'workbench.extensions.action.enableAutoUpdate',
title: localize2('enableAutoUpdate', 'Enable Auto Update for All Extensions'),
category: ExtensionsLocalizedLabel,
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts:779
- The global auto-update mode no longer has an “All Extensions” behavior (it’s now effectively “on = only enabled extensions”). This command title still says “for All Extensions”, which is inconsistent with the new setting semantics shown in the
extensions.autoUpdateenumDescriptions.
const disableAutoUpdateWhenCondition = ContextKeyExpr.notEquals(`config.${AutoUpdateConfigurationKey}`, 'off');
this.registerExtensionAction({
id: 'workbench.extensions.action.disableAutoUpdate',
title: localize2('disableAutoUpdate', 'Disable Auto Update for All Extensions'),
precondition: disableAutoUpdateWhenCondition,
- Files reviewed: 9/9 changed files
- Comments generated: 4
- Add required enumDescriptions to extensions.autoUpdate policy localization (string-enum policies must provide them or export-policy-data fails) - React to extensions.autoUpdateDelay config changes by rescheduling the delayed auto-update check - Update pluginAutoUpdate doc comment to reflect normalized 'on'/'off' values - Update user-facing strings/command titles to drop 'All Extensions' since 'on' now means only enabled extensions are auto-updated - Stub the delay key in tests Co-authored-by: Copilot <[email protected]>
Alexandru Dima (alexdima)
previously approved these changes
Jun 12, 2026
Co-authored-by: Copilot <[email protected]>
Ladislau Szomoru (lszomoru)
approved these changes
Jun 12, 2026
Sandeep Somavarapu (sandy081)
deleted the
agents/migrate-extension-auto-update-setting-to-on-off-9cf831df
branch
June 12, 2026 12:04
This was referenced Jun 12, 2026
2 tasks done
Brendon Smith (br3ndonland)
added a commit
to br3ndonland/dotfiles
that referenced
this pull request
Jul 12, 2026
VSCode changed the `extensions.autoUpdate` setting from a Boolean to a
string ("on"/"off") in version 1.125.0 (microsoft/vscode#321039). See
the [release notes](https://code.visualstudio.com/updates/v1_125) for
more details.
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.
Migrates the
extensions.autoUpdatesetting from its boolean/enum values to simpleon/offstring values, and adds a new configurable auto-update delay.extensions.autoUpdatevalue migrationonreplaces the previousonlyEnabledExtensionsbehavior. The retiredtrue(All Extensions) and insiders-onlydelayedvalues also migrate toon.offreplacesfalse. The internalonlySelectedExtensionsvalue also migrates tooff(off-mode still honors per-extension opt-ins, preserving that behavior).A
migrateFnhandles all legacy stored values, andgetAutoUpdateValue()now returns only'on' | 'off'.New
extensions.autoUpdateDelaysetting2hours, replacing the previously hardcodedDELAYED_AUTO_UPDATE_PERIODconstant.extensions.autoUpdateison.Policy support
Both settings are now policy-enabled (
ExtensionsAutoUpdate,ExtensionsAutoUpdateDelay) under theExtensionscategory for enterprise management.