Skip to content

Commit 8142d9f

Browse files
author
begoldsm
committed
revert breaking change and add exceptions
1 parent bb828c6 commit 8142d9f

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SubmitAzureRmDataLakeAnalyticsJob.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public SwitchParameter USql
221221
HelpMessage =
222222
"The degree of parallelism to use for this job. Typically, a higher degree of parallelism dedicated to a script results in faster script execution time."
223223
)]
224-
[ValidateRange(1, int.MaxValue)]
225224
public int DegreeOfParallelism
226225
{
227226
get { return _degreeOfParallelism; }
@@ -333,6 +332,11 @@ public int Priority
333332

334333
public override void ExecuteCmdlet()
335334
{
335+
if(DegreeOfParallelism < 1)
336+
{
337+
WriteWarning(Resources.InvalidDegreeOfParallelism);
338+
}
339+
336340
// error handling for not passing or passing both script and script path
337341
if ((string.IsNullOrEmpty(Script) && string.IsNullOrEmpty(ScriptPath)) ||
338342
(!string.IsNullOrEmpty(Script) && !string.IsNullOrEmpty(ScriptPath)))

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,7 @@
264264
<data name="RemoveDataLakeAnalyticsComputePolicy" xml:space="preserve">
265265
<value>Removing Data Lake Analytics compute policy: '{0}' ...</value>
266266
</data>
267+
<data name="InvalidDegreeOfParallelism" xml:space="preserve">
268+
<value>Zero and negative values will no longer be defaulted to one, nor will they be accepted, in a future release for -DegreeOfParallelism. Please adjust your scripts to pass in a value greater than zero</value>
269+
</data>
267270
</root>

tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@
3636
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureNetworkWatcherPacketCaptureCommand","Remove-AzureRmNetworkWatcherPacketCapture","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'ResourceGroupName' for cmdlet 'Remove-AzureRmNetworkWatcherPacketCapture'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'ResourceGroupName'."
3737
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.StopAzureNetworkWatcherPacketCaptureCommand","Stop-AzureRmNetworkWatcherPacketCapture","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'NetworkWatcherName' for cmdlet 'Stop-AzureRmNetworkWatcherPacketCapture'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'NetworkWatcherName'."
3838
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.StopAzureNetworkWatcherPacketCaptureCommand","Stop-AzureRmNetworkWatcherPacketCapture","0","2090","The ValidateNotNullOrEmpty attribute has been added to parameter 'ResourceGroupName' for cmdlet 'Stop-AzureRmNetworkWatcherPacketCapture'.","Remove the ValidateNotNullOrEmpty attribute from parameter 'ResourceGroupName'."
39+
"D:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.DataLakeAnalytics\Microsoft.Azure.Commands.DataLakeAnalytics.dll","Microsoft.Azure.Commands.DataLakeAnalytics.SubmitAzureDataLakeAnalyticsJob","Submit-AzureRmDataLakeAnalyticsJob","0","1050","The parameter set 'Submit job with script path for SQL-IP' for cmdlet 'Submit-AzureRmDataLakeAnalyticsJob' has been removed.","Add parameter set 'Submit job with script path for SQL-IP' back to cmdlet 'Submit-AzureRmDataLakeAnalyticsJob'."
40+
"D:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.DataLakeAnalytics\Microsoft.Azure.Commands.DataLakeAnalytics.dll","Microsoft.Azure.Commands.DataLakeAnalytics.SubmitAzureDataLakeAnalyticsJob","Submit-AzureRmDataLakeAnalyticsJob","0","1050","The parameter set 'Submit SQL-IP Job' for cmdlet 'Submit-AzureRmDataLakeAnalyticsJob' has been removed.","Add parameter set 'Submit SQL-IP Job' back to cmdlet 'Submit-AzureRmDataLakeAnalyticsJob'."

0 commit comments

Comments
 (0)