Azure-Player / azure.datafactory.tools

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

Publish GlobalParams fail when globalConfigurations exist but Global Params list is empty #387

Closed ederfdias closed 4 months ago

ederfdias commented 5 months ago

I am trying to run a pipeline like this:

It was running fine some days ago, but now start to stop with the error below:

Adding global parameter...

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

I double check permission, variables, etc. The only thing was changed is that we create a new Data Factory resource.

One interest thing is even reporting an error the o check ADF in live mode and the pipelines is deployed.

Any guess?

NowinskiK commented 5 months ago

Hi. Can you provide more details from the log after enabling "System Diagnostics"?

ederfdias commented 5 months ago

2024-02-05T130335.0319116Z.txt Hi Nowinskik, log attached.

BigSlimeGuy commented 4 months ago

Hi NowinskiK, Our team recently started using this great DevOps plugin and we encountered the same issue. As a workaround we added a global parameter, which resolved the error.

NowinskiK commented 4 months ago

@BigSlimeGuy can you show me your factory file? I'm wondering what's special about this file that the process fails... it works for most people.

ederfdias commented 4 months ago

Looks like to me it's some update on data factory side

ederfdias commented 4 months ago

I have some old factories that works nice with the same task, but when I create a new adf the issue start to happen

ederfdias commented 4 months ago

@BigSlimeGuy can you show me your factory file? I'm wondering what's special about this file that the process fails... it works for most people.

Which file do you want to see specifically? Any specific json or the arm file generated?

BigSlimeGuy commented 4 months ago

@NowinskiK the factory that failed with the null reference exception looks like this:

{
    "name": "dev-weu-int-adf",
    "properties": {
        "globalConfigurations": {
            "PipelineBillingEnabled": "true"
        }
    },
    "location": "westeurope"
}

Then when we added a global parameter, the null reference went away:

{
    "name": "dev-weu-int-adf",
    "properties": {
        "globalParameters": {
            "test": {
                "type": "string",
                "value": "test"
            }
        },
        "globalConfigurations": {
            "PipelineBillingEnabled": "true"
        }
    },
    "location": "westeurope"
}

Not sure if this is relevant, but we deploy the ADF instance using bicep. So it is completely clean, perhaps if you create it via the portal it will contain the globalParameters field with an empty object or something?

NowinskiK commented 4 months ago

Thanks for more details, I will check that out.

ederfdias commented 2 months ago

Thank you all

ederfdias commented 1 month ago

@NowinskiK do you know if there plan to apply the same solution here in this repo below? https://github.com/Azure-Player/azure.datafactory.devops

I just noted that we have installed that extension from marketplace: https://marketplace.visualstudio.com/items?itemName=SQLPlayer.DataFactoryTools

I think it uses this tools somehow.

NowinskiK commented 1 month ago

Yes, this PowerShell module is fully used by DevOps Extension. Somehow I missed updating to v1.9. I will do that tonight.

NowinskiK commented 1 month ago

Released: https://github.com/Azure-Player/azure.datafactory.devops/releases/tag/v1.33 Version: 1.33.1471 (marketplace)