Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1d9a088
refactor(reindex): simplify search parameter URI filtering logic
jestradaMS Nov 12, 2025
aed05a9
refactor(reindex): improve active job retrieval and zero-count handling
jestradaMS Nov 14, 2025
e95ac3e
- Adding more comprehensive tests for reindexprocessingjobests
jestradaMS Nov 15, 2025
5dd273f
Merge branch 'main' into users/jestrada/reindexenhancmentsandtest
jestradaMS Nov 15, 2025
d0a23e4
Removing unneeded unit test causing timeouts
jestradaMS Nov 17, 2025
522498b
fix(reindex): prevent race conditions and improve cancellation handling
jestradaMS Nov 20, 2025
a56feed
test: reduce polling intervals and add Person resource cleanup in rei…
jestradaMS Nov 20, 2025
978a8cb
refactor(ci): extract e2e test variable setup into reusable template
jestradaMS Nov 20, 2025
9783e4e
fix syntax and missing params
jestradaMS Nov 20, 2025
ec0adac
fixing naming
jestradaMS Nov 20, 2025
25357a9
fixing name in run-tests.yml
jestradaMS Nov 20, 2025
fbc91ed
updating to use proper filter vs creating new yml just for reindex.
jestradaMS Nov 20, 2025
3b20cba
- Update blame-hang to 15m
jestradaMS Nov 21, 2025
7942dc2
Merge branch 'main' into users/jestrada/reindexenhancmentsandtest
jestradaMS Nov 21, 2025
6e87790
fixing stylecop issues
jestradaMS Nov 21, 2025
a5aa358
- Updates to unit tests
jestradaMS Nov 22, 2025
8deccd3
Testing runs with all e2e in single job
jestradaMS Nov 22, 2025
d34ad1c
Updates to tests
jestradaMS Nov 22, 2025
9cd5d0c
Fixing OnRefreshTimer_WhenOperationCanceled_ShouldHandleGracefully
jestradaMS Nov 22, 2025
8b9cd5d
Adding back in logic to perform a GetAndApplySearchParameterUpdates i…
jestradaMS Nov 22, 2025
28b21a2
Update to override SearchParameterHashMap after wait for BackgroundSync
jestradaMS Nov 25, 2025
29d13a2
Changes for searchparameterhashmap
jestradaMS Nov 25, 2025
6df9871
fixing test
jestradaMS Nov 25, 2025
ea098d7
Adding back Status to hash calc
jestradaMS Nov 25, 2025
afe72dd
Testing with force refersh on Orchestrator
jestradaMS Nov 26, 2025
17a2cb9
Removing unnecessary reindexing test from CustomSearchParamTests
jestradaMS Nov 26, 2025
87e5a7e
stuff......
jestradaMS Nov 26, 2025
3dffd5a
Removing wait from Reindex
jestradaMS Nov 26, 2025
40d28b2
Removing blank Initialize method
jestradaMS Nov 26, 2025
bb12550
Removing AsyncLifetime
jestradaMS Nov 26, 2025
9ec48a2
Updates to handle GetSearchParamByUrl in batches
jestradaMS Nov 26, 2025
977fc80
Updates to tests
jestradaMS Nov 26, 2025
9e6385c
Fixing CacheRefreshBackgroundServicetests
jestradaMS Nov 26, 2025
e3f23e1
Updates to handle create failure scenarios during test data setup
jestradaMS Nov 26, 2025
29b9041
Updated GetSearchParametersByUrls to use chunks of 1500
jestradaMS Dec 1, 2025
641e9cf
Updates to try to reduce flakyness in resource creation and usage
jestradaMS Dec 1, 2025
ff38451
Adding in test retry functionality
jestradaMS Dec 1, 2025
93f67f9
Fix to RetryTheoryDiscovery
jestradaMS Dec 2, 2025
46f5714
Adding retry to NSP deployment for handling transient errors.
jestradaMS Dec 2, 2025
a33c8db
adding retry to impor test
jestradaMS Dec 2, 2025
ada2e44
Updates to tests for retry and verifications
jestradaMS Dec 2, 2025
e82218d
Fixing RetryTestCase logic to only report final outcome
jestradaMS Dec 2, 2025
b51f5dc
Fix to RetryTestCase logic for message intercept
jestradaMS Dec 2, 2025
152c598
Changes to asynchronously remove old RGs from PR and create new RG fo…
jestradaMS Dec 2, 2025
2af7236
Update Retry to allow for RetryOnAssertionFailure
jestradaMS Dec 2, 2025
8143373
updating pattern to ensure we get all with PRname regardless of - or not
jestradaMS Dec 2, 2025
13ee791
Fix CleanupOldEnvironments
jestradaMS Dec 2, 2025
05b5f50
ReindexTests updates for RetryOnAssertion and Proper Verify usage
jestradaMS Dec 2, 2025
593ce8e
Spliting out Reindex tests
jestradaMS Dec 2, 2025
2e624fc
Update to move CustomSearchParamTests to run with Reindex tests
jestradaMS Dec 2, 2025
92252ec
update to run bulkupdate in it's own job to test perf.
jestradaMS Dec 2, 2025
71fc7da
Adding Retry to History Tests
jestradaMS Dec 3, 2025
c2c079f
Adding RetryFact to UpdateMultipleAsync__WhenMoreThanMaxParallelThrea…
jestradaMS Dec 3, 2025
07a0aa9
removing cosmos e2e for bulk update tests as there are none
jestradaMS Dec 3, 2025
58b41ef
Adding ValidateAuthenticationAsync method for ensuring auth is ready …
jestradaMS Dec 3, 2025
a222a42
Updating logging in RetryTestCase
jestradaMS Dec 3, 2025
b5f7df2
Revert "Adding ValidateAuthenticationAsync method for ensuring auth i…
jestradaMS Dec 3, 2025
480be76
Adding UniqueKeyValueName to ensure keyvaults are unique per build to…
jestradaMS Dec 4, 2025
779b440
Adding KeyVault purge logic to PR pipeline cleanup steps
jestradaMS Dec 4, 2025
0398e23
Adding RetryFact to VersionSpecificTests
jestradaMS Dec 4, 2025
3868579
Fixing Clean up of KeyVaults
jestradaMS Dec 4, 2025
eeb4a94
removing vault purging for now. Will take this up in a different PR.
jestradaMS Dec 4, 2025
cd3b911
Updating cleanup.yml to handle 10 vault purges in parallel
jestradaMS Dec 4, 2025
501c61c
fixing cleanup script to use correct vault pattern
jestradaMS Dec 4, 2025
7fd9c4e
matching to build vs entire PR
jestradaMS Dec 4, 2025
1dcdf7d
Adding retries to cleanup.yml remove RG
jestradaMS Dec 5, 2025
11698af
Adding in vault reuse logic for same build number scenarios to test v…
jestradaMS Dec 5, 2025
b3db431
removing purge soft delete and moving logic to attempt restore first …
jestradaMS Dec 5, 2025
e5a1157
Updating for handling aad keyvault same way as all other vaults.
jestradaMS Dec 5, 2025
d6215b5
removing quotes
jestradaMS Dec 5, 2025
e7b05c9
adding parallel processing to key vault moves and error handling ifor…
jestradaMS Dec 5, 2025
7fe6697
updating to call moveKeyVaults in Setup Environment stage
jestradaMS Dec 5, 2025
3eeec31
instead of moving, we will simply delete the purge all related vaults
jestradaMS Dec 5, 2025
5bf3c36
Updating build process to use buildid when creating all resources wit…
jestradaMS Dec 5, 2025
355f30d
fixing vault ids in docker.json
jestradaMS Dec 5, 2025
9d83169
Merge branch 'main' into users/jestrada/reindexenhancmentsandtest
jestradaMS Dec 5, 2025
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
8 changes: 8 additions & 0 deletions build/build-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ variables:
DeploymentEnvironmentNameR4BSql: '$(DeploymentEnvironmentNameR4B)-sql'
DeploymentEnvironmentNameR5: '$(DeploymentEnvironmentName)-r5'
DeploymentEnvironmentNameR5Sql: '$(DeploymentEnvironmentNameR5)-sql'
# Key Vault names (shorter due to 24 character limit)
KeyVaultNameSql: '$(KeyVaultBaseName)-sql'
KeyVaultNameR4: '$(KeyVaultBaseName)-r4'
KeyVaultNameR4Sql: '$(KeyVaultNameR4)-sql'
KeyVaultNameR4B: '$(KeyVaultBaseName)-r4b'
KeyVaultNameR4BSql: '$(KeyVaultNameR4B)-sql'
KeyVaultNameR5: '$(KeyVaultBaseName)-r5'
KeyVaultNameR5Sql: '$(KeyVaultNameR5)-sql'
TestEnvironmentUrl: 'https://$(DeploymentEnvironmentName).azurewebsites.net'
# These variables are not used in the deployment scripts, but are used in the E2E tests files.
TestEnvironmentUrl_Sql: 'https://$(DeploymentEnvironmentName)-sql.azurewebsites.net'
Expand Down
2 changes: 2 additions & 0 deletions build/ci-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ variables:
resourceGroupRoot: 'msh-fhir-ci4'
appServicePlanName: '$(resourceGroupRoot)-linux'
DeploymentEnvironmentName: '$(resourceGroupRoot)'
# CI uses the same name for Key Vaults as the deployment environment (no BuildId suffix needed)
KeyVaultBaseName: '$(DeploymentEnvironmentName)'
ResourceGroupName: '$(resourceGroupRoot)'
CrucibleEnvironmentUrl: 'https://crucible.mshapis.com/'
TestEnvironmentName: 'OSS CI'
Expand Down
16 changes: 2 additions & 14 deletions build/jobs/add-aad-test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,10 @@ steps:
$password = ConvertTo-SecureString -AsPlainText $password_raw -Force
$clientSecretCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $clientId, $password

# If a deleted keyvault with purge protection exists, try to restore it.
$environmentName = "$(DeploymentEnvironmentName)".ToLower() -replace "\.", ""
$keyVaultName = "$(KeyVaultBaseName)-ts".ToLower() -replace "\.", ""
Write-Host "Installed module and set variables"

$vaultName = "${environmentName}-ts"
$vaultLocation = "westus"
$vaultResourceGroupName = "$(ResourceGroupName)"
if (Get-AzKeyVault -VaultName $vaultName -Location $vaultLocation -InRemovedState)
{
Write-Host "Attempting to restore vault ${vaultName}"

Undo-AzKeyVaultRemoval -VaultName $vaultName -ResourceGroupName $vaultResourceGroupName -Location $vaultLocation
Write-Host "KeyVault $vaultName is restored"
}
Write-Host "Restored keyvaults"

# Connect to Microsoft Graph using client credentials
Write-Host "Connecting to Microsoft Graph"
Connect-MgGraph -TenantId $tenantId -ClientSecretCredential $clientSecretCredential
Expand All @@ -57,4 +45,4 @@ steps:
Import-Module $(System.DefaultWorkingDirectory)/release/scripts/PowerShell/FhirServerRelease/FhirServerRelease.psd1

Write-Host "Imported modules"
$output = Add-AadTestAuthEnvironment -TestAuthEnvironmentPath $(System.DefaultWorkingDirectory)/testauthenvironment.json -EnvironmentName $environmentName -ResourceGroupName $(ResourceGroupName) -TenantAdminCredential $clientSecretCredential -TenantId $tenantId -ClientId $clientId -ClientSecret $password
$output = Add-AadTestAuthEnvironment -TestAuthEnvironmentPath $(System.DefaultWorkingDirectory)/testauthenvironment.json -EnvironmentName $environmentName -KeyVaultName $keyVaultName -ResourceGroupName $(UniqueResourceGroupName) -EnvironmentLocation $(ResourceGroupRegion) -TenantAdminCredential $clientSecretCredential -TenantId $tenantId -ClientId $clientId -ClientSecret $password
67 changes: 63 additions & 4 deletions build/jobs/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,71 @@ jobs:
azurePowerShellVersion: latestVersion
ScriptType: InlineScript
Inline: |
Get-AzResourceGroup -Name $(ResourceGroupName) -ErrorVariable notPresent -ErrorAction SilentlyContinue
$deploymentEnvName = "$(DeploymentEnvironmentName)"
$keyVaultBaseName = "$(KeyVaultBaseName)"

Get-AzResourceGroup -Name $(UniqueResourceGroupName) -ErrorVariable notPresent -ErrorAction SilentlyContinue
if ($notPresent) {
Write-Host "Resource group $(ResourceGroupName) not found"
Write-Host "Resource group $(UniqueResourceGroupName) not found"
} else {
Write-Host "Deleting resource group $(ResourceGroupName)"
Remove-AzResourceGroup -Name $(ResourceGroupName) -Force -Verbose
Write-Host "Deleting resource group $(UniqueResourceGroupName)"
$maxRetries = 3
$retryCount = 0
$deleted = $false

while (-not $deleted -and $retryCount -lt $maxRetries) {
try {
Remove-AzResourceGroup -Name $(UniqueResourceGroupName) -Force -Verbose -ErrorAction Stop
$deleted = $true
Write-Host "Successfully deleted resource group $(UniqueResourceGroupName)"
}
catch {
$retryCount++
if ($retryCount -lt $maxRetries) {
Write-Warning "Failed to delete resource group (attempt $retryCount of $maxRetries). Retrying in 30 seconds... Error: $($_.Exception.Message)"
Start-Sleep -Seconds 30
} else {
Write-Warning "Failed to delete resource group after $maxRetries attempts. Error: $($_.Exception.Message)"
}
}
}
}

# Purge any soft-deleted Key Vaults from this build
# Vault names use KeyVaultBaseName (e.g., f20585pr5240-ts, f20585pr5240-r4, etc.)
$vaultPattern = "$keyVaultBaseName*"
Write-Host "Checking for soft-deleted Key Vaults matching pattern: $vaultPattern"
$softDeletedVaults = Get-AzKeyVault -InRemovedState -ErrorAction SilentlyContinue | Where-Object {
$_.VaultName -like $vaultPattern
}

if ($softDeletedVaults.Count -eq 0) {
Write-Host "No soft-deleted vaults found to purge"
} else {
Write-Host "Found $($softDeletedVaults.Count) soft-deleted vault(s) to purge"

$results = $softDeletedVaults | ForEach-Object -Parallel {
$vaultName = $_.VaultName
$vaultLocation = $_.Location
try {
Remove-AzKeyVault -VaultName $vaultName -Location $vaultLocation -InRemovedState -Force -ErrorAction Stop
[PSCustomObject]@{ Vault = $vaultName; Status = "Success" }
}
catch {
[PSCustomObject]@{ Vault = $vaultName; Status = "Failed: $($_.Exception.Message)" }
}
} -ThrottleLimit 10

$results | ForEach-Object {
if ($_.Status -eq "Success") {
Write-Host "Successfully purged vault: $($_.Vault)"
} else {
Write-Warning "Failed to purge vault $($_.Vault). $($_.Status)"
}
}

$successCount = ($results | Where-Object { $_.Status -eq "Success" }).Count
Write-Host "Completed purging: $successCount of $($softDeletedVaults.Count) vaults"
}


Expand Down
4 changes: 2 additions & 2 deletions build/jobs/e2e-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
KeyVaultName: 'resolute-oss-tenant-info'

- task: AzureKeyVault@1
displayName: 'Azure Key Vault: $(DeploymentEnvironmentName)-ts'
displayName: 'Azure Key Vault: $(KeyVaultBaseName)-ts'
inputs:
azureSubscription: $(ConnectedServiceName)
KeyVaultName: '$(DeploymentEnvironmentName)-ts'
KeyVaultName: '$(KeyVaultBaseName)-ts'
87 changes: 12 additions & 75 deletions build/jobs/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,92 +5,29 @@ parameters:
type: string
- name: appServiceType
type: string
- name: categoryFilter
type: string
default: 'Category!=ExportLongRunning'
- name: testRunTitleSuffix
type: string
default: ''

steps:
- template: e2e-tests-extract.yml
parameters:
version: ${{parameters.version}}

- task: AzurePowerShell@5
displayName: 'Set Variables'
inputs:
azureSubscription: $(ConnectedServiceName)
azurePowerShellVersion: latestVersion
ScriptType: inlineScript
Inline: |
$keyVault = "$(DeploymentEnvironmentName)-ts"
$secrets = Get-AzKeyVaultSecret -VaultName $keyVault

foreach($secret in $secrets)
{
$environmentVariableName = $secret.Name.Replace("--","_")

$secretValue = Get-AzKeyVaultSecret -VaultName $keyVault -Name $secret.Name
# Replace with -AsPlainText flag when v5.3 of the Az Module is supported
$plainValue = ([System.Net.NetworkCredential]::new("", $secretValue.SecretValue).Password).ToString()
if([string]::IsNullOrEmpty($plainValue))
{
throw "$($secret.Name) is empty"
}
Write-Host "##vso[task.setvariable variable=$($environmentVariableName)]$($plainValue)"
}

$appServiceName = "${{ parameters.appServiceName }}"
$appSettings = (Get-AzWebApp -ResourceGroupName $(ResourceGroupName) -Name $appServiceName).SiteConfig.AppSettings
$acrSettings = $appSettings | where {$_.Name -eq "FhirServer__Operations__ConvertData__ContainerRegistryServers__0"}
$acrLoginServer = $acrSettings[0].Value
$acrAccountName = ($acrLoginServer -split '\.')[0]

## This needs to be moved to MI, WI #125246
# $acrPassword = (Get-AzContainerRegistryCredential -ResourceGroupName $(ResourceGroupName) -Name $acrAccountName).Password
# Write-Host "##vso[task.setvariable variable=TestContainerRegistryServer]$($acrLoginServer)"
# Write-Host "##vso[task.setvariable variable=TestContainerRegistryPassword]$($acrPassword)"

$exportStoreSettings = $appSettings | where {$_.Name -eq "FhirServer__Operations__Export__StorageAccountUri"}
$exportStoreUri = $exportStoreSettings[0].Value
Write-Host "$exportStoreUri"
$exportStoreAccountName = [System.Uri]::new("$exportStoreUri").Host.Split('.')[0]
$exportStoreKey = Get-AzStorageAccountKey -ResourceGroupName $(ResourceGroupName) -Name "$exportStoreAccountName" | Where-Object {$_.KeyName -eq "key1"}

Write-Host "##vso[task.setvariable variable=TestExportStoreUri]$($exportStoreUri)"

$integrationStoreSettings = $appSettings | where {$_.Name -eq "FhirServer__Operations__IntegrationDataStore__StorageAccountUri"}
$integrationStoreUri = $integrationStoreSettings[0].Value
Write-Host "$integrationStoreUri"
$integrationStoreAccountName = [System.Uri]::new("$integrationStoreUri").Host.Split('.')[0]
Write-Host "##vso[task.setvariable variable=TestIntegrationStoreUri]$($integrationStoreUri)"

Write-Host "##vso[task.setvariable variable=Resource]$(TestApplicationResource)"

$secrets = Get-AzKeyVaultSecret -VaultName resolute-oss-tenant-info
foreach($secret in $secrets)
{
$environmentVariableName = $secret.Name.Replace("--","_")

$secretValue = Get-AzKeyVaultSecret -VaultName resolute-oss-tenant-info -Name $secret.Name
# Replace with -AsPlainText flag when v5.3 of the Az Module is supported
$plainValue = ([System.Net.NetworkCredential]::new("", $secretValue.SecretValue).Password).ToString()
if([string]::IsNullOrEmpty($plainValue))
{
throw "$($secret.Name) is empty"
}
Write-Host "##vso[task.setvariable variable=$($environmentVariableName)]$($plainValue)"
}
# ----------------------------------------

dotnet dev-certs https

Write-Host "##vso[task.setvariable variable=AZURESUBSCRIPTION_CLIENT_ID]$env:AZURESUBSCRIPTION_CLIENT_ID"
Write-Host "##vso[task.setvariable variable=AZURESUBSCRIPTION_TENANT_ID]$env:AZURESUBSCRIPTION_TENANT_ID"
Write-Host "##vso[task.setvariable variable=AZURESUBSCRIPTION_SERVICE_CONNECTION_ID]$env:AZURESUBSCRIPTION_SERVICE_CONNECTION_ID"
- template: ../tasks/e2e-set-variables.yml
parameters:
appServiceName: ${{ parameters.appServiceName }}

- task: DotNetCoreCLI@2
displayName: 'E2E ${{ parameters.version }} ${{parameters.appServiceType}}'
displayName: 'E2E ${{ parameters.version }} ${{parameters.appServiceType}}${{ parameters.testRunTitleSuffix }}'
inputs:
command: test
arguments: '"$(Agent.TempDirectory)/E2ETests/**/*${{ parameters.version }}.Tests.E2E*.dll" --blame-hang-timeout 7m --filter "FullyQualifiedName~${{parameters.appServiceType}}&Category!=ExportLongRunning"'
arguments: '"$(Agent.TempDirectory)/E2ETests/**/*${{ parameters.version }}.Tests.E2E*.dll" --blame-hang-timeout 15m --filter "FullyQualifiedName~${{parameters.appServiceType}}&${{ parameters.categoryFilter }}"'
workingDirectory: "$(System.ArtifactsDirectory)"
testRunTitle: '${{ parameters.version }} ${{parameters.appServiceType}}'
testRunTitle: '${{ parameters.version }} ${{parameters.appServiceType}}${{ parameters.testRunTitleSuffix }}'
env:
'TestEnvironmentUrl': $(TestEnvironmentUrl)
'TestEnvironmentUrl_${{ parameters.version }}': $(TestEnvironmentUrl_${{ parameters.version }})
Expand Down
11 changes: 4 additions & 7 deletions build/jobs/provision-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ parameters:
- name: reindexEnabled
type: boolean
default: true
- name: keyVaultName
type: string
default: ''

jobs:
- job: provisionEnvironment
Expand Down Expand Up @@ -73,6 +76,7 @@ jobs:
appServicePlanSku = "P2V3"
numberOfInstances = 2
serviceName = $webAppName
keyVaultName = "${{ parameters.keyVaultName }}".ToLower()
securityAuthenticationAuthority = "https://login.microsoftonline.com/$(tenant-id)"
securityAuthenticationAudience = "${{ parameters.testEnvironmentUrl }}"
additionalFhirServerConfigProperties = $additionalProperties
Expand All @@ -99,13 +103,6 @@ jobs:
$deploymentName = $webAppName
$resourceGroupName = "${{ parameters.resourceGroup }}"

Write-Host "Check for keyvaults in removed state..."
if (Get-AzKeyVault -VaultName $webAppName -Location $(ResourceGroupRegion) -InRemovedState)
{
Undo-AzKeyVaultRemoval -VaultName $webAppName -ResourceGroupName $resourceGroupName -Location $(ResourceGroupRegion)
Write-Host "KeyVault $webAppName is restored"
}

Write-Host "Provisioning Resource Group"
Write-Host "ResourceGroupName: ${{ parameters.resourceGroup }}"

Expand Down
35 changes: 28 additions & 7 deletions build/jobs/provision-sqlServer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,34 @@ jobs:
'nspProfile' = 'default'
}

# Deploy using external template
$nspDeploymentResult = New-AzResourceGroupDeployment `
-ResourceGroupName $resourceGroup `
-Name "$sqlServerName-nsp-association" `
-TemplateFile $(System.DefaultWorkingDirectory)/samples/templates/nsp-resource-association.json `
-TemplateParameterObject $templateParameters `
-Verbose
# Deploy using external template with retry logic for transient conflicts
$maxRetries = 3
$retryDelaySeconds = 15
$attempt = 0
$success = $false

do {
try {
$attempt++
Write-Host "Attempt $attempt of $maxRetries to create NSP association..."

$nspDeploymentResult = New-AzResourceGroupDeployment `
-ResourceGroupName $resourceGroup `
-Name "$sqlServerName-nsp-association" `
-TemplateFile $(System.DefaultWorkingDirectory)/samples/templates/nsp-resource-association.json `
-TemplateParameterObject $templateParameters `
-Verbose

$success = $true
} catch {
if ($_.Exception.Message -like "*Conflict*" -and $attempt -lt $maxRetries) {
Write-Host "Conflict detected. Retrying in $retryDelaySeconds seconds..."
Start-Sleep -Seconds $retryDelaySeconds
} else {
throw
}
}
} while (-not $success -and $attempt -lt $maxRetries)

Write-Host "Successfully associated SQL Server with NSP using external ARM template"
Write-Host "Association Resource ID: $($nspDeploymentResult.Outputs.associationResourceId.Value)"
Expand Down
4 changes: 2 additions & 2 deletions build/jobs/run-export-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
azurePowerShellVersion: latestVersion
ScriptType: inlineScript
Inline: |
$keyVault = "$(DeploymentEnvironmentName)-ts"
$keyVault = "$(KeyVaultBaseName)-ts"
$secrets = Get-AzKeyVaultSecret -VaultName $keyVault

foreach($secret in $secrets)
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
azurePowerShellVersion: latestVersion
ScriptType: inlineScript
Inline: |
$keyVault = "$(DeploymentEnvironmentName)-ts"
$keyVault = "$(KeyVaultBaseName)-ts"
$secrets = Get-AzKeyVaultSecret -VaultName $keyVault

foreach($secret in $secrets)
Expand Down
Loading
Loading