Skip to content

extensions: migrate auto update setting to on/off values - #321039

Merged
Sandeep Somavarapu (sandy081) merged 3 commits into
mainfrom
agents/migrate-extension-auto-update-setting-to-on-off-9cf831df
Jun 12, 2026
Merged

Sandeep Somavarapu (sandy081) merged 3 commits into
mainfrom
agents/migrate-extension-auto-update-setting-to-on-off-9cf831df

Conversation

@sandy081

Copy link
Copy Markdown
Member

Migrates the extensions.autoUpdate setting from its boolean/enum values to simple on/off string values, and adds a new configurable auto-update delay.

extensions.autoUpdate value migration

  • on replaces the previous onlyEnabledExtensions behavior. The retired true (All Extensions) and insiders-only delayed values also migrate to on.
  • off replaces false. The internal onlySelectedExtensions value also migrates to off (off-mode still honors per-extension opt-ins, preserving that behavior).

A migrateFn handles all legacy stored values, and getAutoUpdateValue() now returns only 'on' | 'off'.

New extensions.autoUpdateDelay setting

  • Controls the delay (in hours) after an extension update is published before it's automatically installed.
  • Default: 2 hours, replacing the previously hardcoded DELAYED_AUTO_UPDATE_PERIOD constant.
  • Only applies when extensions.autoUpdate is on.

Policy support

Both settings are now policy-enabled (ExtensionsAutoUpdate, ExtensionsAutoUpdateDelay) under the Extensions category for enterprise management.

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]>
Copilot AI review requested due to automatic review settings June 11, 2026 22:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.autoUpdate values 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 Extensions policy 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.autoUpdate enumDescriptions.
		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.autoUpdate enumDescriptions.
		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]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 05fdf71 into main Jun 12, 2026
25 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the agents/migrate-extension-auto-update-setting-to-on-off-9cf831df branch June 12, 2026 12:04
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.
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants