-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Winget Repair - Eliminate installer type mapping for MSI/WIX and MSIX NonStore ,code refactoring & E2E Test Coverage #4534
Merged
Madhusudhan-MSFT
merged 17 commits into
microsoft:master
from
Madhusudhan-MSFT:user/masudars/winget_repair_refactoring_e2e_tests
Jun 15, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… MSI/WIX and MSIX NonStore & code refactoring The changes includes: - Code changes eliminate installer type mapping for MSI/WIX and MSIX NonStore, leveraging native platform support for repairs. - Refactored code for better readability and maintainability.
- Refactored AppInstallerTestExeInstaller to support repair operations. The code now accommodates Modify Repair, Uninstaller Repair, and Installer Repair. - Minor refactoring is also part of this update
- Added E2E tests for winget, targeting installer types such as - MSI, - NonStore MSIX, - Burn, Nullsoft, Inno, and Exe. - These tests aim to ensure reliability across Modify Repair, Uninstaller Repair, and Installer Repair scenarios.
This comment has been minimized.
This comment has been minimized.
…taller will be uninstalled as part of test setup to avoid interference.
This comment has been minimized.
This comment has been minimized.
…tBurnInstaller.MissingRepairBehavior.yaml'
yao-msft
reviewed
Jun 6, 2024
- In `RepairFlow.h`, the inclusion of `"winget/ManifestCommon.h"` has been removed. - In `AppInstallerCLIE2ETests.csproj`, several test data files, including 'AppInstallerTestMsiInstallerV2.msi` and various YAML files, have been removed
- The function `SelectApplicableInstallerWhenEssential` has been renamed to `SelectApplicableInstallerIfNecessary` and modified to include new checks and calls. - The function `HandleUnknownRepair` has been removed and its error handling code has been directly inserted where it was previously called. - The function `GetInstalledPackageInstallerType` has been renamed to `GetInstalledType`. - Comments in `RepairFlow.cpp` and `RepairFlow.h` have been updated to reflect these changes.
`Moved the line 'context << SetPackageFamilyNamesInContext;' fRepairMsixPackage. This change ensures that the SetPackageFamilyNamesInContext operation is only executed for non-store MSIX packages, possibly when the package is not from the MSStore.`
- Updated the `ExecuteRepair` and `GetRepairInfo` functions to handle different installer types more flexibly - Removed `RepairMsixPackage` function. Updated function declarations in `RepairFlow.h` to reflect these changes. - Simplified the determination of `repairPackage` in `ReportRepairResult`.
Renamed the function `RepairMsixNonStorePackage` to `RepairMsixPackage` in `RepairFlow.cpp` and `RepairFlow.h` files. This change is also reflected in the context where this function is called in the `InstallerTypeEnum::Msix` case.
…cpp` - The `IsInstallerMappingRequired` function now uses a `switch` statement for different `InstallerTypeEnum` values and checks remotepackage source for MSIX type to confirm MSStore package check - `SelectApplicablePackageVersion` function now returns early for `Msi` types and `Msix` packages not from the Microsoft Store. - The `SelectApplicableInstallerIfNecessary` function has been updated to select the applicable package version before checking if installer mapping is required.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
yao-msft
reviewed
Jun 15, 2024
- Refined the logic for MSIX package handling in the repair flow, focusing on Microsoft Store packages and improving installer selection accuracy. - Simplified installer type checks by removing redundant MSI checks, streamlining the repair process. - Adjusted repair command tests for clarity, removing unnecessary string interpolation. - Enhanced documentation and comments for better clarity on the repair flow and installer selection logic.
yao-msft
approved these changes
Jun 15, 2024
Madhusudhan-MSFT
deleted the
user/masudars/winget_repair_refactoring_e2e_tests
branch
June 15, 2024 06:31
ryfu-msft
pushed a commit
to ryfu-msft/winget-cli
that referenced
this pull request
Jun 25, 2024
… NonStore ,code refactoring & E2E Test Coverage (microsoft#4534) **Repair Command updates:** - Code changes eliminate installer type mapping for MSI/WIX and MSIX NonStore, leveraging native platform support for repairs. - Refactored code for better readability and maintainability. **AppInstallerTestExeInstaller - Repair support** - Refactored AppInstallerTestExeInstaller to support repair operations. The code now accommodates Modify Repair, Uninstaller Repair, and Installer Repair. - Minor refactoring is also part of this update **E2E Test Coverage:** - Added E2E tests for winget, targeting installer types such as - MSI, - NonStore MSIX, - Burn, Nullsoft, Inno, and Exe. - These tests aim to ensure reliability across Modify Repair, Uninstaller Repair, and Installer Repair scenarios. **How Validated:** - Configured LocalhostWebServer for local execution. - Executed WingetRepair Tests via Visual Studio TestExplorer, confirming all tests passed on the local machine ![image](https://github.com/microsoft/winget-cli/assets/53235553/e3b935b6-4be3-419e-a81d-dd639f5d9377) <!-- To check a checkbox place an "x" between the brackets. e.g: [x] --> - [x] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [ ] This pull request is related to an issue. ----- ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4534)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Repair Command updates:
AppInstallerTestExeInstaller - Repair support
E2E Test Coverage:
How Validated:
Microsoft Reviewers: Open in CodeFlow