Skip to content

Commit 2929d24

Browse files
authored
[Az.Synapse] Remove the unnecessary breaking change of parameter '-SparkConfigFilePath' for Spark Pool related cmdlets (#21739)
* Remove the unnecessary breaking change of parameter '-SparkConfigFilePath' for and cmdlets * add breaking changes to Az.Synapse BreakingChangeIssues.csv
1 parent a59ae3d commit 2929d24

File tree

7 files changed

+25
-85
lines changed

7 files changed

+25
-85
lines changed

src/Synapse/Synapse/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Remove the unnecessary breaking change of parameter '-SparkConfigFilePath' for `New-AzSynapseSparkPool` and `Update-AzSynapseSparkPool` cmdlets
2223

2324
## Version 2.3.1
2425
* Updated Azure.Core to 1.31.0.

src/Synapse/Synapse/Commands/ManagementCommands/SparkPool/NewAzureSynapseSparkPool.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using Microsoft.Azure.Commands.Synapse.Properties;
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2222
using Microsoft.Azure.Management.Synapse.Models;
23-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2423
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2524
using System.Collections;
2625
using System.IO;
@@ -130,12 +129,6 @@ public class NewAzureSynapseSparkPool : SynapseManagementCmdletBase
130129
[ValidateNotNullOrEmpty]
131130
public string SparkVersion { get; set; }
132131

133-
[CmdletParameterBreakingChange("SparkConfigFilePath", ReplaceMentCmdletParameterName = "SparkConfiguration")]
134-
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false,
135-
HelpMessage = HelpMessages.SparkConfigPropertiesFilePath)]
136-
[ValidateNotNullOrEmpty]
137-
public string SparkConfigFilePath { get; set; }
138-
139132
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false,
140133
HelpMessage = HelpMessages.SparkConfigurationResource)]
141134
public PSSparkConfigurationResource SparkConfiguration { get; set; }
@@ -195,16 +188,6 @@ public override void ExecuteCmdlet()
195188
}
196189

197190
SparkConfigProperties sparkConfigProperties = null;
198-
if (this.IsParameterBound(c => c.SparkConfigFilePath))
199-
{
200-
string path = this.TryResolvePath(SparkConfigFilePath);
201-
string filename = Path.GetFileNameWithoutExtension(path);
202-
sparkConfigProperties = new SparkConfigProperties()
203-
{
204-
Content = this.ReadFileAsText(this.SparkConfigFilePath),
205-
Filename = filename
206-
};
207-
}
208191

209192
if (this.IsParameterBound(c => c.SparkConfiguration))
210193
{

src/Synapse/Synapse/Commands/ManagementCommands/SparkPool/UpdateAzureSynapseSparkPool.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using Microsoft.Azure.Commands.Synapse.Properties;
2222
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2323
using Microsoft.Azure.Management.Synapse.Models;
24-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2524
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2625
using System;
2726
using System.Collections;
@@ -143,11 +142,6 @@ public class UpdateAzureSynapseSparkPool : SynapseManagementCmdletBase
143142
HelpMessage = HelpMessages.LibraryRequirementsFilePath)]
144143
public string LibraryRequirementsFilePath { get; set; }
145144

146-
[CmdletParameterBreakingChange("SparkConfigFilePath", ReplaceMentCmdletParameterName = "SparkConfiguration")]
147-
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false,
148-
HelpMessage = HelpMessages.SparkConfigPropertiesFilePath)]
149-
public string SparkConfigFilePath { get; set; }
150-
151145
[Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false,
152146
HelpMessage = HelpMessages.SparkConfigurationResource)]
153147
public PSSparkConfigurationResource SparkConfiguration { get; set; }
@@ -222,7 +216,6 @@ public override void ExecuteCmdlet()
222216
existingSparkPool.IsComputeIsolationEnabled = this.EnableIsolatedCompute != null ? this.EnableIsolatedCompute : existingSparkPool.IsComputeIsolationEnabled ?? false;
223217
existingSparkPool.NodeSize = this.IsParameterBound(c => c.NodeSize) ? this.NodeSize : existingSparkPool.NodeSize;
224218
existingSparkPool.LibraryRequirements = this.IsParameterBound(c => c.LibraryRequirementsFilePath) ? CreateLibraryRequirements() : existingSparkPool.LibraryRequirements;
225-
existingSparkPool.SparkConfigProperties = this.IsParameterBound(c => c.SparkConfigFilePath) ? CreateSparkConfigProperties() : existingSparkPool.SparkConfigProperties;
226219
existingSparkPool.SparkVersion = this.IsParameterBound(c => c.SparkVersion) ? this.SparkVersion : existingSparkPool.SparkVersion;
227220

228221
if (this.IsParameterBound(c => c.EnableAutoScale)
@@ -333,22 +326,6 @@ private LibraryRequirements CreateLibraryRequirements()
333326
};
334327
}
335328

336-
private SparkConfigProperties CreateSparkConfigProperties()
337-
{
338-
if (string.IsNullOrEmpty(SparkConfigFilePath))
339-
{
340-
return null;
341-
}
342-
343-
var powerShellDestinationPath = SessionState.Path.GetUnresolvedProviderPathFromPSPath(SparkConfigFilePath);
344-
345-
return new SparkConfigProperties
346-
{
347-
Filename = Path.GetFileName(powerShellDestinationPath),
348-
Content = this.ReadFileAsText(powerShellDestinationPath)
349-
};
350-
}
351-
352329
private class LibraryComparer : IEqualityComparer<LibraryInfo>
353330
{
354331
public bool Equals(LibraryInfo x, LibraryInfo y)

src/Synapse/Synapse/Common/HelpMessages.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ public static class HelpMessages
116116

117117
public const string LibraryRequirementsFilePath = "Environment configuration file (\"PIP freeze\" output).";
118118

119-
public const string SparkConfigPropertiesFilePath = "[Deprecated] Spark pool properties configuration file. This parameter is deprecated, please use \"-SparkConfiguration\" instead.";
120-
121119
public const string SparkConfigurationResource = "Apache Spark configuration. When a job is submitted to the pool, the properties specified in the selected configuration will be referenced.";
122120

123121
public const string Batch = "Indicates Spark batch.";

src/Synapse/Synapse/help/New-AzSynapseSparkPool.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Creates a Synapse Analytics Spark pool.
1717
New-AzSynapseSparkPool [-ResourceGroupName <String>] -WorkspaceName <String> -Name <String> [-Tag <Hashtable>]
1818
[-EnableIsolatedCompute] -NodeSize <String> -AutoScaleMinNodeCount <Int32> -AutoScaleMaxNodeCount <Int32>
1919
[-EnableAutoPause] [-AutoPauseDelayInMinute <Int32>] [-EnableDynamicExecutorAllocation]
20-
[-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfigFilePath <String>]
20+
[-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>] -SparkVersion <String>
2121
[-SparkConfiguration <PSSparkConfigurationResource>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
2222
[-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
@@ -27,17 +27,16 @@ New-AzSynapseSparkPool [-ResourceGroupName <String>] -WorkspaceName <String> -Na
2727
New-AzSynapseSparkPool [-ResourceGroupName <String>] -WorkspaceName <String> -Name <String> [-Tag <Hashtable>]
2828
-NodeCount <Int32> [-EnableIsolatedCompute] -NodeSize <String> [-EnableAutoPause]
2929
[-AutoPauseDelayInMinute <Int32>] [-EnableDynamicExecutorAllocation] [-MinExecutorCount <Int32>]
30-
[-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfigFilePath <String>]
31-
[-SparkConfiguration <PSSparkConfigurationResource>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
32-
[-WhatIf] [-Confirm] [<CommonParameters>]
30+
[-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfiguration <PSSparkConfigurationResource>]
31+
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3332
```
3433

3534
### CreateByParentObjectAndEnableAutoScaleParameterSet
3635
```
3736
New-AzSynapseSparkPool -WorkspaceObject <PSSynapseWorkspace> -Name <String> [-Tag <Hashtable>]
3837
[-EnableIsolatedCompute] -NodeSize <String> -AutoScaleMinNodeCount <Int32> -AutoScaleMaxNodeCount <Int32>
3938
[-EnableAutoPause] [-AutoPauseDelayInMinute <Int32>] [-EnableDynamicExecutorAllocation]
40-
[-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfigFilePath <String>]
39+
[-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>] -SparkVersion <String>
4140
[-SparkConfiguration <PSSparkConfigurationResource>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
4241
[-WhatIf] [-Confirm] [<CommonParameters>]
4342
```
@@ -47,9 +46,8 @@ New-AzSynapseSparkPool -WorkspaceObject <PSSynapseWorkspace> -Name <String> [-Ta
4746
New-AzSynapseSparkPool -WorkspaceObject <PSSynapseWorkspace> -Name <String> [-Tag <Hashtable>]
4847
-NodeCount <Int32> [-EnableIsolatedCompute] -NodeSize <String> [-EnableAutoPause]
4948
[-AutoPauseDelayInMinute <Int32>] [-EnableDynamicExecutorAllocation] [-MinExecutorCount <Int32>]
50-
[-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfigFilePath <String>]
51-
[-SparkConfiguration <PSSparkConfigurationResource>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
52-
[-WhatIf] [-Confirm] [<CommonParameters>]
49+
[-MaxExecutorCount <Int32>] -SparkVersion <String> [-SparkConfiguration <PSSparkConfigurationResource>]
50+
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
5351
```
5452

5553
## DESCRIPTION
@@ -326,21 +324,6 @@ Accept pipeline input: False
326324
Accept wildcard characters: False
327325
```
328326
329-
### -SparkConfigFilePath
330-
[Deprecated] Spark pool properties configuration file. This parameter is deprecated, please use "-SparkConfiguration" instead.
331-
332-
```yaml
333-
Type: System.String
334-
Parameter Sets: (All)
335-
Aliases:
336-
337-
Required: False
338-
Position: Named
339-
Default value: None
340-
Accept pipeline input: False
341-
Accept wildcard characters: False
342-
```
343-
344327
### -SparkConfiguration
345328
Apache Spark configuration. When a job is submitted to the pool, the properties specified in the selected configuration will be referenced.
346329

src/Synapse/Synapse/help/Update-AzSynapseSparkPool.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Update-AzSynapseSparkPool [-ResourceGroupName <String>] -WorkspaceName <String>
1919
[-AutoScaleMaxNodeCount <Int32>] [-EnableAutoPause <Boolean>] [-AutoPauseDelayInMinute <Int32>]
2020
[-NodeCount <Int32>] [-EnableIsolatedCompute <Boolean>] [-NodeSize <String>]
2121
[-EnableDynamicExecutorAllocation <Boolean>] [-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>]
22-
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>] [-SparkConfigFilePath <String>]
22+
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>]
2323
[-SparkConfiguration <PSSparkConfigurationResource>] [-PackageAction <PackageActionType>]
2424
[-Package <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Synapse.Models.WorkspacePackages.PSSynapseWorkspacePackage]>]
2525
[-ForceApplySetting] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
@@ -33,8 +33,8 @@ Update-AzSynapseSparkPool -Name <String> -WorkspaceObject <PSSynapseWorkspace> [
3333
[-EnableAutoPause <Boolean>] [-AutoPauseDelayInMinute <Int32>] [-NodeCount <Int32>]
3434
[-EnableIsolatedCompute <Boolean>] [-NodeSize <String>] [-EnableDynamicExecutorAllocation <Boolean>]
3535
[-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>] [-SparkVersion <String>]
36-
[-LibraryRequirementsFilePath <String>] [-SparkConfigFilePath <String>]
37-
[-SparkConfiguration <PSSparkConfigurationResource>] [-PackageAction <PackageActionType>]
36+
[-LibraryRequirementsFilePath <String>] [-SparkConfiguration <PSSparkConfigurationResource>]
37+
[-PackageAction <PackageActionType>]
3838
[-Package <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Synapse.Models.WorkspacePackages.PSSynapseWorkspacePackage]>]
3939
[-ForceApplySetting] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
4040
[<CommonParameters>]
@@ -46,7 +46,7 @@ Update-AzSynapseSparkPool -InputObject <PSSynapseSparkPool> [-Tag <Hashtable>] [
4646
[-AutoScaleMinNodeCount <Int32>] [-AutoScaleMaxNodeCount <Int32>] [-EnableAutoPause <Boolean>]
4747
[-AutoPauseDelayInMinute <Int32>] [-NodeCount <Int32>] [-EnableIsolatedCompute <Boolean>] [-NodeSize <String>]
4848
[-EnableDynamicExecutorAllocation <Boolean>] [-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>]
49-
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>] [-SparkConfigFilePath <String>]
49+
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>]
5050
[-SparkConfiguration <PSSparkConfigurationResource>] [-PackageAction <PackageActionType>]
5151
[-Package <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Synapse.Models.WorkspacePackages.PSSynapseWorkspacePackage]>]
5252
[-ForceApplySetting] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
@@ -59,7 +59,7 @@ Update-AzSynapseSparkPool -ResourceId <String> [-Tag <Hashtable>] [-EnableAutoSc
5959
[-AutoScaleMinNodeCount <Int32>] [-AutoScaleMaxNodeCount <Int32>] [-EnableAutoPause <Boolean>]
6060
[-AutoPauseDelayInMinute <Int32>] [-NodeCount <Int32>] [-EnableIsolatedCompute <Boolean>] [-NodeSize <String>]
6161
[-EnableDynamicExecutorAllocation <Boolean>] [-MinExecutorCount <Int32>] [-MaxExecutorCount <Int32>]
62-
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>] [-SparkConfigFilePath <String>]
62+
[-SparkVersion <String>] [-LibraryRequirementsFilePath <String>]
6363
[-SparkConfiguration <PSSparkConfigurationResource>] [-PackageAction <PackageActionType>]
6464
[-Package <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Synapse.Models.WorkspacePackages.PSSynapseWorkspacePackage]>]
6565
[-ForceApplySetting] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
@@ -533,21 +533,6 @@ Accept pipeline input: False
533533
Accept wildcard characters: False
534534
```
535535
536-
### -SparkConfigFilePath
537-
[Deprecated] Spark pool properties configuration file. This parameter is deprecated, please use "-SparkConfiguration" instead.
538-
539-
```yaml
540-
Type: System.String
541-
Parameter Sets: (All)
542-
Aliases:
543-
544-
Required: False
545-
Position: Named
546-
Default value: None
547-
Accept pipeline input: False
548-
Accept wildcard characters: False
549-
```
550-
551536
### -SparkConfiguration
552537
Apache Spark configuration. When a job is submitted to the pool, the properties specified in the selected configuration will be referenced.
553538
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"Module","ClassName","Target","Severity","ProblemId","Description","Remediation"
2+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","2000","The cmdlet 'New-AzSynapseSparkPool' no longer supports the parameter 'SparkConfigFilePath' and no alias was found for the original parameter name.","Add the parameter 'SparkConfigFilePath' back to the cmdlet 'New-AzSynapseSparkPool', or add an alias to the original parameter name."
3+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","1050","The parameter set 'CreateByNameAndEnableAutoScaleParameterSet' for cmdlet 'New-AzSynapseSparkPool' has been removed.","Add parameter set 'CreateByNameAndEnableAutoScaleParameterSet' back to cmdlet 'New-AzSynapseSparkPool'."
4+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","1050","The parameter set 'CreateByNameAndDisableAutoScaleParameterSet' for cmdlet 'New-AzSynapseSparkPool' has been removed.","Add parameter set 'CreateByNameAndDisableAutoScaleParameterSet' back to cmdlet 'New-AzSynapseSparkPool'."
5+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","1050","The parameter set 'CreateByParentObjectAndEnableAutoScaleParameterSet' for cmdlet 'New-AzSynapseSparkPool' has been removed.","Add parameter set 'CreateByParentObjectAndEnableAutoScaleParameterSet' back to cmdlet 'New-AzSynapseSparkPool'."
6+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","1050","The parameter set 'CreateByParentObjectAndDisableAutoScaleParameterSet' for cmdlet 'New-AzSynapseSparkPool' has been removed.","Add parameter set 'CreateByParentObjectAndDisableAutoScaleParameterSet' back to cmdlet 'New-AzSynapseSparkPool'."
7+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.NewAzureSynapseSparkPool","New-AzSynapseSparkPool","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzSynapseSparkPool' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzSynapseSparkPool'."
8+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","2000","The cmdlet 'Update-AzSynapseSparkPool' no longer supports the parameter 'SparkConfigFilePath' and no alias was found for the original parameter name.","Add the parameter 'SparkConfigFilePath' back to the cmdlet 'Update-AzSynapseSparkPool', or add an alias to the original parameter name."
9+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","1050","The parameter set 'SetByNameParameterSet' for cmdlet 'Update-AzSynapseSparkPool' has been removed.","Add parameter set 'SetByNameParameterSet' back to cmdlet 'Update-AzSynapseSparkPool'."
10+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","1050","The parameter set 'SetByParentObjectParameterSet' for cmdlet 'Update-AzSynapseSparkPool' has been removed.","Add parameter set 'SetByParentObjectParameterSet' back to cmdlet 'Update-AzSynapseSparkPool'."
11+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","1050","The parameter set 'SetByInputObjectParameterSet' for cmdlet 'Update-AzSynapseSparkPool' has been removed.","Add parameter set 'SetByInputObjectParameterSet' back to cmdlet 'Update-AzSynapseSparkPool'."
12+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","1050","The parameter set 'SetByResourceIdParameterSet' for cmdlet 'Update-AzSynapseSparkPool' has been removed.","Add parameter set 'SetByResourceIdParameterSet' back to cmdlet 'Update-AzSynapseSparkPool'."
13+
"Az.Synapse","Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseSparkPool","Update-AzSynapseSparkPool","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Update-AzSynapseSparkPool' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Update-AzSynapseSparkPool'."

0 commit comments

Comments
 (0)