Skip to content

Conversation

@fengzhou-msft
Copy link
Member

Description

azure-cli does not use aio files in azure management SDKs. dist-info is not used in MSI for installation or update. Remove them in this PR.

This PR also adds back the MSI test task to resolve #9270

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

}else {
$reinstall_option=""
}
Start-Process "msiexec.exe" -ArgumentList "/i `"$env:SYSTEM_ARTIFACTSDIRECTORY\msi\Microsoft Azure CLI.msi`" $reinstall_option /q /norestart /l*v .\install_logs.txt" -Wait -NoNewWindow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$InstallArgs looks more readable to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

@yungezz yungezz requested a review from houk-ms March 16, 2021 06:20
@fengzhou-msft fengzhou-msft merged commit 37b1e01 into Azure:dev Mar 18, 2021
Comment on lines +224 to +228
if ($pre_installed_version -eq $to_be_installed_version){
# See https://docs.microsoft.com/windows/win32/msi/reinstallmode about options of REINSTALLMODE
$reinstall_option="REINSTALL=ALL REINSTALLMODE=emus"
$InstallArgs += $reinstall_option
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ADO agent has a pre-installed Azure CLI MSI, so this job tries to "reinstall" with the artifact MSI. If the artifact MSI has the same version as the pre-installed Azure CLI, L226 adds REINSTALL=ALL REINSTALLMODE=emus.

If I run the msiexec.exe command locally (with or without /q):

msiexec.exe /i "Microsoft Azure CLI.msi" REINSTALL=ALL REINSTALLMODE=emus

it succeeds very fast but doesn't install anything, so the "reinstall" actually never works.

I guess it is because the artifact MSI is actually a different product as the pre-installed one, so it has nothing to "reinstall". I am not sure if this is related to Product.Id being *:

After removing REINSTALL=ALL REINSTALLMODE=emus, the artifact MSI can install successfully, but is installed side-by-side with the pre-installed one.

@bebound
Copy link
Contributor

bebound commented Oct 14, 2024

After removing the dist-info folders, the azure-* packages no longer appear in the pip list. That result is somewhat counterintuitive. I'm inclined to keep them.

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.

MSI Install Phase of Build Pipeline Targets Incorrect Binary

6 participants