Azure-Player / azure.datafactory.devops

Azure DevOps Deployment Tasks for Azure Data Factory objects
MIT License
39 stars 21 forks source link

PublishADFTask@1 uses triggerlist from prev/first pipeline stage to reactivate #103

Closed safersephy closed 1 year ago

safersephy commented 2 years ago

We use the PublishADFTask within the following setup:

YAML Pipeline:

The deployment stages are from the same YAML pipeline with parameters

With in the deployment stages we use PublishADFTask to deploy ADF:

      - task: PublishADFTask@1
        inputs:
          azureSubscription: XXX
          ResourceGroupName: XXX$(Env)
          DataFactoryName: XXX$(Env)
          DataFactoryCodePath: XXX
          Location: XXX
          StageCode: 'dtp'
          StopStartTriggers: true
          CreateNewInstance: false
          PublishMethod: 'AzResource'

The config-dtp.csv contains linked services. This file is parameterized so we can use the same CSV for both stages and variables can be set in the YAML itself per stage.

With this config we run into the following issue:

TEST stage:

STEP: Stopping triggers... Getting triggers... The number of triggers to stop: 3 (out of 18) Stopping deployed triggers:

[...]

=================================================================================== STEP: Starting all triggers... The number of triggers to start: 3

[...]

PRD stage:

=================================================================================== STEP: Stopping triggers... Getting triggers... The number of triggers to stop: 10 (out of 18) Stopping deployed triggers:

[...]

=================================================================================== STEP: Starting all triggers... The number of triggers to start: 3 **- Enabling trigger: XXX_BI_AS

As you can see, it reactivates the trigger names from the previous stage, instead of reactivating the stopped triggers from the current stage.

If this not a bug but a config oversight of course please let me know what i'm doing wrong :)

Thanks!

NowinskiK commented 1 year ago

Starting triggers process start only enabled triggers. Double check why other triggers are not enabled and you'll find out the answer. Sorry, I can't help any more with this.