2
votes

Currently we have CI/CD release pipeline setup for deploying ADF V2 code from Development to Test Data Factory as per documentation. When running the release pipeline in Azure DevOps, it fails with following error

    {
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "DeploymentFailed",
        "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
        "details": [
          {
            "code": "BadRequest",
            "message": "{\r\n  \"error\": {\r\n    \"code\": \"TumblingWindowTriggerStartTimeUpdateNotAllowed\",\r\n    \"message\": \"Update of start time for tumbling window trigger is not allowed.null\",\r\n    \"target\": null,\r\n    \"details\": null\r\n  }\r\n}"
          }
        ]
      }
    ]
  }
}

Is there any workaround to deploy the ARM Template to Test ADF without updating or parameterize the StartTime of tumbling window trigger?

Any help is much appreciated!

3
Could you share the entire DevOps log? Please try to create a tumbling window trigger in Azure directly to see whether you can create it: docs.microsoft.com/en-us/azure/data-factory/….Cece Dong - MSFT

3 Answers

0
votes

I did not manage to update such a trigger. But to prevent deployment issues I added a condition to the trigger, based on a parameter.

The parameter definition

 "isNewDeployment": {
  "type": "bool",
  "defaultValue": true
}

The condition

"condition": "[parameters('isNewDeployment')]"

And depending on if you want to deploy the trigger or not, adjust the parameter file of your deployment

"isNewDeployment": {
  "value": false
}
0
votes

It was the same issue for me.

Although I wrote another script, which checks for the trigger time in ARM template and then in DataFactory.

  1. If the time matches, it deploys!
  2. Else it checks if the trigger was active or not. -- If active: checks the latest trigger run time, adds in ARM template and deletes the trigger. -- If inactive: Deletes the trigger and deploys with the new time.

NOTE: The delete is important, else you might not be able to deploy the trigger. Im using kinda same method: to put parameters i.e. if deployment has to be done or not.

You might have a look in : https://github.com/pranayyt/Azure.TumblingWindowTriggerStartTime

Atm its running smoothly in several data factory environments.

Hope this helps. Cheers.

0
votes

This might not directly answer your question, but if you want to do yourself a favour, you should try the SQL Player ADF Extension for DevOps: https://marketplace.visualstudio.com/items?itemName=SQLPlayer.DataFactoryTools

We have been using it in all our projects for CI/CD, and it especially does not suffer from the typical deployment problems with triggers when using ARM.