Skip to content

Commit 65304ff

Browse files
isra-felmsJinLei
andauthored
Remove stale breaking changes (#22167)
* remove stale breaing change warnings * update common library to 57 * Migrate breaking change attributes for those we keep * misc * Update commonlib version to 1.3.78 --------- Co-authored-by: msJinLei <[email protected]>
1 parent 0454249 commit 65304ff

File tree

164 files changed

+446
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+446
-431
lines changed

UpcommingBreakingChange.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Upcoming breaking changes in Azure PowerShell
2+
3+
## Az.Aks
4+
5+
### `New-AzAksCluster`
6+
7+
- Parameter breaking-change will happen to all parameter sets
8+
- `-DockerBridgeCidr`
9+
- DockerBridgeCidr parameter will be deprecated in Az 11.0.0 without being replaced.
10+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
11+
12+
## Az.Compute
13+
14+
### `New-AzDisk`
15+
16+
- Cmdlet breaking-change will happen to all parameter set
17+
- Starting in November 2023 the "New-AzDisk" cmdlet will deploy with the Trusted Launch configuration by default. This includes defaulting the "HyperVGeneration" parameter to "v2". To know more about Trusted Launch, please visit https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch
18+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
19+
20+
### `New-AzVM`
21+
22+
- Cmdlet breaking-change will happen to all parameter set
23+
- Consider using the image alias including the version of the distribution you want to use in the "-Image" parameter of the "New-AzVM" cmdlet. On April 30, 2023, the image deployed using `UbuntuLTS` will reach its end of life. In October 2023, the aliases `UbuntuLTS`, `CentOS`, `Debian`, and `RHEL` will be removed.
24+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
25+
- Starting in November 2023 the "New-AzVM" cmdlet will deploy with the Trusted Launch configuration by default. To know more about Trusted Launch, please visit https://docs.microsoft.com/en-us/azure/virtual-machines/trusted-launch
26+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
27+
28+
### `New-AzVmss`
29+
30+
- Cmdlet breaking-change will happen to all parameter set
31+
- Starting November 2023, the "New-AzVmss" cmdlet will default to Trusted Launch VMSS. For more info, visit https://aka.ms/trustedLaunchVMSS.
32+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
33+
- Starting November 2023, the "New-AzVmss" cmdlet will use new defaults: Flexible orchestration mode and enable NATv2 configuration for Load Balancer. To learn more about Flexible Orchestration modes, visit https://aka.ms/orchestrationModeVMSS.
34+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
35+
- Consider using the image alias including the version of the distribution you want to use in the "-ImageName" parameter of the "New-AzVmss" cmdlet. On April 30, 2023, the image deployed using `UbuntuLTS` will reach its end of life. In November 2023, the aliases `UbuntuLTS`, `CentOS`, `Debian`, and `RHEL` will be removed.
36+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
37+
38+
## Az.DesktopVirtualization
39+
40+
### `New-AzWvdScalingPlan`
41+
42+
- Parameter breaking-change will happen to all parameter sets
43+
- `-HostPoolType`
44+
- The parameter : 'HostPoolType' is changing.
45+
- The change is expected to take effect from the version : '4.0.0'
46+
47+
## Az.PowerBIEmbedded
48+
49+
### `Get-AzPowerBIWorkspace`
50+
51+
- Cmdlet breaking-change will happen to all parameter set
52+
- The cmdlet is being deprecated. There will be no replacement for it.
53+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
54+
55+
### `Get-AzPowerBIWorkspaceCollection`
56+
57+
- Cmdlet breaking-change will happen to all parameter set
58+
- The cmdlet is being deprecated. There will be no replacement for it.
59+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
60+
61+
### `Get-AzPowerBIWorkspaceCollectionAccessKey`
62+
63+
- Cmdlet breaking-change will happen to all parameter set
64+
- The cmdlet is being deprecated. There will be no replacement for it.
65+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
66+
67+
### `New-AzPowerBIWorkspaceCollection`
68+
69+
- Cmdlet breaking-change will happen to all parameter set
70+
- The cmdlet is being deprecated. There will be no replacement for it.
71+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
72+
73+
### `Remove-AzPowerBIWorkspaceCollection`
74+
75+
- Cmdlet breaking-change will happen to all parameter set
76+
- The cmdlet is being deprecated. There will be no replacement for it.
77+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
78+
79+
### `Reset-AzPowerBIWorkspaceCollectionAccessKey`
80+
81+
- Cmdlet breaking-change will happen to all parameter set
82+
- The cmdlet is being deprecated. There will be no replacement for it.
83+
- This change is expected to take effect from version: 2.0.0 and Az version: 11.0.0
84+
85+
## Az.RecoveryServices
86+
87+
### `Get-AzRecoveryServicesVaultSettingsFile`
88+
89+
- Parameter breaking-change will happen to all parameter sets
90+
- `-Certificate`
91+
- Parameter is being deprecated without being replaced
92+
- This change is expected to take effect from version: 7.0.0 and Az version: 11.0.0
93+
94+
## Az.Storage
95+
96+
### `New-AzDataLakeGen2SasToken`
97+
98+
- Cmdlet breaking-change will happen to all parameter set
99+
- The leading question mark '?' of the created SAS token will be removed in a future release.
100+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
101+
102+
### `New-AzStorageAccount`
103+
104+
- Cmdlet breaking-change will happen to all parameter set
105+
- Default value of AllowBlobPublicAccess and AllowCrossTenantReplication will be changed from True to False in a future release.
106+
When AllowBlobPublicAccess is False on a storage account, it is not permitted to configure container ACLs to allow anonymous access to blobs within the storage account.
107+
When AllowCrossTenantReplication is False on a storage account, cross AAD tenant object replication is not allowed.
108+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
109+
110+
### `New-AzStorageAccountSASToken`
111+
112+
- Cmdlet breaking-change will happen to all parameter set
113+
- The leading question mark '?' of the created SAS token will be removed in a future release.
114+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
115+
116+
### `New-AzStorageBlobSASToken`
117+
118+
- Cmdlet breaking-change will happen to all parameter set
119+
- The leading question mark '?' of the created SAS token will be removed in a future release.
120+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
121+
122+
### `New-AzStorageContainerSASToken`
123+
124+
- Cmdlet breaking-change will happen to all parameter set
125+
- The leading question mark '?' of the created SAS token will be removed in a future release.
126+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
127+
128+
### `New-AzStorageContext`
129+
130+
- Parameter breaking-change will happen to all parameter sets
131+
- `-SasToken`
132+
- The SAS token in created Storage context properties 'ConnectionString' and 'StorageAccount.Credentials' won't have the leading question mark '?' in a future release.
133+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
134+
135+
### `New-AzStorageFileSASToken`
136+
137+
- Cmdlet breaking-change will happen to all parameter set
138+
- The leading question mark '?' of the created SAS token will be removed in a future release.
139+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
140+
141+
### `New-AzStorageQueueSASToken`
142+
143+
- Cmdlet breaking-change will happen to all parameter set
144+
- The leading question mark '?' of the created SAS token will be removed in a future release.
145+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
146+
147+
### `New-AzStorageShareSASToken`
148+
149+
- Cmdlet breaking-change will happen to all parameter set
150+
- The leading question mark '?' of the created SAS token will be removed in a future release.
151+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
152+
153+
### `New-AzStorageTableSASToken`
154+
155+
- Cmdlet breaking-change will happen to all parameter set
156+
- The leading question mark '?' of the created SAS token will be removed in a future release.
157+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
158+
159+
### `Set-AzStorageAccount`
160+
161+
- Parameter breaking-change will happen to all parameter sets
162+
- `-EnableLargeFileShare`
163+
- EnableLargeFileShare parameter will be deprecated in a future release.
164+
- This change is expected to take effect from version: 6.0.0 and Az version: 11.0.0
165+

documentation/development-docs/breakingchange-for-autogen-module.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
1717
set:
1818
breaking-change:
1919
deprecated-by-version: 5.0.0
20+
deprecated-by-azversion: 20.0.0
2021
change-effective-date: 2055/10/30
2122
```
2223
@@ -30,6 +31,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
3031
breaking-change:
3132
replacement-cmdlet: New-AzNewVNetPeering
3233
deprecated-by-version: 5.0.0
34+
deprecated-by-azversion: 20.0.0
3335
change-effective-date: 2022/05/30
3436
```
3537
@@ -42,6 +44,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
4244
breaking-change:
4345
replacement-cmdlet: $.replace("VNetPeering", "VNewNetPeering")
4446
deprecated-by-version: 5.0.0
47+
deprecated-by-version: 20.0.0
4548
change-effective-date: 2022/05/30
4649
```
4750
@@ -63,6 +66,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
6366
- PropertyD
6467
change-description: This is a custom message for the change.
6568
deprecated-by-version: 5.0.0
69+
deprecated-by-version: 20.0.0
6670
change-effective-date: 2022/05/11
6771
```
6872
@@ -76,6 +80,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
7680
set:
7781
breaking-change:
7882
deprecated-by-version: 5.0.0
83+
deprecated-by-azversion: 5.0.0
7984
change-effective-date: 2022/05/30
8085
```
8186
@@ -91,6 +96,7 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
9196
become-mandatory: true
9297
change-description: This is a custom message for the change.
9398
deprecated-by-version: 5.0.0
99+
deprecated-by-version: 20.0.0
94100
change-effective-date: 2022/05/30
95101
```
96102
@@ -108,32 +114,32 @@ Breaking changes and preview messages for auto gen cmdlets are added through dir
108114
109115
To add breaking changes or preview messages for a customized cmdlets, you will need to add related attributes in code directly. And following are some common cases.
110116
111-
(For Case 1/2/3/5, the attributes are applied on the functions. For case 5, the attribute is applied in the parameter.)
117+
You must provide expected breaking change az version and moudle verision otherwise it won't compile. The first version is expected az version while the second one is expected moudle verision.
112118
113119
**Note: these examples are based on the Az.Databricks module. Please double check the namesapce. You will most likely need to replace "Databricks" with your module's name.**
114120
115-
## Case 1 — Breaking change for a cmdlet
121+
## Case 1 — Generic Breaking change for a cmdlet
116122
117123
```csharp
118-
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.CmdletBreakingChangeAttribute("4.0", "2022/05/30", ReplacementCmdletName = 'replace-xxx')
124+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.GenericBreakingChangeWithVersionAttribute("16.0.0", "4.0.0", "2022/05/30")
119125
```
120126

121-
## Case 2 — Breaking change for parameter sets(variants)
127+
## Case 2 — Breaking change for a cmdlet
122128

123129
```csharp
124-
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.ParameterSetBreakingChangeAttribute(("parametersetname1", "parametersetname2"), "4.0", "2022/05/30")]
130+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.CmdletDeprecationWithVersionAttribute("16.0.0", "4.0.0", "2022/05/30", ReplacementCmdletName = 'replace-xxx')
125131
```
126132

127133
## Case 3 — Breaking change for an output type
128134

129135
```csharp
130-
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.OutputBreakingChange("oldtype", "5.0.0", "2022/05/11", ReplacementCmdletOutputType = "newtype", DeprecatedOutputProperties = ("propertyA", "PropertyB"), NewOutputProperties = ("PropertyC", "PropertyD"))]
136+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.CmdletOutputBreakingChangeWithVersionAttribute("oldtype", "11.0.0", "5.0.0", "2022/05/11", ReplacementCmdletOutputType = "newtype", DeprecatedOutputProperties = ("propertyA", "PropertyB"), NewOutputProperties = ("PropertyC", "PropertyD"))]
131137
```
132138

133139
## Case 4 — Breaking change for a parameter
134140

135141
```csharp
136-
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.ParameterBreakingChangeAttribute("ResourceGroupName", "4.1", "2028/06/18")]
142+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.CmdletParameterBreakingChangeWithVersionAttribute("ResourceGroupName", "11.0.0", "4.1.0", "2028/06/18")]
137143
```
138144

139145
## Case 5 — Preview message

src/Accounts/Accounts/Errors/ResolveError.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
22
//
33
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,7 +25,6 @@
2525

2626
namespace Microsoft.Azure.Commands.Profile.Errors
2727
{
28-
[GenericBreakingChange("The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead.")]
2928
[Alias("Resolve-Error")]
3029
[Cmdlet("Resolve", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Error", DefaultParameterSetName = ResolveError.AnyErrorParameterSet)]
3130
[OutputType(typeof(AzureErrorRecord))]

src/Aks/Aks/Commands/NewAzureRmAks.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
22
//
33
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -103,7 +103,7 @@ public class NewAzureRmAks : CreateOrUpdateKubeBase
103103
[Parameter(Mandatory = false, HelpMessage = "DNS service IP used for building Kubernetes network.")]
104104
public string DnsServiceIP { get; set; }
105105

106-
[CmdletParameterBreakingChange("DockerBridgeCidr", "6.0.0", ChangeDescription = "DockerBridgeCidr parameter will be deprecated in Az 11.0.0 without being replaced.")]
106+
[CmdletParameterBreakingChangeWithVersion("DockerBridgeCidr", "11.0.0", "6.0.0", ChangeDescription = "DockerBridgeCidr parameter will be deprecated in Az 11.0.0 without being replaced.")]
107107
[Parameter(Mandatory = false, HelpMessage = "Docker bridge cidr used for building Kubernetes network.")]
108108
public string DockerBridgeCidr { get; set; }
109109

@@ -481,7 +481,7 @@ private ManagedClusterWindowsProfile GetWindowsProfile()
481481
{
482482
windowsProfile = new ManagedClusterWindowsProfile(WindowsProfileAdminUserName,
483483
WindowsProfileAdminUserPassword?.ConvertToString());
484-
if (this.IsParameterBound(c => c.EnableAHUB) && EnableAHUB.ToBool())
484+
if (this.IsParameterBound(c => c.EnableAHUB) && EnableAHUB.ToBool())
485485
{
486486
windowsProfile.LicenseType = "Windows_Server";
487487
}
@@ -587,15 +587,15 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile()
587587
}
588588
if (EnableFIPS.IsPresent)
589589
{
590-
defaultAgentPoolProfile.EnableFIPS = EnableFIPS.ToBool();
590+
defaultAgentPoolProfile.EnableFIPS = EnableFIPS.ToBool();
591591
}
592592
if (this.IsParameterBound(c => c.GpuInstanceProfile))
593593
{
594594
defaultAgentPoolProfile.GpuInstanceProfile = GpuInstanceProfile;
595595
}
596596
if (this.IsParameterBound(c => c.NodeHostGroupID)) {
597597
defaultAgentPoolProfile.HostGroupID = NodeHostGroupID;
598-
}
598+
}
599599

600600
defaultAgentPoolProfile.Mode = NodePoolMode;
601601

src/AnalysisServices/AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
22
//
33
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,7 +23,6 @@ namespace Microsoft.Azure.Commands.AnalysisServices.Dataplane
2323
/// <summary>
2424
/// Cmdlet to log into an Analysis Services environment
2525
/// </summary>
26-
[CmdletDeprecation("2.0.0")]
2726
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzurePrefix + "AnalysisServicesAccount", DefaultParameterSetName = "UserParameterSetName", SupportsShouldProcess =true)]
2827
[Alias("Login-AzureAsAccount", "Login-AzAsAccount")]
2928
[OutputType(typeof(AsAzureProfile))]

src/ApiManagement/ApiManagement.ServiceManagement/Commands/NewAzureApiManagementOperation.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -90,15 +90,13 @@ public class NewAzureApiManagementOperation : AzureApiManagementCmdletBase
9090
public PsApiManagementParameter[] TemplateParameters { get; set; }
9191

9292
public const String ChangeDesc = "Change Request.Representations.Sample to Request.Representations.Example";
93-
[CmdletParameterBreakingChange("Request.Representations.Sample", ChangeDescription = ChangeDesc)]
9493
[Parameter(
9594
ValueFromPipelineByPropertyName = true,
9695
Mandatory = false,
9796
HelpMessage = "Operation request details. This parameter is optional.")]
9897
public PsApiManagementRequest Request { get; set; }
9998

10099
public const String ChangeDesc2 = "Change Responses.Representations.Sample to Responses.Representations.Example";
101-
[CmdletParameterBreakingChange("Responses.Representations.Sample", ChangeDescription = ChangeDesc2)]
102100
[Parameter(
103101
ValueFromPipelineByPropertyName = true,
104102
Mandatory = false,

src/ApiManagement/ApiManagement.ServiceManagement/Commands/SetAzureApiManagementOperation.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -90,15 +90,13 @@ public class SetAzureApiManagementOperation : AzureApiManagementCmdletBase
9090
public PsApiManagementParameter[] TemplateParameters { get; set; }
9191

9292
public const String ChangeDesc = "Change Request.Representations.Sample Request.Representations.Example";
93-
[CmdletParameterBreakingChange("Request", ChangeDescription = ChangeDesc)]
9493
[Parameter(
9594
ValueFromPipelineByPropertyName = true,
9695
Mandatory = false,
9796
HelpMessage = "Operation request details. This parameter is optional.")]
9897
public PsApiManagementRequest Request { get; set; }
9998

10099
public const String ChangeDesc2 = "Change Responses.Representations.Sample to Responses.Representations.Example";
101-
[CmdletParameterBreakingChange("Responses", ChangeDescription = ChangeDesc2)]
102100
[Parameter(
103101
ValueFromPipelineByPropertyName = true,
104102
Mandatory = false,

src/ApiManagement/ApiManagement/Commands/UpdateAzureApiManagementRegion.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,7 +39,6 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
3939
[ValidateNotNullOrEmpty]
4040
public string Location { get; set; }
4141

42-
[CmdletParameterBreakingChange("Sku", OldParamaterType = typeof(PsApiManagementSku), NewParameterTypeName = nameof(String))]
4342
[Parameter(
4443
ValueFromPipelineByPropertyName = true,
4544
Mandatory = true,

0 commit comments

Comments
 (0)