Skip to content
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
merged 5 commits into from
Jul 30, 2024

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Mar 31, 2024

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 existing WingetCreateTestExeInstaller.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

@mdanish-kh mdanish-kh requested a review from a team as a code owner March 31, 2024 01:33
@mdanish-kh mdanish-kh requested review from yao-msft and ryfu-msft and removed request for a team March 31, 2024 01:33
@ryfu-msft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mdanish-kh mdanish-kh marked this pull request as ready for review July 14, 2024 11:05
@ryfu-msft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mdanish-kh
Copy link
Contributor Author

Hmm.. I could've swore all tests passed locally last time I ran them. I'll take a look

@mdanish-kh
Copy link
Contributor Author

@ryfu-msft Would you be able to kick off a re-run please?

@ryfu-msft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft
Copy link
Contributor

Thanks @mdanish-kh! Apologies for the long delay on this 😓

@ryfu-msft ryfu-msft merged commit 4f44b22 into microsoft:main Jul 30, 2024
5 checks passed
@mdanish-kh mdanish-kh deleted the multiple-nested-installers branch July 30, 2024 19:21
@mdanish-kh
Copy link
Contributor Author

No worries at all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot update MSIXBundle and ZIP with multiple nested installers
2 participants