-
Notifications
You must be signed in to change notification settings - Fork 86
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
Improve matching for ZIP with multiple nested installers #529
Merged
ryfu-msft
merged 5 commits into
microsoft:main
from
mdanish-kh:multiple-nested-installers
Jul 30, 2024
Merged
Improve matching for ZIP with multiple nested installers #529
ryfu-msft
merged 5 commits into
microsoft:main
from
mdanish-kh:multiple-nested-installers
Jul 30, 2024
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
Contributor
mdanish-kh
requested review from
yao-msft and
ryfu-msft
and removed request for
a team
March 31, 2024 01:33
mdanish-kh
commented
Apr 4, 2024
src/WingetCreateTests/WingetCreateTests/Resources/WingetCreateTestMultipleNestedInstallers.zip
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ryfu-msft
requested changes
Jul 3, 2024
src/WingetCreateTests/WingetCreateTests/Resources/WingetCreateTestMultipleNestedInstallers.zip
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hmm.. I could've swore all tests passed locally last time I ran them. I'll take a look |
@ryfu-msft Would you be able to kick off a re-run please? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ryfu-msft
approved these changes
Jul 30, 2024
Thanks @mdanish-kh! Apologies for the long delay on this 😓 |
No worries at all! |
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.
Change
This PR adds support for handling multiple nested installers inside of a ZIP archive for the autonomous update mode. With the current behavior of parsing every nested installer, it can lead to generation of duplicate "installer" nodes for each nested installer. This change clears out the duplicates and subsequently only retains the nested installers that are present in the matching installer node from previous manifest.
Tests
Added unit test to verify the behavior and updated an existing test for better coverage. The new files i.e.,
WingetCreateTestPortable.exe
,WingetCreateTestPortable2.exe
are created by making a copy of the existingWingetCreateTestExeInstaller.exe
I also updated the issue body to add more examples from the community repo for manual validation.
Edge case
There's still an unhandled edge case if the manifest contains msixbundle as a NestedInstallerFile. But this is extremely rare, and the current change should cover the vast majority of cases. In fact, I performed a search in the community repo and could only find two packages with NestedInstallerType: msix (and one of them being devhome with its first ever release, so we can safely discard that too). Even if the user encounters this case, the package is still upgrade-able through the interactive mode
Microsoft Reviewers: Open in CodeFlow