Skip to content

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

@crystalgeek

Description

@crystalgeek

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 @{

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions