Azure / Azure/Azure-DataFactory

PowerShell Script produced by azure-data-factory-utilities doesn't account for parameterised runtime state of triggers

Open
#387 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
PowerShell
Stars
529
Forks
623
PR merge metrics
No merged PRs in 30d

Description

I am having a problem with the recommended CI/CD for ADF. Using the azure-data-factory-utilities package.

When ADF trigger runtimestate is included in the arm-template-parameters-definition.json file
` "Microsoft.DataFactory/factories/triggers": {
"properties": {
"runtimeState": "=",`

This produces an ARMTemplate which adds parameters to the runtimeState property ARMTemplateForFactory.json
` {
"name": "[concat(parameters('factoryName'), '/BlobTrigger')]",
"type": "Microsoft.DataFactory/factories/triggers",
"apiVersion": "2018-06-01",
"properties": {
"annotations": [],
"runtimeState": "[parameters('BlobTrigger_properties_runtimeState')]",`

The powershell script for Pre/Post Deployment PrePostDeploymentScript.ps1 is expecting the runtimeState to be "Started" when defining triggers to start. This means that if parameterised these triggers don't get started even if they were previously

`$triggersToStart = $triggersInTemplate | Where-Object { $_.properties.runtimeState -eq "Started" -and ($_.properties.pipelines.Count -gt 0 -or $_.properties.pipeline.pipelineReference -ne $null)} | ForEach-Object {
New-Object PSObject -Property @{`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.