-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 COM API for Repair #4736
WinGet COM API for Repair #4736
Commits on Aug 7, 2024
-
Add Skeleton Implementation for Repair COM APIs Invocable from E2E Tests
This commit includes: 1. Necessary additions and updates to PackageManager.idl to define repair-specific COM API contracts and runtime class declarations. 2. Implementation of repair-specific runtime class and PackageManager runtime class repair contract methods skeleton. 3. GUID mapping for In-proc and Out-of-proc COM API class definitions. 4. Updates to `Package.appxmanifest` and `Microsoft.Management.Deployment.InProc.dll.manifest` to include new COM class entries for `RepairOptions`. 5. Updates to `ComClsids.cpp` and `ComClsids.h` to include CLSID definitions and redirection logic for `RepairOptions`. 6. Modifications to `ClassesDefinition.cs` and `WinGetProjectionFactory.cs` to define and create instances of `RepairOptions`and repair com api support for C# winrt projection interop library.
Configuration menu - View commit details
-
Copy full SHA for 2ee3cd6 - Browse repository at this point
Copy the full SHA 2ee3cd6View commit details -
Implement Sample Interop Test for Winget Repair COM API
This commit includes: - A sample interop test to invoke the Winget repair out-of-proc COM API. - Validation to ensure the COM API endpoint is invocable.
Configuration menu - View commit details
-
Copy full SHA for 24bd7a0 - Browse repository at this point
Copy the full SHA 24bd7a0View commit details
Commits on Aug 15, 2024
-
[Updates to PackageManager.idl :] Add DownloadError status and rename…
… InstallerErrorCode - Updated `RepairResultStatus` enum to include `DownloadError`. - Renamed `InstallerErrorCode` to `RepairErrorCode` in `RepairResult`. - Added inline comments for `LogOutputPath` property for directing log output. - Updated `RepairResult.cpp` and `RepairResult.h` for renaming.
Configuration menu - View commit details
-
Copy full SHA for c9b38a4 - Browse repository at this point
Copy the full SHA c9b38a4View commit details -
Added integration logic for Repair COM APIs:
- Integrated Repair COM APIs with workflow. - Added `COMRepairCommand` class. - Updated `ContextOrchestrator` with `CreateItemForRepair`. - Added `GetManifestRepairScope` in `Converters`. - Enhanced `PackageManager` with repair functions and async methods.
Configuration menu - View commit details
-
Copy full SHA for b208c30 - Browse repository at this point
Copy the full SHA b208c30View commit details -
Added E2E tests for Winget COM Repair API:
- Introduced RepairInterop.cs for InProc & Out of Proc COM Repair APIs. - Extended GroupPolicyForInterop.cs to cover COM Repair API scenarios.
Configuration menu - View commit details
-
Copy full SHA for 79a4220 - Browse repository at this point
Copy the full SHA 79a4220View commit details -
Fix test failure in RepairCommand for NonstoreMSIX machine scope repair
Adjusted test assertion in RepairCommand.cs to check for the more general string "Microsoft.Paint" instead of "Microsoft.Paint_8wekyb3d8bbwe". This change ensures compatibility with version-specific output variations.
Configuration menu - View commit details
-
Copy full SHA for 1ab97db - Browse repository at this point
Copy the full SHA 1ab97dbView commit details
Commits on Aug 16, 2024
-
Fix for RepairNonStoreMsixPackageWithMachineScope test failure
- Changed `PackageMatchField` from `Name` to `Id`. - Updated search value from `"Paint"` to `"Microsoft.Paint_8wekyb3d8bbwe"` to ensure accurate package identification.
Configuration menu - View commit details
-
Copy full SHA for fa8c6d5 - Browse repository at this point
Copy the full SHA fa8c6d5View commit details -
Test failure fix for: RepairNonStoreMsixPackageWithMachineScope
These changes ensure the test only proceeds if a package is found, preventing false failures and improving test accuracy.
Configuration menu - View commit details
-
Copy full SHA for 0e43224 - Browse repository at this point
Copy the full SHA 0e43224View commit details -
Fix OOP COM Repair Test Failures
The following tests failed in the Azure pipeline due to ERROR_ADMIN_CONTEXT_REPAIR_PROHIBITED (0x8A15007D): - DisableWinGetCommandLineInterfacesPolicy - RepairBurnInstallerWithModifyBehavior - RepairExeInstallerWithUninstallerBehavior - RepairNullsoftInstallerWithUninstallerBehavior The problem is due to the OOP COM Server running as admin in the pipeline, which is not the case for local test runs. This discrepancy may indicate different test configurations in the pipeline. This prevents the repair of user-scope installed packages. The solution is to install the test package to system scope, similar to In-Proc tests. - Made minor optimizations to the replacement arguments string building logic.
Configuration menu - View commit details
-
Copy full SHA for 7d112a4 - Browse repository at this point
Copy the full SHA 7d112a4View commit details
Commits on Aug 19, 2024
-
Remove DownloadDirectory parameter and related logic
The DownloadDirectory parameter and its associated logic have been removed from WinGet COM Repair logic. This includes: - Removal of the DownloadDirectory from the interface definition in PackageManager.idl. - Removal of the code that adds the DownloadDirectory argument to the context in PackageManager.cpp. - Removal of the getter and setter methods in RepairOptions.cpp. - Removal of the m_downloadPath member variable in RepairOptions.h.
Configuration menu - View commit details
-
Copy full SHA for b34ad4b - Browse repository at this point
Copy the full SHA b34ad4bView commit details
Commits on Aug 20, 2024
-
Merge branch 'master' of https://github.com/Madhusudhan-MSFT/winget-cli…
… into user/masudars/WinGet_Repair_COMAPI
Configuration menu - View commit details
-
Copy full SHA for e6d2830 - Browse repository at this point
Copy the full SHA e6d2830View commit details -
Add CLSID for RepairOptions in Microsoft.Management.Deployment.OutOfP…
…roc Factory.cpp Introduce a new CLSID for RepairOptions in the Microsoft::Management::Deployment::OutOfProc namespace. Update the s_nameCLSIDPairs array to include the new NameCLSIDPair for RepairOptions, increasing the array size from 8 to 9. This change enables the system to recognize and work with RepairOptions similarly to other components.
Configuration menu - View commit details
-
Copy full SHA for 01beb24 - Browse repository at this point
Copy the full SHA 01beb24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97d48e8 - Browse repository at this point
Copy the full SHA 97d48e8View commit details
Commits on Aug 23, 2024
-
Add Repair-WinGetPackage powershell cmdlet to Microsoft.WinGet.Client
Introduced a new cmdlet `Repair-WinGetPackage` to the Microsoft.WinGet.Client PowerShell module. This cmdlet allows users to repair packages with different modes (Default, Silent, Interactive) and provides detailed results of the repair operation. Key changes: - Added new classes and methods to support the repair functionality. - Updated `Format.ps1xml` to include a new view definition for `PSRepairResult`. - Added new localized strings for repair operations. - Updated `README.md` and added a sample script `Sample_RepairPackage.ps1`. - Included `Repair-WinGetPackage` in the list of exported cmdlets in `Microsoft.WinGet.Client.psd1`.
Configuration menu - View commit details
-
Copy full SHA for ec3822f - Browse repository at this point
Copy the full SHA ec3822fView commit details -
Fix parameter name in RepairPackageCommand constructor to address Spe…
…llCheck error Renamed the parameter `pSCatalogPackage` to `psCatalogPackage` in the `RepairPackageCommand` constructor and updated all references to ensure consistency and improve readability with camelCase naming.
Configuration menu - View commit details
-
Copy full SHA for 752766b - Browse repository at this point
Copy the full SHA 752766bView commit details
Commits on Aug 24, 2024
-
Fix Format.ps1xml formatting issue.
Reformatted XML structure in Format.ps1xml file to resolve 'Node TableRowEntries is missing' error. Adjusted the <TableRowEntries> and its nested elements accordingly.
Configuration menu - View commit details
-
Copy full SHA for ffc4f8f - Browse repository at this point
Copy the full SHA ffc4f8fView commit details -
Add test case for Repair-WinGetPackage cmdlet
- Introduced `Install|Repair|Uninstall-WinGetPackage` test suite in `Microsoft.WinGet.Client.Tests.ps1` to cover installation, repair, and uninstallation of MSIX, Burn Installer, and Exe Installer packages. - Each test verifies expected results, including non-null results, correct package Ids, names, sources, error codes, statuses, and reboot requirements. - `BeforeAll` block adds a test source, and `AfterAll` block ensures cleanup by uninstalling test packages.
Configuration menu - View commit details
-
Copy full SHA for 673e930 - Browse repository at this point
Copy the full SHA 673e930View commit details -
Refactor and optimize Repair-WinGetPackage tests
- Added `Validate-WinGetResultCommonFields` and `Validate-WinGetPackageOperationResult` functions in `Microsoft.WinGet.Client.Tests.ps1` to validate common fields and specific operation results for WinGet package operations. - Refactor install, repair, and uninstall test cases to use these functions, removing individual validation steps and adding contexts for better organization. - Simplify test logic by creating an expected result object and passing it to the validation function.
Configuration menu - View commit details
-
Copy full SHA for dc7b1aa - Browse repository at this point
Copy the full SHA dc7b1aaView commit details -
Fixed repair scenario test failures
- Addressed repair scenario test failures by adding InstallerErrorCode, RepairErrorCode, and UninstallerErrorCode properties with a default value of 0 to the test cases expectedResult object - Removed unnecessary error code assignment This fix resolves the runtime exceptions: 1. The property 'InstallerErrorCode' cannot be found on this object, 2. The property 'RepairErrorCode' cannot be found on this object, and 3. The property 'UninstallerErrorCode' cannot be found on this object'.
Configuration menu - View commit details
-
Copy full SHA for db2bc39 - Browse repository at this point
Copy the full SHA db2bc39View commit details
Commits on Aug 25, 2024
-
Add BeforeEach blocks to initialize $expectedResult in tests, fixing …
…the variable initialization issue that results in test failures
Configuration menu - View commit details
-
Copy full SHA for e8e3013 - Browse repository at this point
Copy the full SHA e8e3013View commit details -
Refactored test cases for Install|Update|Uninstall-WinGetPackage cmdl…
…ets: - Added BeforeEach block to define expected result objects. - Replaced inline assertions with Validate-WinGetPackageOperationResult. - Centralized validation logic to improve readability and maintainability.
Configuration menu - View commit details
-
Copy full SHA for 4f68812 - Browse repository at this point
Copy the full SHA 4f68812View commit details -
Configuration menu - View commit details
-
Copy full SHA for dce2094 - Browse repository at this point
Copy the full SHA dce2094View commit details
Commits on Aug 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 995bd58 - Browse repository at this point
Copy the full SHA 995bd58View commit details -
Refactor namespace for PSPackageRepairMode enum
Changed the namespace for the `PSPackageRepairMode` enum from `Microsoft.WinGet.Client.Cmdlets.Cmdlets.PSObjects` to `Microsoft.WinGet.Client.PSObjects`. Updated `RepairPackageCmdlet.cs` to reflect this change, ensuring correct references.
Configuration menu - View commit details
-
Copy full SHA for 442a7a5 - Browse repository at this point
Copy the full SHA 442a7a5View commit details -
Add Repair-WinGetPackage cmdlet documentation
Updated `Microsoft.WinGet.Client.md` to include the new `Repair-WinGetPackage` cmdlet. Created `Repair-WinGetPackage.md` to document the cmdlet, including synopsis, syntax, detailed description, examples, parameter descriptions, common parameters, input/output types, and related links.
Configuration menu - View commit details
-
Copy full SHA for 828284f - Browse repository at this point
Copy the full SHA 828284fView commit details -
Fix typo in -Confirm parameter type in Repair-WinGetPackage.md & Spel…
…l check error fix. Corrected the type definition of the -Confirm parameter from 'SSystem.Management.Automation.witchParameter' to 'System.Management.Automation.SwitchParameter' in the Repair-WinGetPackage.md file.
Configuration menu - View commit details
-
Copy full SHA for d8553a4 - Browse repository at this point
Copy the full SHA d8553a4View commit details
Commits on Sep 4, 2024
-
Add missing interfaces for RepairOptions and RepairResult collections
Added new interfaces in the `Microsoft.Management.Deployment` namespace within the `PackageManager.idl` file. Added interfaces for handling collections of `RepairOptions` and `RepairResult`: - `Windows.Foundation.Collections.IVector<RepairOptions>` - `Windows.Foundation.Collections.IVectorView<RepairOptions>` - `Windows.Foundation.Collections.IVector<RepairResult>` - `Windows.Foundation.Collections.IVectorView<RepairResult>` These changes enhance the functionality related to repair operations in the package management system by allowing manipulation and viewing of these collections.
Configuration menu - View commit details
-
Copy full SHA for 55efd2c - Browse repository at this point
Copy the full SHA 55efd2cView commit details
Commits on Sep 6, 2024
-
Update
PackageManager.idl
comments and refactor powershell repair m……ethods - Updated the comment in `PackageManager.idl` to clarify that `CorrelationData` is used for the repair process. - In `RepairPackageCommand.cs`, replaced the method call to `PackageManagerWrapper.Instance.RepairPackageAsync` with `this.RepairPackageAsync`. - Renamed `RepairResultAsync` to `RepairPackageAsync` for better clarity.
Configuration menu - View commit details
-
Copy full SHA for 859cd04 - Browse repository at this point
Copy the full SHA 859cd04View commit details
Commits on Sep 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 08cb8fe - Browse repository at this point
Copy the full SHA 08cb8feView commit details -
Update contract version to 12 in PackageManager.idl
Revised the contract version from 11 to 12 for repair-specific implementations because version 11 conflicted with the previous addition but code wasn't in sync.
Configuration menu - View commit details
-
Copy full SHA for 84cadf0 - Browse repository at this point
Copy the full SHA 84cadf0View commit details
Commits on Sep 9, 2024
-
Revert "Update contract version to 12 in PackageManager.idl"
This reverts commit 84cadf0.
Configuration menu - View commit details
-
Copy full SHA for f9c3ecd - Browse repository at this point
Copy the full SHA f9c3ecdView commit details
Commits on Sep 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 05220c8 - Browse repository at this point
Copy the full SHA 05220c8View commit details
Commits on Sep 13, 2024
-
Remove GetRepairProgress method from PackageManager
- The GetRepairProgress method has been removed from both the implementation file (PackageManager.cpp) and the interface definition file (PackageManager.idl). - This method was designed to return the progress of a repair operation for a given package and catalog information to allow another client to find asynchronously. However, we currently do not have a practical use case for this functionality. If this requirement arises in the future, we will consider adding it back.
Configuration menu - View commit details
-
Copy full SHA for 3d3b435 - Browse repository at this point
Copy the full SHA 3d3b435View commit details -
Merge branch 'user/masudars/WinGet_Repair_COMAPI' of https://github.c…
…om/Madhusudhan-MSFT/winget-cli into user/masudars/WinGet_Repair_COMAPI
Configuration menu - View commit details
-
Copy full SHA for c3a2ccb - Browse repository at this point
Copy the full SHA c3a2ccbView commit details
Commits on Sep 28, 2024
-
Add new repair options and rename error codes (API Review Feedback)
Updated `Converters.h` to use `NoApplicableRepairer` instead of `NoApplicableInstallers`. Added handling for `AllowHashMismatch`, `BypassIsStoreClientBlockedPolicyCheck`, and `Force` in `PackageManager.cpp` and `PackageManager.idl`. - Renamed `NoApplicableInstallers` to `NoApplicableRepairer` and `RepairErrorCode` to `RepairerErrorCode` in `PackageManager.idl`. Added getter and setter methods for new options in `RepairOptions.cpp` and declarations in `RepairOptions.h`. Updated `RepairResult.cpp` and `RepairResult.h` to use `repairerErrorCode`. Enhanced `RepairPackageCmdlet.cs` and `RepairPackageCommand.cs` to handle new parameters. Updated `PSRepairResult.cs` to use `RepairerErrorCode`.
Configuration menu - View commit details
-
Copy full SHA for e915dde - Browse repository at this point
Copy the full SHA e915ddeView commit details
Commits on Oct 2, 2024
-
Update GUID and XML docs in ManagementDeploymentFactory
- Updated `RepairOptionsIid` GUID in `ManagementDeploymentFactory` to align with WinRT MIDL-generated interface ID for `RepairOptions` resulted from API review feedback changes in last commit. This resolves COMException: Failed to create instance: -2147467262 when PowerShell tests invoke Repair-WinGetPackage cmdlet. - Corrected XML documentation for `CreateRepairOptions` method to accurately describe it creates an instance of `RepairOptions` class instead of `PackageMatchFilter` class.
Configuration menu - View commit details
-
Copy full SHA for d00a2aa - Browse repository at this point
Copy the full SHA d00a2aaView commit details -
Enhance error handling for Repair-WinGetPackage command-let
- Introduced a new exception class `WinGetRepairPackageException` in `WinGetRepairPackageException.cs` to encapsulate various error scenarios during the repair operation. - Updated `RepairPackageCommand.cs` to throw `WinGetRepairPackageException` when specific error conditions are met during the repair process. - Added new error codes in `ErrorCode.cs` to represent different repair-related errors such as `NoRepairInfoFound`, `RepairNotApplicable`, `RepairerFailure`, `RepairNotSupported`, and `AdminContextRepairProhibited`. - Enhanced `Resources.Designer.cs` and `Resources.resx` with new localized strings to provide user-friendly error messages for the new error codes. - Modified the `RepairPackageCommand.cs` to handle and throw exceptions with detailed error messages based on the new error codes and localized strings.
Configuration menu - View commit details
-
Copy full SHA for 4f87879 - Browse repository at this point
Copy the full SHA 4f87879View commit details
Commits on Oct 5, 2024
-
- Added inline comment for `COMRepairCommand` in `COMCommand.cpp`. - Updated inline comments in `ContextOrchestrator.cpp` and `ContextOrchestrator.h` to reflect repair commands specific changes. - Introduced `ModifyRepairInstaller` constant in `Constants.cs` and refactored related files for consistency. - Modified `Converters.h` to map error codes for repair operations. - Removed an unnecessary `Natvis` include from `Microsoft.Management.Deployment.vcxproj.filters`. - Corrected a comment in `PackageManager.cpp` about repair requirements. - Enhanced `RepairPackageCommand.cs` to search both local and remote catalogs. - Updated resource strings in `Resources.Designer.cs` and `Resources.resx` for clarity in error messages.
Configuration menu - View commit details
-
Copy full SHA for 309e40e - Browse repository at this point
Copy the full SHA 309e40eView commit details -
- Removed the GetRepairProgress method from the PackageManager class - Updated the CompositeSearchBehavior in RepairPackageCommand.cs to use AllCatalogs, broadening the scope of package searches. - Also, added a newline for readability in PackageManager.cpp.
Configuration menu - View commit details
-
Copy full SHA for c0f12f3 - Browse repository at this point
Copy the full SHA c0f12f3View commit details