Skip to content

Streamline update mode configuration and handling#323206

Merged
dmitrivMS merged 20 commits into
mainfrom
dev/dmitriv/update-mode-none
Jul 2, 2026
Merged

Streamline update mode configuration and handling#323206
dmitrivMS merged 20 commits into
mainfrom
dev/dmitriv/update-mode-none

Conversation

@dmitrivMS

@dmitrivMS dmitrivMS commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #289144

Enables changing update mode without restart, allowing policy updates to cancel an in-progress update.

Copilot AI review requested due to automatic review settings June 26, 2026 20:22
@dmitrivMS dmitrivMS self-assigned this Jun 26, 2026

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 fixes update.mode: "none" not reliably stopping automatic updates (notably on Windows background updates) by making update-mode changes apply at runtime and ensuring in-flight work is cancelled when updates are disabled.

Changes:

  • Refactors AbstractUpdateService to reconfigure itself on update.mode changes (enable/disable without restart) and to cancel scheduled checks when disabling.
  • Adds Windows-specific cancellation of in-flight check/download chains so disabling updates at runtime prevents reaching the background installer.
  • Updates update.mode setting/policy descriptions to remove the “Requires a restart” claim, and removes restart-on-change handling from the relauncher contribution.
  • Adds unit tests covering startup and runtime transitions for update.mode.
Show a summary per file
File Description
src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts Stops treating update.mode changes as requiring a workbench relaunch.
src/vs/platform/update/test/electron-main/abstractUpdateService.test.ts Adds tests for startup/runtime behavior of update.mode, including cancellation and permanent disablement.
src/vs/platform/update/electron-main/updateService.win32.ts Introduces a cancellation token for the check/download chain and cancels it when updates are disabled at runtime.
src/vs/platform/update/electron-main/updateService.linux.ts Prevents mid-check disablement from flipping state back out of Disabled by ignoring late results/errors.
src/vs/platform/update/electron-main/updateService.darwin.ts Switches raw autoUpdater event subscriptions to use the base Disposable store.
src/vs/platform/update/electron-main/abstractUpdateService.ts Centralizes runtime update-mode reconfiguration, scheduling, and disable/cancel logic.
src/vs/platform/update/common/update.config.contribution.ts Updates configuration/policy descriptions to reflect no-restart behavior for update.mode.

Review details

  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread src/vs/platform/update/electron-main/abstractUpdateService.ts

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.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 5
  • Review effort level: Low

Comment thread src/vs/platform/update/test/electron-main/abstractUpdateService.test.ts Outdated
Comment thread src/vs/platform/update/electron-main/abstractUpdateService.ts Outdated
Comment thread src/vs/platform/update/electron-main/abstractUpdateService.ts Outdated
Comment thread src/vs/platform/update/electron-main/updateService.linux.ts

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.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/vs/platform/update/electron-main/updateService.win32.ts

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.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Low

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.

Review details

  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread src/vs/platform/update/electron-main/abstractUpdateService.ts Outdated

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.

Review details

  • Files reviewed: 14/14 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/vs/workbench/contrib/update/browser/update.ts
Comment thread src/vs/platform/update/electron-main/updateService.win32.ts
@dmitrivMS
dmitrivMS requested a review from deepak1556 July 2, 2026 08:31
@dmitrivMS
dmitrivMS marked this pull request as ready for review July 2, 2026 08:31
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@benibenj

Matched files:

  • src/vs/workbench/browser/parts/titlebar/menubarControl.ts

@deepak1556 deepak1556 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@dmitrivMS
dmitrivMS merged commit 0e29457 into main Jul 2, 2026
29 checks passed
@dmitrivMS
dmitrivMS deleted the dev/dmitriv/update-mode-none branch July 2, 2026 18:51
@vs-code-engineering vs-code-engineering Bot added this to the 1.128.0 milestone Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting update.mode to "none" does not stop automatic updates

3 participants