Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Comments

Refactor 'windows package manager' integration with recovery logic#2089

Merged
AmelBawa-msft merged 37 commits intomainfrom
user/amelbawa-msft/com-oop-appinstaller
Feb 4, 2024
Merged

Refactor 'windows package manager' integration with recovery logic#2089
AmelBawa-msft merged 37 commits intomainfrom
user/amelbawa-msft/com-oop-appinstaller

Conversation

@AmelBawa-msft
Copy link
Contributor

Summary of the pull request

  • Refactor 'windows package manager' integration with recovery logic
  • Update unit tests
  • Added recovery with exponential backoff (5 attempts) in case installing or searching for a package failed due to COM server interruption or AppInstaller update.

Services dependency graph

  • WindowsPackageManager depends on four main services:
    • WinGetOperations handles the core functionality of the WPM, such as installing, searching, and getting packages
    • WinGetCatalogConnector connects the WPM to different catalogs of applications
    • WinGetDeployment handles deployment functionality for AppInstaller such as registering and checking for store updates
    • WinGetProtocolParser parses the protocol used to communicate winget packages using URIs. E.g. x-ms-winget://winget/Microsoft.VisualStudio.2022.Community
  • WinGetRecovery handles the recovery scenarios in case of failures or interruptions during the operations.
  • WinGetPackageCache caches packages loaded from catalogs to optimize subsequent requests for already loaded packages.
  • WinGetOperations depends on three operation services:
    • WinGetInstallOperation installs a package from a given source (with recovery)
    • WinGetSearchOperation search for a package across all sources using various fields (with recovery)
    • WinGetGetPackageOperation gets a package from a specific source by id (with recovery)
  • WinGetPackageInstaller installs a package by calling WinGet API
  • WinGetPackageFinder finds a package that matches provided criteria by calling WinGet API
graph TB;
    %%{init:{'flowchart':{"defaultRenderer": "elk"}}}%%
    WPM[WindowsPackageManager]
    WinGetOperations[WinGetOperations]
    WinGetDep[WinGetDeployment]
    WinGetCC[WinGetCatalogConnector]
    WinGetPP[WinGetProtocolParser]
    WinGetPC[WinGetPackageCache]
    WinGetIO[WinGetInstallOperation]
    WinGetSO[WinGetSearchOperation]
    WinGetGPO[WinGetGetPackageOperation]
    WinGetPI[WinGetPackageInstaller]
    WinGetRecovery[WinGetRecovery]
    WinGetPF[WinGetPackageFinder]
    WPM --> WinGetOperations
    WPM --> WinGetCC
    WPM --> WinGetDep
    WPM --> WinGetPP
    WinGetOperations --> WinGetIO
    WinGetOperations --> WinGetSO
    WinGetOperations --> WinGetGPO
    WinGetCC --> WinGetPC
    WinGetPP --> WinGetCC
    WinGetIO --> WinGetPP
    WinGetIO --> WinGetCC
    WinGetIO --> WinGetPI
    WinGetIO --> WinGetRecovery
    WinGetPI --> WinGetPF
    WinGetRecovery --> WinGetCC
    WinGetSO --> WinGetCC
    WinGetSO --> WinGetPF
    WinGetSO --> WinGetRecovery
    WinGetGPO --> WinGetPC
    WinGetGPO --> WinGetPP
    WinGetGPO --> WinGetPF
    WinGetGPO --> WinGetRecovery
Loading

References and relevant issues

Detailed description of the pull request / Additional comments

Validation steps performed

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@AmelBawa-msft AmelBawa-msft changed the base branch from main to feature/app-installer January 2, 2024 18:34
@AmelBawa-msft AmelBawa-msft changed the base branch from feature/app-installer to main February 2, 2024 19:21
@AmelBawa-msft AmelBawa-msft merged commit 8b4200f into main Feb 4, 2024
@AmelBawa-msft AmelBawa-msft deleted the user/amelbawa-msft/com-oop-appinstaller branch February 4, 2024 01:02
@AmelBawa-msft AmelBawa-msft restored the user/amelbawa-msft/com-oop-appinstaller branch February 5, 2024 18:07
@AmelBawa-msft AmelBawa-msft deleted the user/amelbawa-msft/com-oop-appinstaller branch February 6, 2024 21:57
@AmelBawa-msft AmelBawa-msft restored the user/amelbawa-msft/com-oop-appinstaller branch February 6, 2024 22:07
@AmelBawa-msft AmelBawa-msft deleted the user/amelbawa-msft/com-oop-appinstaller branch February 7, 2024 22:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support updating app installer in-app without restarting Dev Home Add support for Featured Applications from any catalog source

3 participants