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

##[error]You cannot call a method on a null-valued expression. #354

Closed SravanDodda closed 11 months ago

SravanDodda commented 1 year ago

Describe the bug When pushing Dev code to QA, get the error right after "Adding Global Parameter..". We are NOT using any Global Parameters. Initially I did not have parameter lines (as highlighted) and was getting error. So, I went ahead and added the two lines highlighted to see if it works but to no avail

You cannot call a method on a null-valued expression.

image

To Reproduce

Changed QA config file to add the following lines but to no avail:

image

The config file did not have two lines before. I added them since I was getting the error. Even after adding these lines, it is not working

Your script here

Expected behaviour

Publishing to QA failing

Screenshots

Added error log and config file

Version of PowerShell module of:

Provide all files to reproduce the issue

config-QA.csv

tasklog_6.log

smndf commented 1 year ago

Facing the same error. It looks like the variable $targetAdf is not defined in https://github.com/Azure-Player/azure.datafactory.tools/blob/bd89b0ae8f3688506b0cfd7c2217bd9d93d9f86a/private/Deploy-AdfObjectOnly.ps1#L146 This part of the code was added in https://github.com/Azure-Player/azure.datafactory.tools/commit/1bda61412edfa32c9dca0394d3ad9dfc8416a16c

SravanDodda commented 1 year ago

@NowinskiK any help that you can provide?

NowinskiK commented 12 months ago

I see in the code that $targetAdf is not passed, hence the problem. But weird is that in most cases (for many people including my tests) this is working as probably treats the parameter within wider scope. Can you check with other agent's settings? I can't investigate that deeper right now as I'm on holiday, but I'll do as soon as I can.

SravanDodda commented 12 months ago

Thanks for the reply. Is your answer to my original question or another commenter's (@smndf)?

SravanDodda commented 12 months ago

I am now getting this: image

SravanDodda commented 11 months ago

Any timely help is appreciated

NowinskiK commented 11 months ago

Released in ver.1.7.0

SravanDodda commented 10 months ago

Released in ver.1.7.0

Kamil, I am still getting this error. Could you help?

image

NowinskiK commented 10 months ago

It has not been released yet in DevOps extension, only in PowerShell.