Repository navigation
Report upgrades skipped as not applicable - #6637
Slai.life (huong8373tt-beep) wants to merge 4 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 6637 in repo microsoft/winget-cli |
There was a problem hiding this comment.
🟡 Changes recommended
The added user-scope argument breaks an existing upgrade success-path test, and the skipped-upgrade counter incorrectly includes already-current and pinned packages.
2 open issues
What changed in this PR
This PR addresses #6516 by adding a summary for upgrades skipped as not applicable during winget upgrade --all, extending reporting previously available only for single-package upgrades.
Changes:
- Counts not-applicable results and adds an English summary resource.
- Adds a scope-mismatch regression test, supporting fixture, and test-project registration.
- Adds a 1.31 release-note fragment describing the new output.
| File | Description |
|---|---|
| src/AppInstallerCLITests/WorkflowCommon.h | Declares the new test-source result. |
| src/AppInstallerCLITests/WorkflowCommon.cpp | Defines a package with a machine-scope upgrade. |
| src/AppInstallerCLITests/UpdateFlow.cpp | Adds summary coverage and modifies the existing success test’s scope. |
| src/AppInstallerCLITests/TestData/UpdateFlowTest_Exe_MachineScope.yaml | Supplies the machine-only EXE upgrade fixture. |
| src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters | Groups the new fixture under test data. |
| src/AppInstallerCLITests/AppInstallerCLITests.vcxproj | Includes the fixture in test deployment. |
| src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw | Adds the skipped-upgrade summary text. |
| src/AppInstallerCLICore/Workflows/UpdateFlow.cpp | Counts and reports not-applicable upgrade results. |
| src/AppInstallerCLICore/Resources.h | Exposes the new summary resource identifier. |
| doc/release-notes/1.31/6516-upgrade-all-skip-reason.md | Documents the user-visible reporting change. |
Review effort: Balanced
Signed-off-by: Slai.life <[email protected]>
|
|
||
| if (updateContext.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE) | ||
| { | ||
| if (updateContext.Contains(Execution::Data::InstallerInapplicable)) |
There was a problem hiding this comment.
| if (updateContext.Contains(Execution::Data::InstallerInapplicable)) | |
| if (updateContext.Contains(Execution::Data::InstallerInapplicable) && updateContext.Get(Execution::Data::InstallerInapplicable)) |
If it is going to be a bool, there are two values.
There was a problem hiding this comment.
🟡 Changes recommended
A blocked version can leave packagePinned true and suppress both summaries when another newer version passes pin evaluation but has no applicable installer; this case needs corrected tracking and a regression test.
1 open issue
2 resolved since last review
Review effort: Balanced
| AICLI_TERMINATE_CONTEXT(APPINSTALLER_CLI_ERROR_UPDATE_INSTALL_TECHNOLOGY_MISMATCH); | ||
| } | ||
|
|
||
| if (isUpgrade && upgradeVersionAvailable && !packagePinned) |
Signed-off-by: Slai.life <[email protected]>
|
Addressed the mixed pinned/inapplicable version case from review. The workflow now tracks whether a newer version passed pin evaluation and whether installer selection failed independently of packagePinned, and the regression test covers a pinned 2.0 version plus an allowed 1.1 version with only a machine-scope installer. Also normalized the existing release-note/test-data files to end with a newline. Commit: 18fc238. Local Windows build reached the repository C++/WinRT/vcpkg stage but was blocked by the shared vcpkg filesystem lock; no code assertion failure was observed. |
|
I am rechecking the latest Copilot comments against the current head before making any follow-up changes. I will address only confirmed issues and report the Windows validation status separately. |


Summary
Resolves #6516.
winget upgrade --all --scope usercan list an available update, then skip it when no compatible user-scope installer exists. The single-package flow explains that outcome, but the--allflow previously omitted it.This change counts
APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLEresults inUpdateAllApplicable()and reports a concise summary after processing available updates.Validation
UpdateFlow_UpdateAll_ReportsNotApplicable, using an installed EXE package whose newer manifest contains only a machine-scope installer while--scope useris requested.git diff --checkpassed.Merge-ReleaseNotes.ps1 -Version 1.31passed.AI assistance disclosure
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.
Microsoft Reviewers: Open in CodeFlow