add Get-AzVmssVmRunCommand on SDK based cmdlet #19840
Conversation
| "Az.Compute","Get-AzVmssVMRunCommand","Get-AzVmssVMRunCommand","0","1060","The parameter set 'List' for cmdlet 'Get-AzVmssVMRunCommand' is no longer the default parameter set.","Change the default parameter for cmdlet 'Get-AzVmssVMRunCommand' back to 'List'." | ||
| "Az.Compute","Get-AzVmssVMRunCommand","Get-AzVmssVMRunCommand","0","1060","The parameter set 'List' for cmdlet 'Get-AzVmssVMRunCommand' is no longer the default parameter set.","Change the default parameter for cmdlet 'Get-AzVmssVMRunCommand' back to 'List'." | ||
| "Az.Compute","Get-AzVmssVMRunCommand","Get-AzVmssVMRunCommand","0","1060","The parameter set 'List' for cmdlet 'Get-AzVmssVMRunCommand' is no longer the default parameter set.","Change the default parameter for cmdlet 'Get-AzVmssVMRunCommand' back to 'List'." | ||
| "Az.Compute","Get-AzVmssVMRunCommand","Get-AzVmssVMRunCommand","0","2000","The cmdlet 'Get-AzVmssVMRunCommand' no longer supports the parameter 'SubscriptionId' and no alias was found for the original parameter name.","Add the parameter 'SubscriptionId' back to the cmdlet 'Get-AzVmssVMRunCommand', or add an alias to the original parameter name." |
There was a problem hiding this comment.
line 10 is breaking change
There was a problem hiding this comment.
wrote in the description above, but that parameter set was not working to begin with
There was a problem hiding this comment.
please try set VirtualMachineScaleSetVMRunCommandsClient.SubscriptionId
before this line:
| @@ -0,0 +1,23 @@ | |||
| "AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation" | |||
| "Az.Compute","Get-AzVmssVMRunCommand","Get-AzVmssVMRunCommand","0","1020","The cmdlet 'Get-AzVmssVMRunCommand' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand'.","Make cmdlet 'Get-AzVmssVMRunCommand' return type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210701.IVirtualMachineRunCommand'." | |||
There was a problem hiding this comment.
please list differences between IVirtualMachineRunCommand and PSVirtualMachineRunCommand to prove there are no breaking changes
There was a problem hiding this comment.
see IVirtualMachineRunCommand here:
see PSVirtualMachineRunCommand here:
all the properties match
There was a problem hiding this comment.
these two objects do not match, please check carefully, properties in IVirtualMachineRunCommand are flatten
There was a problem hiding this comment.
i see. you are right.
It is a little different and the return type will be changing. but the move from IVirtualMachineRunCommandInternal return type to PSVirtualMachineRunCommand has already been done for Get-AzVMRunCommand,
and essentially the current Get-AzVmssVMRunCommand is broken in numerous different places, so we are improving customer experience by making this transition from autorest generated to sdk based. You've already merged the PR that is removing this cmdlet from autorest, please let me know if this PR can be merged to complete the transfer despite the change in return type
There was a problem hiding this comment.
also @dingmeng-xue is aware of this migration, but here is the reasonings I sent him via email:
- The feature owner wanted the returned output as list format.
a. Even when we specify -RunCommandName to retrieve 1 RunCommand resource, it is returned in table format. The having ~10 properties that the user needed to see, the table format did not provide all the information needed for the users due to the PowerShell window size constraints. - Have instanceView properties only shown when -Expand is provided.
a. The output was always showing “IntanceView” properties. So when “-Expand InstanceView” was not provided, those properties were always empty.
There was a problem hiding this comment.
and 2a is the result of having a flat hierchy
There was a problem hiding this comment.
got it, breaking changes on broken cmdlets won't be considered as blocker.
|
please see my responses @VeryEarly |
Description
This is mirroring what we already did to Get-AzVMRunCommand in the last release: #19272
Get-AzVmssVMRunCommand was originally autorest.powershell generated. But I am removing that from compute.autorest in this pr:
#19826
We are moving it to cmdlet built on SDK because we wanted to achieve two things:
Have all the fields show as a list format when we get back list of RunCommands
Have instanceView only show when -Expand InstanceView
So to achieve these customizations I moved it to cmdlet built on SDK here.
There is no breaking change here because currently from the documentation https://learn.microsoft.com/en-us/powershell/module/az.compute/get-azvmssvmruncommand?view=azps-9.0.0, 1st, 2nd, and 5th(last) parameter sets arent working
And the one parameter set we are adding in this PR is a combination of 3rd and 4th parameter sets by having -RunCommandName as optional.
Checklist
CONTRIBUTING.mdand reviewed the following information:generationbranch.ChangeLog.mdfile(s) appropriatelyChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader in the past tense. Add changelog in description section if PR goes intogenerationbranch.ChangeLog.mdif no new release is required, such as fixing test case only.