Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
207 stars 69 forks source link

The publish cmdlet tries to delete enabled (active) trigger (not in source) when TriggerStartMethod = KeepPreviousState #350

Closed NowinskiK closed 1 year ago

NowinskiK commented 1 year ago

Describe the bug The publish cmdlet tries to delete enabled (active) trigger (not in source). This happens when the following scenario happens:

Error occurs during "Delete not in source" step:

##[error]HTTP Status Code: BadRequest
Error Code: TriggerEnabledCannotUpdate
Error Message: Cannot update enabled Trigger; the trigger needs to be disabled first.
Request Id: 3a51d8cf-1c7b-45fc-b6f0-****
Timestamp (Utc):07/17/2023 07:04:38
##[debug]Processed: ##vso[task.logissue type=error]HTTP Status Code: BadRequest
Error Code: TriggerEnabledCannotUpdate
Error Message: Cannot update enabled Trigger; the trigger needs to be disabled first.
Request Id: 3a51d8cf-1c7b-45fc-b6f0-****
Timestamp (Utc):07/17/2023 07:04:38

To Reproduce Set publishing options as mentioned above. Have trigger on target ADF which is active and not in source

Expected behaviour The trigger will be stopped and deleted.

Version of PowerShell module of: