Skip to content

Commit

Permalink
Version 15.5.0
Browse files Browse the repository at this point in the history
- *NEW:* For muti-database target builds, you can now specify custom concurrency tag. Previously, the only concurrency differentitor was by SQL Server Name. Please see the docs on [Concurrency](/docs/concurrency_options.md) and [Database targeting options](docs/override_options.md) to understand how to use this new feature.
- *UPDATED:* DACPAC creation timeouts now set to the value of `--defaultscripttimeout`. Previously, it was using the default settings.
- *UPDATED:* If a script package is failing after retries due to a timeout, the build will now immediately fail. The prior behavior was to create a custom DACPAC (if configured) and continue trying the build. This was just delaying the inevitable failure and wasting time.
  • Loading branch information
mmckechney committed Aug 30, 2023
1 parent c96b2fb commit a50d271
Show file tree
Hide file tree
Showing 38 changed files with 731 additions and 138 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# SQL Build Manager Change Log

### Version 15.5.0
- *NEW:* For muti-database target builds, you can now specify custom concurrency tag. Previously, the only concurrency differentitor was by SQL Server Name. Please see the docs on [Concurrency](/docs/concurrency_options.md) and [Database targeting options](docs/override_options.md) to understand how to use this new feature.
- *UPDATED:* DACPAC creation timeouts now set to the value of `--defaultscripttimeout`. Previously, it was using the default settings.
- *UPDATED:* If a script package is failing after retries due to a timeout, the build will now immediately fail. The prior behavior was to create a custom DACPAC (if configured) and continue trying the build. This was just delaying the inevitable failure and wasting time.

### Version 15.4.2
- *UPDATED:* Converted Batch Node Pool creation to the new `Azure.ResourceManager.Batch` SDK. **NOTE:** This may require you to add batch specific NSG rules if you deploy into a subnet. See [network.bicep's](./scripts/templates/Modules/network.bicep) `nsgBatchResource` resource to see the rules that are needed.

Expand Down
7 changes: 5 additions & 2 deletions docs/concurrency_options.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Concurrency Options for Threaded, Batch and Kubernetes executions
# Concurrency Options for Threaded, Batch, Kubernetes, Container App and ACI executions

You can control the level of parallel execution with the combination of two arguments: `--concurrency` and `--concurrencytype`. While their meaning for threaded and batch/kubernetes are similar, there are some distinctions and subtleties when used together

Expand All @@ -19,7 +19,7 @@ You can control the level of parallel execution with the combination of two argu
- `Count` - (default) will use the value for `concurrency` as the maximum number of concurrent tasks allowed
- `Server` - When using this value, the `concurrency` value is ignored. Instead, the app will interrogate the database targets and allow one task per SQL Server at a time

_For example:_ if there are 5 unuque SQL Server targets in the database targets config, there will 1 task per server, up to 5 concurrent tasks total
_For example:_ if there are 5 unique SQL Server targets in the database targets config, there will 1 task per server, up to 5 concurrent tasks total

- `MaxPerServer` - Will interrogate the database targets and allow multiple tasks per server, up to the `concurrency` value.

Expand All @@ -29,6 +29,9 @@ You can control the level of parallel execution with the combination of two argu

- `MaxPerTag` - - Same behavior as `MaxPerServer` but allows you to set a concurrency value per tag value instead of server. See [database targets config file](override_options.md) for details on setting the concurrency tag value

*NOTE:* If a concurrency typf of `Tag` or `MaxPerTag` is set but there are database targets that are missing a tag value, the build will not start.


### --concurrency

This argument takes an integer number (default is 8) defining the maximum number of concurrent threads per the set `concurrencytype`
Expand Down
20 changes: 12 additions & 8 deletions scripts/templates/Database/create_database_override_files.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
param
(
[string] $path,
[string] $prefix,
[string] $resourceGroupName
[string] $prefix
)

. ./../prefix_resource_names.ps1 -prefix $prefix
Expand All @@ -17,6 +16,7 @@ $databaseDbWithBadTargetConfigFile = Join-Path $path "databasetargets-badtargets
$clientDbConfigFile = Join-Path $path "clientdbtargets.cfg"
$doubleClientDbConfigFile = Join-Path $path "clientdbtargets-doubledb.cfg"
$taggedDbConfigFile = Join-Path $path "databasetargets-tag.cfg"
$taggedClientDbConfigFile = Join-Path $path "clientdbtargets-tag.cfg"
$serverTextFile = Join-Path $path "server.txt"
$tag = @("TagA","TagB","TagC")
$counter = 0
Expand All @@ -37,8 +37,9 @@ foreach($server in $sqlServers)
}
$outputDbConfig += ,@($server.fullyQualifiedDomainName + ":SqlBuildTest,"+$db)
$databaseDbWithBadTargetConfig += ,@($server.fullyQualifiedDomainName + ":SqlBuildTest,"+$db)
$clientDbConfig += ,@($server.fullyQualifiedDomainName + ":client,"+$db)
$taggedDbConfig += ,@($server.fullyQualifiedDomainName + ":SqlBuildTest,"+$db +"#" + $tag[$counter])
$taggedClientDbConfig += ,@($server.fullyQualifiedDomainName + ":client,"+$db +"#" + $tag[$counter])
$clientDbConfig += ,@($server.fullyQualifiedDomainName + ":client,"+$db)
$counter = $counter +1;
}

Expand All @@ -63,19 +64,22 @@ foreach($server in $sqlServers)
}
<# Action that will repeat until the condition is met #>

Write-Host "Writing test database config to path set to $outputDbConfigFile" -ForegroundColor DarkGreen
Write-Host "Writing test database config to $outputDbConfigFile" -ForegroundColor DarkGreen
$outputDbConfig | Set-Content -Path $outputDbConfigFile

Write-Host "Writing test database config to path set to $clientDbConfigFile" -ForegroundColor DarkGreen
Write-Host "Writing test database config to path $clientDbConfigFile" -ForegroundColor DarkGreen
$clientDbConfig | Set-Content -Path $clientDbConfigFile

Write-Host "Writing test database config to path set to $doubleClientDbConfigFile" -ForegroundColor DarkGreen
Write-Host "Writing test database config with tags to path $taggedClientDbConfigFile" -ForegroundColor DarkGreen
$taggedClientDbConfigFile | Set-Content -Path $taggedClientDbConfigFile

Write-Host "Writing test database config to path $doubleClientDbConfigFile" -ForegroundColor DarkGreen
$doubleClientDbConfig | Set-Content -Path $doubleClientDbConfigFile

Write-Host "Writing test database config to path set to $databaseDbWithBadTargetConfigFile" -ForegroundColor DarkGreen
Write-Host "Writing test database config to path $databaseDbWithBadTargetConfigFile" -ForegroundColor DarkGreen
$databaseDbWithBadTargetConfig | Set-Content -Path $databaseDbWithBadTargetConfigFile

Write-Host "Writing test database config to path set to $taggedDbConfigFile" -ForegroundColor DarkGreen
Write-Host "Writing test database config with tags to path $taggedDbConfigFile" -ForegroundColor DarkGreen
$taggedDbConfig | Set-Content -Path $taggedDbConfigFile

Write-Host "Creating server.txt file for SQL Query override config tests" -ForegroundColor DarkGreen
Expand Down
2 changes: 1 addition & 1 deletion scripts/templates/create_all_settingsfiles_fromprefix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ param (
./aci/create_aci_settingsfile_fromprefix.ps1 -sbmExe $sbmExe -path $outputPath -resourceGroupName $resourceGroupName -prefix $prefix

. ./prefix_resource_names.ps1 -prefix $prefix
./Database/create_database_override_files.ps1 -sbmExe $sbmExe -path $outputPath -resourceGroupName $resourceGroupName
./Database/create_database_override_files.ps1 -path $outputPath -prefix $prefix
4 changes: 2 additions & 2 deletions src/AssemblyVersioning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
// 2) Update the installer version to match the AssemblyVersion below.
// These can be found in SqlBuildManager.Setup -> Organize Your Setup -> General Information

[assembly: AssemblyVersion("15.4.3")]
[assembly: AssemblyFileVersion("15.4.3")]
[assembly: AssemblyVersion("15.5.0")]
[assembly: AssemblyFileVersion("15.5.0")]
Loading

0 comments on commit a50d271

Please sign in to comment.