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

Incremental Deployment seems to not work when factory folder does not exist #346

Closed MartaUch closed 1 year ago

MartaUch commented 1 year ago

Hello,

I was testing situation when there is no factory file and IncrementalDeployment and DeployGlobalParams are True. image View on the Repos: image I would expect that new file will be created based on: image But I'm receiving the following error: image

Best regards Marta

NowinskiK commented 1 year ago

I can't reproduce the issue: image

Check this example: https://github.com/Azure-Player/azure.datafactory.tools/blob/6844dee2f81264cb1e9a345970c42e5ef890299f/adhoc/issue-195/test-195.ps1#L14C1-L27C1

MartaUch commented 1 year ago

Thank you very much for checking :) Please correct me if I'm wrong, you actually have a folder called "factory", but it's empty. In this case you check in your code if there are no files, then create a new one and proceed with incremental deployment.

In my case (Azure Devops) I don't have a folder at all in the repository. I can't avoid that, because even if I create the empty folder and later build the artifact, this folder will not be present, it just disappears. I checked it once again and still the same issue: image I'm not sure what else I'm missing.

NowinskiK commented 1 year ago

Got'ya! Yes, I had a folder but no file. The error is when you don't have a folder. ok.

MartaUch commented 1 year ago

Hi :) I have one additional question regarding this bug. Let's assume it is fixed and new file is created to keep information about the incremental deployment global parameter, while there are already existing global parameters in the ADF instance. Will they be removed/overwritten after deployment or global parameter for incremental deployment will be just added without touching existing parameters?

NowinskiK commented 1 year ago

All global parameters are being deployed as a one consistent object, so will be overwritten.