Just updated the pre post deployment script with the latest changes from this article. The version we were using is from around november 2019 and that version works perfectly.
Updated to the latest version of the script and now our CD pipeline hangs during pre deployment. Had to revert to the previous version, since there is a bug in the newly updated powershell script.
Please fix and update
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
At which step was it hanging?
It hangs during pre-deployment in the while loop. It succesfully disabled one trigger out of 10ish, then it just hangs.
This looks like this may be better handled as part of a support case. Would it be possible to open it there?
Otherwise could you provide the trace correlation id, or at the very least the trigger name, factory name, region, and approximate time when the timeout occurred
cc @KranthiPakala-MSFT
Thanks for your inputs @djpmsft.
@mikanyg For deeper investigation and immediate assistance, If you have a support plan you may file a support ticket, else could you please send an email to [email protected] with the below details, so that we can create a one-time-free support ticket for you to work closely on this matter.Â
Email subject:
Thread URL:Â
Subscription ID:Â
Other details:
@mikanyg Any update on this issue?
Just send an email to [email protected] with detailed information. We are currently using the original script version from 2019.
Hi @mikanyg , thanks for sharing the details.
@djpmsft Here is the SR# - 120041722001987 for this case.
Since we have a SR to track this case, we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply and reopen the issue. We will gladly continue the discussion.
@mikanyg , I'm having the same problem. how did you solve yours? Where can I get the working script? THanks
Same here
Hey- have made a fix for the issue- please find the sections below.
if ($predeployment -eq $true) {
#Stop all triggers
Write-Host "Stopping deployed triggers"
$triggerstostop | Sort-Object Name | ForEach-Object {
Write-host "Disabling trigger " $_
Stop-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_ -Force
}
}
Still on post deployment section on the last 'Start active triggers' section you will need to replace with this-
$activeTriggerNames = $triggersTemplate | Where-Object { $_.properties.runtimeState -eq "Started" -and ($_.properties.pipelines.Count -gt 0 -or $_.properties.pipeline.pipelineReference -ne $null)} | ForEach-Object {$_.name.Substring(37, $_.name.Length-40)}
Write-Host "Starting active triggers"
$activeTriggerNames | ForEach-Object {
Write-host "Enabling trigger " $_
While (!(Start-AzDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $_ -Force -ErrorAction SilentlyContinue)) {
Sleep -Seconds 5
}
}
Hope this helps
The change above works after the underscore problems are fixed - the underscores are missed in a few places.
Most helpful comment
Just send an email to [email protected] with detailed information. We are currently using the original script version from 2019.