-
Notifications
You must be signed in to change notification settings - Fork 4k
[Az.Tools.Installer]: Updates for a new minor/patch version #20022
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
Conversation
Thank you for your contribution matsest! We will review the pull request and get back to you soon. |
Changing parameters to mandatory would cause a breaking change which is not allowed in regular releases. Is that right? @BethanyZhou |
That's true for module with stable version. Az.Tools.Installer is under preview, its version is 0.2.0, That's fine to include breaking changes. |
/azp list |
CI/CD Pipelines for this repository: |
@@ -55,7 +55,7 @@ | |||
|
|||
# Assemblies that must be loaded prior to importing this module | |||
RequiredAssemblies = @( | |||
'.\assembly\Microsoft.ApplicationInsights.2.12.0\Microsoft.ApplicationInsights.dll' | |||
'.\assembly\Microsoft.ApplicationInsights.2.21.0\Microsoft.ApplicationInsights.dll' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if this should not be updated (I see that it failed some tests in ADO, but I can't see where the relevant test is specified)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if this should not be updated (I see that it failed some tests in ADO, but I can't see where the relevant test is specified)
Hi @matsest, Welcome to contribute to Az.Tools.Installer!
The pipeline fails of other reasons. We are fixing it.
However, we still cannot upgrade ApplicationInsights to the latest version for PowerShell 7.0+ cannot support it. I have change the version to 2.13.1.
I also revert the change of Repository
for we keep the parameter as optional to be consistent with PowerShellGet. To clarify the ambiguity, I add more explanation in the help message.
I remove the Az.Tools.Installer-help.xml for we will generate it every time we release a new version.
Please review the change I've made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msJinLei Thanks for the updates on ApplicationInsights
I also revert the change of Repository for we keep the parameter as optional to be consistent with PowerShellGet. To clarify the ambiguity, I add more explanation in the help message.
With removal of the mandatory value the linked issue will however not be resolved as I see the behaviour when it's not given is:
$ Update-AzModule
Find-Module: Cannot validate argument on parameter 'Repository'. The argument is null, empty, or an element of the argument collection contains a
null value. Supply a collection that does not contain any null values and then try the command again.
PropertyNotFoundException: The property 'Version' cannot be found on this object. Verify that the property exists.
InvalidArgument: /home/matsest/personal/azure-powershell/tools/Az.Tools.Installer/exports/Update-AzModule.ps1:94
Line |
94 | … eUpdateTable = $modulesToUpdate | Foreach-Object { [PSCustomObject]@{
| ~~~~~~~~~~~~~~~~~~
| Cannot convert value "0" to type "System.Version". Error: "Version string portion was too short or too long. (Parameter 'input')"
If it's not desirable to be mandatory, should this error be catched?
If only one repository is registered in PowerShell, Install-AzModule will use it.
I can't see that this is the implemented behaviour? (see comment below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, I do only have one repository:
$ Get-PSRepository
Name InstallationPolicy SourceLocation
---- ------------------ --------------
PSGallery Trusted https://www.powershellgallery.com/api/v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matsest Could you report the issue here https://github.com/Azure/azure-powershell/issues? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will check it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msJinLei I see this was merged but the issue regarding the Repository parameter was not resolved as I suggested. Https://github.com/Azure/azure-powershell/issues/19839 should be reopened..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msJinLei I see this was merged but the issue regarding the Repository parameter was not resolved as I suggested. Https://github.com/Azure/azure-powershell/issues/19839 should be reopened..
@matsest I created an issue for it #20209 and will fix it soon. Thanks for reporting.
Co-authored-by: Mats Estensen <[email protected]>
Revert the change of parameter `Repository`
c2e784c
to
0c75308
Compare
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
There hasn't been a release for Az.Tools.Installer for a long time (0.2.0) - even with changes being made to it several months ago - so adding a few updates to hopefully make it ready for a new release.
Install-AzModule
andUpdate-AzModule
(fixes [Feature]: Improve error message for Az.Tools.Installer #19839)Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.