Azure / Azure-DataFactory

Other
481 stars 586 forks source link

PrePostDeployentv2 Script Error #675

Open sandman153 opened 3 months ago

sandman153 commented 3 months ago

Hi

I am using the Prepost deployment script however I am getting the following error

The script works fine with the predeployment set to true. It is just the post deployment that is failing.

Index operation failed; the array index evaluated to null. PowerShell exited with code '1'.

I believe this is happening when Pushing Pipelines to a list

Any help would be much appreciated as I am looking to implement this at a client site.

I am using the Version 2 script

Kind regards Sarath

sandman153 commented 3 months ago

I am using the template with the following parameters

-armTemplate "$(System.DefaultWorkingDirectory)/$(templateLocation)\ARMTemplateForFactory.json" -ResourceGroupName $(resourceGroup) -DataFactoryName $(adfName) -predeployment $false -deleteDeployment $true

Liszet commented 3 months ago

I am facing the same issue with both the v2 and v1 script.

sandman153 commented 3 months ago

Hi @Liszet

I have managed to narrow the problem. This is happening with certain pipelines only. I modified my script to filter these pipelines out, and it works.

I do not understand why a pipeline name would cause this problem.

Liszet commented 3 months ago

@sandman153 I have found the fix, and documented it here, https://github.com/Azure/Azure-DataFactory/issues/679#issuecomment-2210382222 If you further investigate these pipelines, do you face the same problems i have identified?