azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

update connectedmachine

Open vedkale opened this issue 1 year ago • 16 comments

Description

Mandatory Checklist

  • Please choose the target release of Azure PowerShell

    • [x] General release
    • [ ] Public preview
    • [ ] Private preview
    • [ ] Engineering build
    • [ ] N/A
  • [x] Check this box to confirm: I have read the Submitting Changes section of CONTRIBUTING.md and reviewed the following information:

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

vedkale avatar Jan 29 '24 21:01 vedkale

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
⚠️Az.ConnectedMachine
️✔️Build
️✔️PowerShell Core - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
⚠️Signature Check
⚠️PowerShell Core - Windows
Type Cmdlet Description Remediation
⚠️ Get-AzConnectedExtensionMetadata Get-AzConnectedExtensionMetadata Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzConnectedExtensionMetadata Get-AzConnectedExtensionMetadata changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️ Get-AzConnectedMachine Get-AzConnectedMachine Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzConnectedMachine Get-AzConnectedMachine changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️ Get-AzConnectedMachineExtension Get-AzConnectedMachineExtension Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzConnectedMachineExtension Get-AzConnectedMachineExtension changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️ Get-AzConnectedMachineRunCommand Get-AzConnectedMachineRunCommand Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzConnectedMachineRunCommand Get-AzConnectedMachineRunCommand changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️ Get-AzConnectedPrivateLinkScope Get-AzConnectedPrivateLinkScope Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzConnectedPrivateLinkScope Get-AzConnectedPrivateLinkScope changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
️✔️Help Example Check
️✔️PowerShell Core - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
⚠️File Change Check
⚠️PowerShell Core - Windows
Type Cmdlet Description Remediation
⚠️ It is required to update ChangeLog.md if you want to release a new version for Az.ConnectedMachine. Add a changelog record under Upcoming Release section with past tense.
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows

I had a question about updating the "tags" property for all our resources - for some reason this property is called "tag" and not "tags" and I can't figure out how to update it. Please let me know how I could fix it

vedkale avatar Jan 29 '24 21:01 vedkale

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

github-actions[bot] avatar Jan 30 '24 03:01 github-actions[bot]

@wyunchi-ms could you help me address this issue

vedkale avatar Jan 30 '24 04:01 vedkale

@wyunchi-ms could you help me address this issue

This issue is about the response's property. Not the input parameter. We accept the tags in response model. Since the response model is generated from swagger. Usually it's because swagger defined the property as tags. If you want to modify it, it's better to confirm with the service team member.

wyunchi-ms avatar Jan 30 '24 05:01 wyunchi-ms

I am a part of the service team, just trying to figure out how I would make the change.

vedkale avatar Jan 30 '24 19:01 vedkale

Do you mean change the swagger or service response?

wyunchi-ms avatar Jan 31 '24 01:01 wyunchi-ms

We use the common types from swagger, so the service sends tags but for some reason powershell module shows tag instead

vedkale avatar Jan 31 '24 01:01 vedkale

Could you please show me the link of swagger?

wyunchi-ms avatar Jan 31 '24 06:01 wyunchi-ms

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/HybridCompute.json

vedkale avatar Jan 31 '24 18:01 vedkale

Do you mean: https://github.com/Azure/azure-rest-api-specs/blob/68030f1c17e0cd5912e1bda17a5f28473e84b5f9/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/HybridCompute.json#L3549 it's tags

wyunchi-ms avatar Feb 01 '24 01:02 wyunchi-ms

That is used for resource updates and this is used to represent the resource. But for some reason the powershell response shows tag instead of tags

image

vedkale avatar Feb 01 '24 02:02 vedkale

Please follow the step: https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#property-rename

wyunchi-ms avatar Feb 01 '24 05:02 wyunchi-ms

Please also fix the failed test case.

msJinLei avatar Feb 06 '24 08:02 msJinLei

We switched to Tags because of this issue: https://github.com/Azure/azure-powershell/issues/19664

vedkale avatar Feb 06 '24 18:02 vedkale

@vedkale LGTM, please leave a message to describe your change here.

msJinLei avatar Feb 07 '24 08:02 msJinLei

  • Added -ScriptLocalPath to New-AzConnectedMachineRunCommand to let users add script files locally.
  • Added machineName parameter to the McahineExtension and MachineRunCommand models

vedkale avatar Feb 20 '24 18:02 vedkale