Skip to content

Test: background update flow for system setup on windows #264373

@deepak1556

Description

@deepak1556

Refs: #249239

Complexity: 4

Authors: @deepak1556

Create Issue


Same as #264372 but for system setup. Please test the following scenarios,

Prerequisite:

  1. Download build A
  2. Download build B
  3. Set "update.mode": "manual" and "update.enableWindowsBackgroundUpdates": true

Issue reporting

When creating issues, please attach the following 3 logs along with the steps to repro

  1. Inno updater logs vscode-inno-updater-*.log from OS temp directory
  2. Inno setup logs Setup Log *.txt from OS temp directory
  3. Application main process logs, if possible always run with trace level

Testing:

Scenario 1 (Update from A -> B):

  • Install version A following the setup instructions
  • Ensure the directory layout of the installed application folder as follows,
<version folder> // name matches the first 10 chars of the product commit
bin
app.exe
app.VisualElementsManifest.xml
uninst000.dat
uninst000.exe
  • Launch version A
  • Run Developer: Apply Update
  • Choose version B setup file
  • Once the gear icon changes to signal update is ready to be installed, verify that the directory now has following additional files
<version B commit folder>
bin
  | new_app.cmd
new_app.exe
new_app.VisualElementsManifest.xml
  • Choose restart to update
  • Check the about dialog commit points to version B
  • Verify that application directory no longer contains new_ files

Scenario 2 (Update from A -> B without application restart):

  • Follow the same steps as scenario 1 till the gear icon signals update is ready
  • Close the application without choosing restart to update
  • Verify that the application directory still ends up performing the background update by renaming new_ files to current and removed files from old installation
  • Verify application doesn't get restarted
  • Manually launch the application to verify commit matches version B in the about dialog

Scenario 3 (Update from A -> B with system restart):

If the system doesn't abort the updater process then this scenario is not possible to verify so you can ignore as long as you are in a state where the application folder contains version B otherwise it is a bug

  • Follow the same steps as scenario 1 till the gear icon signals update is ready
  • Restart the OS system without closing the application
  • Verify there is a file session-ending.flag under OS temp dir/vscode-insider-win32-<arch> folder
  • Verify there is a file updating_version under the application install folder
  • Verify that the application directory hasn't performed any update operations, i-e there are new_ files present
  • Launch the application and confirm it is still version A

NB: In the automatic update flow it will detect pending update on the first update check which happens 30s after application start and reapply the update. Since this is manual update flow that check cannot happen.

Additional testing:

  1. Ensure cli works fine before and after the update, try to break cli by invoking it in the middle of the update flow
  2. Have a tunnel service running and perform the update flow, ensure tunnels get restarted once the update is complete

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions