From c8b77c767898d86eca664bf002bee8258a1c9a19 Mon Sep 17 00:00:00 2001 From: Lucas Yao Date: Wed, 15 Feb 2023 15:20:23 +0800 Subject: [PATCH 1/3] [Relay]add breaking change for cmdlets. --- src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs | 2 ++ src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs b/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs index 806ced9a1598..448aa580f3b8 100644 --- a/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs +++ b/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs @@ -14,6 +14,7 @@ using Microsoft.Azure.Commands.Relay.Models; using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.ResourceManager.Common.Tags; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Collections; using System.Collections.Generic; using System.Management.Automation; @@ -23,6 +24,7 @@ namespace Microsoft.Azure.Commands.Relay.Commands.Namespace /// /// 'Set-AzRelayNamespace' Cmdlet updates the specified Relay Namespace /// + [GenericBreakingChange("Set-AzRelayNamespace will be removed in an upcoming breaking change release, you can use Update-AzRelayNamespace in a future release")] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RelayNamespace", SupportsShouldProcess = true), OutputType(typeof(PSRelayNamespaceAttributes))] public class SetAzureRelayNamespace : AzureRelayCmdletBase { diff --git a/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs b/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs index 536390673d9b..67c0b73888ec 100644 --- a/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs +++ b/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs @@ -17,12 +17,14 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.Azure.Commands.Relay.Commands.Namespace { /// /// 'Get-AzRelayOperation' Cmdlet retrive the Operations List /// + [GenericBreakingChange("Get-AzRelayOperation will be removed in an upcoming breaking change release. Please use 'Get-AzProviderOperation Microsoft.Relay/*'")] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RelayOperation"), OutputType(typeof(PSOperationAttributes))] public class GetAzureRmRelayOperation : AzureRelayCmdletBase { From c85ada053b51241eeabe4ea711903bd883c8475f Mon Sep 17 00:00:00 2001 From: Lucas Yao Date: Wed, 15 Feb 2023 15:22:49 +0800 Subject: [PATCH 2/3] [Relay]updated changelog.md. --- src/Relay/Relay/ChangeLog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Relay/Relay/ChangeLog.md b/src/Relay/Relay/ChangeLog.md index c94578e549dc..846b573f7645 100644 --- a/src/Relay/Relay/ChangeLog.md +++ b/src/Relay/Relay/ChangeLog.md @@ -18,6 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release +* Added breaking change message for cmdlets. + * `Set-AzRelayNamespace` + * `Get-AzRelayOperation` ## Version 1.0.3 * Update references in .psd1 to use relative path From f87a974eccf70238672f4ec4a14e41504998bdc8 Mon Sep 17 00:00:00 2001 From: Lucas Yao Date: Fri, 17 Feb 2023 13:38:49 +0800 Subject: [PATCH 3/3] [Relay]add target version for breaking change. --- src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs | 2 +- src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs b/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs index 448aa580f3b8..f0e517e99e4a 100644 --- a/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs +++ b/src/Relay/Relay/Cmdlets/Namespace/SetAzureRelayNamespace.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Relay.Commands.Namespace /// /// 'Set-AzRelayNamespace' Cmdlet updates the specified Relay Namespace /// - [GenericBreakingChange("Set-AzRelayNamespace will be removed in an upcoming breaking change release, you can use Update-AzRelayNamespace in a future release")] + [GenericBreakingChange("Set-AzRelayNamespace will be removed in an upcoming breaking change release, you can use Update-AzRelayNamespace in a future release", "2.0.0")] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RelayNamespace", SupportsShouldProcess = true), OutputType(typeof(PSRelayNamespaceAttributes))] public class SetAzureRelayNamespace : AzureRelayCmdletBase { diff --git a/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs b/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs index 67c0b73888ec..4a2b26ea3558 100644 --- a/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs +++ b/src/Relay/Relay/Cmdlets/Operations/GetAzureRelayOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Relay.Commands.Namespace /// /// 'Get-AzRelayOperation' Cmdlet retrive the Operations List /// - [GenericBreakingChange("Get-AzRelayOperation will be removed in an upcoming breaking change release. Please use 'Get-AzProviderOperation Microsoft.Relay/*'")] + [GenericBreakingChange("Get-AzRelayOperation will be removed in an upcoming breaking change release. Please use 'Get-AzProviderOperation Microsoft.Relay/*'", "2.0.0")] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RelayOperation"), OutputType(typeof(PSOperationAttributes))] public class GetAzureRmRelayOperation : AzureRelayCmdletBase {