Azure-Player / azure.datafactory.devops

Azure DevOps Deployment Tasks for Azure Data Factory objects
MIT License
39 stars 21 forks source link

Out of date az.accounts version for PublishADFTask@1 #118

Closed ludbrookeb closed 1 year ago

ludbrookeb commented 1 year ago

Hi there :)

As of the mew year I have been running into this

[error]This module requires Az.Accounts version 2.10.4. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information.

Current version seems to be targeting 2.10.3

OlufKelk commented 1 year ago

Am experiencing the exact same issue!

AndreaCuneo commented 1 year ago

Same here since yday evening. The issue has been introduced in a version update of the Task. We're running on Azure Hosted Agent windows-2022

We're currently unable to publish changes to production using this Task, so is quite impactful. Can you suggest a workaround?

This worked fine (v1.15.1261)

==============================================================================
2023-01-02T17:18:47.3061559Z Task         : Publish Azure Data Factory
2023-01-02T17:18:47.3061855Z Description  : Deploys entire ADF (v2) from JSON files to ADF instance (adftools)
2023-01-02T17:18:47.3062163Z Version      : 1.15.1261
2023-01-02T17:18:47.3062370Z Author       : Kamil Nowinski (SQLPlayer)
2023-01-02T17:18:47.3062698Z Help         : [More Information](https://github.com/SQLPlayer/azure.datafactory.devops)
==============================================================================

This failed (v1.23.1279) with the same error of the OP, 10min after the above.

==============================================================================
2023-01-02T17:28:52.3470281Z Task         : Publish Azure Data Factory
2023-01-02T17:28:52.3470593Z Description  : Deploys entire ADF (v2) from JSON files to ADF instance (adftools)
2023-01-02T17:28:52.3470857Z Version      : 1.23.1279
2023-01-02T17:28:52.3471078Z Author       : Kamil Nowinski (AzurePlayer)
2023-01-02T17:28:52.3471406Z Help         : [More Information](https://github.com/Azure-Player/azure.datafactory.devops)
==============================================================================
edry-jonatan-intellishore commented 1 year ago

Same issue here since yesterday.

inspari-eeth commented 1 year ago

We are experiencing the same issue here. It could look like, it's one of the modules being imported, other than the Az.Accounts, that is requiring v2.10.4 of Az.Accounts.

We've tried to install Az.Accounts v2.10.4 manually in a PS-task before the ADF-deploy task without luck.

OlufKelk commented 1 year ago

Most likely this 0977010cf986f8b78a694c76766902503f973e51 is part of the issues. Az.DataFactory requires v2.10.4 of Az.Accounts. $module = Get-Module Az.Accounts if ($module -ne $null -and $module.Version -lt [System.Version]"2.10.3") if ($module -ne $null -and $module.Version -lt [System.Version]"2.10.4")

inspari-eeth commented 1 year ago

Yep, agree.

I don't know if this file needs an update? image

AndreaCuneo commented 1 year ago

We are experiencing the same issue here. It could look like, it's one of the modules being imported, other than the Az.Accounts, that is requiring v2.10.4 of Az.Accounts.

We've tried to install Az.Accounts v2.10.4 manually in a PS-task before the ADF-deploy task without luck.

The error is misleading. Problem is that v2.10.4 is installed on Hosted Agent, but this Task actually embeed and load v2.10.3 but then some command it uses requires the v2.10.4. It's a dependency issue within the Task, which makes hard to have a workaround.

I was looking and seems possible in YAML to request a specific version of a Task, like PublishADFTask@1.15.1261. Unfortunatly we do still use Classic Releases and that is not possible.

AndreaCuneo commented 1 year ago

Yep, agree.

I don't know if this file needs an update? image

I think the whole 'ps_modules' which are the embeeded ones, needs to be updated to v2.10.4, not just this file.

inspari-eeth commented 1 year ago

You're probably right! I'm not that much into the PWSH world, so I was just looking through files searching for references to Az.Accounts and something lower than 2.10.4...

inspari-eeth commented 1 year ago

I was looking and seems possible in YAML to request a specific version of a Task, like PublishADFTask@1.15.1261. Unfortunatly we do still use Classic Releases and that is not possible.

Trying to use the specific version in YAML-based pipeline did the trick for me just now: image

- task: SQLPlayer.DataFactoryTools.PublishADF.PublishADFTask@1.15.1261

ThomasVanBilsen commented 1 year ago

I was looking and seems possible in YAML to request a specific version of a Task, like PublishADFTask@1.15.1261. Unfortunatly we do still use Classic Releases and that is not possible.

Trying to use the specific version in YAML-based pipeline did the trick for me just now: image

- task: SQLPlayer.DataFactoryTools.PublishADF.PublishADFTask@1.15.1261

I tried specifying the version number the same way as you have and run into the following error when executing the pipeline: image

Any idea what could be the issue?

inspari-eeth commented 1 year ago

I tried specifying the version number the same way as you have and run into the following error when executing the pipeline: image

Any idea what could be the issue?

Did you only change the versionnumber or the entire task reference?

ThomasVanBilsen commented 1 year ago

I tried specifying the version number the same way as you have and run into the following error when executing the pipeline: image Any idea what could be the issue?

Did you only change the versionnumber or the entire task reference?

I changed it from:

to:

sebastien-fauvel commented 1 year ago

Same issue here, and no way to use another version than 1.*

By the way, @NowinskiK, what happened to this new version 1.23.1279? I can't see it in the tags / release list on GitHub. Have you removed it? How can we have Azure DevOps use the previous version again?

some1random1991 commented 1 year ago

We are experiencing the same issue in multiple tenants. Is there a known workaround that works for classic pipelines? The interface provides version 0. as an option for us, but sadly we do need several features from version 1.

NowinskiK commented 1 year ago

I'm going to release new fixed version in the next hour. Bear with me.

NowinskiK commented 1 year ago

The version of az.accounts has been updated and new version (1.24) released. This bug should be resolved now. Sorry for inconvenience. https://github.com/Azure-Player/azure.datafactory.devops/releases/tag/v1.24

AndreaCuneo commented 1 year ago

Confirming 1.24 works as expected.

Thanks for the quick resolution and great library! Cheers