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

Avoid creating installer node with duplicate NestedInstallerFile #419

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Aug 3, 2023

This PR fixes a regression introduced with PR #415 where manifests generated for certain ZIP installers i.e., that have common NestedInstallerFiles in base manifest across each installer node were incorrect. The code before #415 worked with distinct relative file paths. In #415, the behavior was modified to use the whole NestedInstallerFile object instead of RelativeFilePaths only but the code was not updated to have distinct NestedInstallerFiles object added into baseInstaller. This PR fixes that behavior.

The previous tests didn't catch this bug. Added a new test case that covers this behavior.

Manifests to test with

Some examples to compare the behavior with current main branch build and this PR's build:

wingetcreate update nim.nim -v 18.0 --urls "https://nim-lang.org/download/nim-1.6.12_x64.zip" "https://nim-lang.org/download/nim-1.6.12_x32.zip"
wingetcreate update junegunn.fzf -v 18.0 --urls "https://github.com/junegunn/fzf/releases/download/0.42.0/fzf-0.42.0-windows_amd64.zip" "https://github.com/junegunn/fzf/releases/download/0.42.0/fzf-0.42.0-windows_armv7.zip" "https://github.com/junegunn/fzf/releases/download/0.42.0/fzf-0.42.0-windows_arm64.zip"
wingetcreate update TerraformLinters.tflint -v 18.0 --urls "https://github.com/terraform-linters/tflint/releases/download/v0.45.0/tflint_windows_386.zip" "https://github.com/terraform-linters/tflint/releases/download/v0.45.0/tflint_windows_amd64.zip"
wingetcreate update AdGuard.AdGuardHome -v 18.0 --urls "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.23/AdGuardHome_windows_amd64.zip" "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.23/AdGuardHome_windows_386.zip" "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.23/AdGuardHome_windows_arm64.zip"

Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-create/pull/419&drop=dogfoodAlpha

@mdanish-kh mdanish-kh requested a review from a team as a code owner August 3, 2023 16:04
@mdanish-kh mdanish-kh requested review from yao-msft and ryfu-msft and removed request for a team August 3, 2023 16:04
@ryfu-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ryfu-msft ryfu-msft merged commit 93473ef into microsoft:main Aug 8, 2023
4 checks passed
@mdanish-kh mdanish-kh deleted the duplicateNestedInstallerFile branch August 8, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants