Refs: #289144
Complexity: 4
Create Issue
Create Issue
Scenarios can probably be split between different people.
Fixes #289144. Enables changing update.mode without a restart, and lets a
runtime disable (setting → none or the UpdateMode policy) cancel an
in-progress update via a transient Cancelling… state before Disabled.
What changed (context for the tester)
update.mode no longer requires a restart (the relaunch prompt was removed from relauncher).
- Switching to
none (or a disabling policy) while a check/download/pending update is in flight now:
- shows a transient Cancelling… indicator (title bar / tooltip / menu bar / activity badge), then
- lands on Disabled, tearing down in-flight work.
- Re-enabling (
none → manual / start / default) resumes update behavior without a restart.
- macOS uses the Electron/Squirrel.Mac auto-updater: states progress
Checking for Updates → Downloading → Downloaded → Ready (Restart to Update), with an
Overwriting state when a newer update replaces a pending one.
Environment / Prerequisites
- macOS machine (Apple Silicon and/or Intel; test at least one, ideally both).
- Install an older VS Code Insiders build so a real update is available when checking:
- Download an older Insiders
.zip/.app from the update server or a saved copy.
- Move
Visual Studio Code - Insiders.app to /Applications (Squirrel.Mac requires the app to be
in a writable, non-quarantined location and not running from the read-only DMG).
- Do not let it auto-update before the test starts.
- View logs: Help → Toggle Developer Tools → Console, and
Developer: Open Log File… → Main.
Look for update#setState, update#reconfigure, update#disable.
- Optional (policy scenario): configure the
UpdateMode policy via a configuration profile / MDM.
Scenario 1 — Change update mode without restart
- Launch the older Insiders build from
/Applications; confirm Update: Mode = default.
- Wait ~30s; confirm an automatic check runs and an update becomes available
(title-bar indicator, then "Downloading…", ending at Restart to Update).
- Set
Update: Mode → manual.
- ✅ No "restart required" prompt.
- ✅ Automatic background checks stop; Check for Updates… still works manually.
- Set
Update: Mode → start.
- ✅ No restart prompt; only a single startup check (verify on next launch).
- Set
Update: Mode → default.
- ✅ No restart prompt; automatic checks resume (a check runs within ~30s).
- Set
Update: Mode → none.
- ✅ No restart prompt; state → Disabled; no further checks.
- Set
Update: Mode back to default.
- ✅ Updates re-enable without restart; a check runs and the update reappears.
Scenario 2 — Disable while an update is in flight → Cancelling → Disabled
- Start from
update.mode = default on the older build.
- Trigger a check (auto or Check for Updates…). While the state is one of
Checking for Updates / Downloading / Downloaded / Ready (Restart to Update) / Overwriting:
- Set
Update: Mode → none.
- ✅ A transient "Cancelling…" indicator appears (title-bar label "Cancelling...",
tooltip "Cancelling update, please wait...", activity badge, and menu entry "Cancelling Update...").
- ✅ State then settles on Disabled
(log: update#disable - updates are disabled by user preference).
- ✅ The pending Squirrel update is not applied.
- Re-enable
update.mode = default.
- ✅ A fresh check starts; the previously-cancelled update does not silently apply.
Cancelling… is transient and may pass quickly; treat the log entries and the final
Disabled state as the reliable assertions.
Scenario 3 — Overwriting path (newer update replaces a pending one)
- With
update.mode = default, let an update reach Ready (Restart to Update).
- If a newer update is published, confirm the periodic overwrite check (~5 min) picks it up and
the state transitions through Overwriting back to Ready for the newer version.
- While in Overwriting, set
Update: Mode → none.
- ✅ Shows transient Cancelling…, then Disabled; no update is applied.
Scenario 4 — Restart to Update completes normally (regression)
- With
update.mode = default, reach Restart to Update and choose to restart.
- ✅ The app relaunches on the newer version; version is updated in Code → About.
Scenario 5 — Policy: UpdateMode (optional, requires MDM/profile)
- With the app running and an update in flight, apply a
UpdateMode policy that disables updates.
- ✅ In-flight update is cancelled (transient Cancelling…) → Disabled
(log: update#disable - updates are disabled by policy).
- ✅
Update: Mode becomes policy-controlled (not user-editable) and applies without restart.
- Relax the policy.
- ✅ Updates re-enable without restart; a check runs.
Regression checks
Refs: #289144
Complexity: 4
Create Issue
Create Issue
Scenarios can probably be split between different people.
Fixes #289144. Enables changing
update.modewithout a restart, and lets aruntime disable (setting →
noneor theUpdateModepolicy) cancel anin-progress update via a transient
Cancelling…state beforeDisabled.What changed (context for the tester)
update.modeno longer requires a restart (the relaunch prompt was removed fromrelauncher).none(or a disabling policy) while a check/download/pending update is in flight now:none→manual/start/default) resumes update behavior without a restart.Checking for Updates → Downloading → Downloaded → Ready (Restart to Update), with an
Overwriting state when a newer update replaces a pending one.
Environment / Prerequisites
.zip/.appfrom the update server or a saved copy.Visual Studio Code - Insiders.appto/Applications(Squirrel.Mac requires the app to bein a writable, non-quarantined location and not running from the read-only DMG).
Developer: Open Log File… → Main.Look for
update#setState,update#reconfigure,update#disable.UpdateModepolicy via a configuration profile / MDM.Scenario 1 — Change update mode without restart
/Applications; confirmUpdate: Mode=default.(title-bar indicator, then "Downloading…", ending at Restart to Update).
Update: Mode→manual.Update: Mode→start.Update: Mode→default.Update: Mode→none.Update: Modeback todefault.Scenario 2 — Disable while an update is in flight → Cancelling → Disabled
update.mode=defaulton the older build.Checking for Updates / Downloading / Downloaded / Ready (Restart to Update) / Overwriting:
Update: Mode→none.tooltip "Cancelling update, please wait...", activity badge, and menu entry "Cancelling Update...").
(log:
update#disable - updates are disabled by user preference).update.mode=default.Scenario 3 — Overwriting path (newer update replaces a pending one)
update.mode=default, let an update reach Ready (Restart to Update).the state transitions through Overwriting back to Ready for the newer version.
Update: Mode→none.Scenario 4 — Restart to Update completes normally (regression)
update.mode=default, reach Restart to Update and choose to restart.Scenario 5 — Policy:
UpdateMode(optional, requires MDM/profile)UpdateModepolicy that disables updates.(log:
update#disable - updates are disabled by policy).Update: Modebecomes policy-controlled (not user-editable) and applies without restart.Regression checks
manual/start/none.Cancellingcorrectly.