Skip to content

[Synapse] Added spark pool dynamicExecutorAllocation related parameter #19286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Synapse/Synapse.Test/ScenarioTests/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function Get-SqlBlobAuditingTestEnvironmentParameters ($testSuffix)
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
perfLevel = 'DW200c';
location = "canadacentral";
location = "eastus";
eventHubNamespace = "audit-cmdlet-event-hub-ns" + $testSuffix
logworkspaceName = "audit-cmdlet-logworkspace" +$testSuffix
storageAccountResourceId = "/subscriptions/" + $subscriptionId + "/resourceGroups/" + "audit-cmdlet-test-rg" + $testSuffix + "/providers/Microsoft.Storage/storageAccounts/" + "sqlstorage" + $testSuffix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function Remove-DataClassificationTestEnvironment ($testSuffix)
.SYNOPSIS
Creates the test environment needed to perform the tests
#>
function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "canadacentral")
function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "eastus")
{
$params = Get-DataClassificationTestEnvironmentParameters $testSuffix

Expand Down
2 changes: 1 addition & 1 deletion src/Synapse/Synapse.Test/ScenarioTests/FirewallTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function Get-FirewallRuleTestEnvironmentParameters ($testSuffix)
fileSystemName = "fwcmdletfs" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
location = "canadacentral";
location = "eastus";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
fileSystemName = "wscmdletfs" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
location = "canadacentral";
location = "eastus";
}
}

Expand Down
16 changes: 11 additions & 5 deletions src/Synapse/Synapse.Test/ScenarioTests/SparkPoolTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ function Test-SynapseSparkPool
Assert-NotNull $sparkPoolUpdated.Tags "Tags do not exists"
Assert-NotNull $sparkPoolUpdated.Tags["TestTag"] "The updated tag 'TestTag' does not exist"

# Enable Auto-scale and Auto-pause
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $true -AutoScaleMinNodeCount 3 -AutoScaleMaxNodeCount 10 -EnableAutoPause $true -AutoPauseDelayInMinute 15
# Enable Auto-scale and Auto-pause, DynamicExecutorAllocation
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $true -AutoScaleMinNodeCount 3 -AutoScaleMaxNodeCount 10 -EnableAutoPause $true -AutoPauseDelayInMinute 15 -EnableDynamicExecutorAllocation $true -MinExecutorCount 1 -MaxExecutorCount 5

Assert-AreEqual $sparkPoolName $sparkPoolUpdated.Name
Assert-AreEqual $location $sparkPoolUpdated.Location
Expand All @@ -91,8 +91,12 @@ function Test-SynapseSparkPool
Assert-True {$sparkPoolUpdated.AutoPause.Enabled}
Assert-AreEqual 15 $sparkPoolUpdated.AutoPause.DelayInMinutes

# Disable Auto-scale and Auto-pause
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $false -EnableAutoPause $false
Assert-True {$sparkPoolUpdated.DynamicExecutorAllocation.Enabled}
Assert-AreEqual 1 $sparkPoolUpdated.DynamicExecutorAllocation.MinExecutors
Assert-AreEqual 5 $sparkPoolUpdated.DynamicExecutorAllocation.MaxExecutors

# Disable Auto-scale and Auto-pause, DynamicExecutorAllocation
$sparkPoolUpdated = Update-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $sparkPoolName -EnableAutoScale $false -EnableAutoPause $false -EnableDynamicExecutorAllocation $false

Assert-AreEqual $sparkPoolName $sparkPoolUpdated.Name
Assert-AreEqual $location $sparkPoolUpdated.Location
Expand All @@ -106,6 +110,8 @@ function Test-SynapseSparkPool
Assert-False {$sparkPoolUpdated.AutoPause.Enabled}
Assert-AreEqual 15 $sparkPoolUpdated.AutoPause.DelayInMinutes

Assert-False {$sparkPoolUpdated.DynamicExecutorAllocation.Enabled}

# List all SparkPools in workspace
[array]$sparkPoolsInWorkspace = Get-AzSynapseSparkPool -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName
Assert-True {$sparkPoolsInWorkspace.Count -ge 1}
Expand Down Expand Up @@ -172,7 +178,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
fileSystemName = "wscmdletfs" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
location = "canadacentral";
location = "eastus";
sparkPoolName = "spool" + $testSuffix;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Synapse/Synapse.Test/ScenarioTests/SqlPoolTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function Get-SqlPoolTestEnvironmentParameters ($testSuffix)
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
perfLevel = 'DW200c';
location = "canadacentral";
location = "eastus";
tags = @{"NewSqlPoolTag" = "TestTagToNewCommand"}
storageAccountType = "LRS"
}
Expand Down
4 changes: 2 additions & 2 deletions src/Synapse/Synapse.Test/ScenarioTests/WorkspaceTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function Get-WorkspaceEncryptionTestEnvironmentParameters ($testSuffix)
fileSystemName = "wscmdletfs" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
location = "canadacentral";
location = "eastus";
encryptionKeyIdentifier = "<your-encryptionKeyIdentifier>";
}
}
Expand Down Expand Up @@ -516,7 +516,7 @@ function Get-WorkspaceTestEnvironmentParameters ($testSuffix)
fileSystemName = "wscmdletfs" + $testSuffix;
loginName = "testlogin";
pwd = "testp@ssMakingIt1007Longer";
location = "canadacentral";
location = "eastus";
}
}

Expand Down
Loading