Skip to content

Conversation

@JoyerJin
Copy link
Contributor

@JoyerJin JoyerJin commented Jun 5, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • 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.
    • 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

Copilot AI review requested due to automatic review settings June 5, 2025 02:41
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the Relay PowerShell module to AutoRest v4 by updating documentation, cmdlet scripts, and generated metadata to use the new model namespaces and unified parameter handling.

  • Switched model references from the old Api20211101 namespace to the top-level model namespaces.
  • Updated all cmdlet docs to include expanded, JSON file, and JSON string parameter sets; changed enum-backed parameters to System.String.
  • Regenerated assembly metadata and added PSArgumentCompleter attributes in cmdlet scripts.

Reviewed Changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Relay/Relay.Autorest/docs/New-AzRelayNetworkRuleSetIPRuleObject.md Updated online link, changed -Action type to String.
src/Relay/Relay.Autorest/docs/New-AzRelayNamespace.md Introduced multiple create variants, changed -SkuTier to String.
src/Relay/Relay.Autorest/docs/New-AzRelayKey.md Added JSON file/string syntaxes, changed -RegenerateKey to String.
src/Relay/Relay.Autorest/docs/New-AzRelayHybridConnection.md Added CreateViaIdentityNamespace and JSON syntaxes, updated synopsis.
src/Relay/Relay.Autorest/docs/New-AzRelayAuthorizationRule.md Added JSON file/string syntaxes, changed -Rights to String[].
src/Relay/Relay.Autorest/docs/Get-AzWcfRelay.md Added GetViaIdentityNamespace variant, updated output model reference.
src/Relay/Relay.Autorest/docs/Get-AzRelayNamespaceNetworkRuleSet.md Updated output model reference.
src/Relay/Relay.Autorest/docs/Get-AzRelayNamespace.md Updated output model reference.
src/Relay/Relay.Autorest/docs/Get-AzRelayKey.md Updated output model reference.
src/Relay/Relay.Autorest/docs/Get-AzRelayHybridConnection.md Added GetViaIdentityNamespace variant, updated model references.
src/Relay/Relay.Autorest/docs/Get-AzRelayAuthorizationRule.md Updated output model reference.
src/Relay/Relay.Autorest/docs/Az.Relay.md Updated Module GUID and cmdlet synopses to use “Create”/“Update” phrasing.
src/Relay/Relay.Autorest/custom/autogen-model-cmdlets/New-AzRelayNetworkRuleSetIPRuleObject.ps1 Switched output type, added PSArgumentCompleter attribute for -Action.
src/Relay/Relay.Autorest/custom/Set-AzWcfRelay.ps1 Updated input/output model refs, added string parameter & completer for WcfRelayType.
src/Relay/Relay.Autorest/custom/Set-AzRelayNamespaceNetworkRuleSet.ps1 Updated model refs, added string parameter & completers for DefaultAction & PublicNetworkAccess.
src/Relay/Relay.Autorest/custom/Set-AzRelayHybridConnection.ps1 Updated model references.
src/Relay/Relay.Autorest/custom/Set-AzRelayAuthorizationRule.ps1 Updated model references, added PSArgumentCompleter for -Rights.
src/Relay/Relay.Autorest/custom/Get-AzRelayAuthorizationRule.ps1 Updated output model reference.
src/Relay/Relay.Autorest/README.md Removed outdated AutoRest 3.x directives and revised model-cmdlet mapping.
src/Relay/Relay.Autorest/Properties/AssemblyInfo.cs Added generated assembly metadata for version 2.1.0.

@vidai-msft
Copy link
Contributor

@Pan-Qi Please help review the README.md

"Az.Relay","Get-AzRelayAuthorizationRule","Get-AzRelayAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.Api20211101.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]'."
"Az.Relay","Get-AzRelayHybridConnection","Get-AzRelayHybridConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.Api20211101.IHybridConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]'."
"Az.Relay","Get-AzRelayHybridConnection","Get-AzRelayHybridConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.Api20211101.IHybridConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Support.CreatedByType]'."
"Az.Relay","Get-AzRelayNamespace","Get-AzRelayNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.Api20211101.IRelayNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.Relay.Models.IPrivateEndpointConnection'."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this scenario a breaking change? The type are changed from a normal object to List.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I miss this. And below two are the same.

@vidai-msft vidai-msft added the Contains Breaking Change This PR contains breaking change label Jun 16, 2025
@github-actions
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

@vidai-msft vidai-msft marked this pull request as draft June 16, 2025 06:51
@JoyerJin JoyerJin marked this pull request as ready for review August 6, 2025 07:08
@isra-fel isra-fel added the autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 label Oct 2, 2025
@Pan-Qi Pan-Qi added Breaking change PR reviewed Add this label after a PR with breaking change has been reviewed and approved. Breaking change PR migration guide provided Add this label after the migration guide is provided by the PR owner labels Nov 6, 2025
@dolauli dolauli merged commit 2f92848 into main Nov 6, 2025
14 checks passed
@dolauli dolauli deleted the joyer/relay-migrate-v4 branch November 6, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 Breaking change PR migration guide provided Add this label after the migration guide is provided by the PR owner Breaking change PR reviewed Add this label after a PR with breaking change has been reviewed and approved. Contains Breaking Change This PR contains breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants