Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ubuntu, Windows] Az Powershell module will be updated to v11.3.1 on March 18 #9445

Closed
6 of 12 tasks
mikhailkoliada opened this issue Mar 4, 2024 · 10 comments
Closed
6 of 12 tasks
Assignees
Labels

Comments

@mikhailkoliada
Copy link
Contributor

mikhailkoliada commented Mar 4, 2024

Breaking changes

Pre-installed Az powershell module on Ubuntu & Windows will be updated to v11.3.1.

Target date

The image rollout process will be started on March 18th and take 3-4 days.

The motivation for the changes

We want to provide a more recent version preinstalled.

Possible impact

If you use direct invocations of Az cmdlets they might be incompatible between major versions of the module so you may need to downgrade your version if it affects your pipeline in workflows unexpected way, we from our side unlikely to help with the code adoption to the new version and most likely all the reports to the runner-images repo will be marked as external and later closed.

Platforms affected

  • Azure DevOps
  • GitHub Actions

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Mitigation ways

GitHub:

Use the azure/powershell action, it lets you to specify a module version you would like using by passing the azPSVersion parameter.

Actions:

Use the AzurePowershell@5 Azure DevOps task to specify a desired version

@mikhailkoliada mikhailkoliada pinned this issue Mar 4, 2024
@mikhailkoliada mikhailkoliada changed the title [Ubuntu, Windows] Az Powershell module will be updated to v11.2.0 on March 18 [Ubuntu, Windows] Az Powershell module will be updated to v11.3.0 on March 18 Mar 4, 2024
@mikhailkoliada mikhailkoliada changed the title [Ubuntu, Windows] Az Powershell module will be updated to v11.3.0 on March 18 [Ubuntu, Windows] Az Powershell module will be updated to v11.3.1 on March 18 Mar 4, 2024
@JADSKTPSVR
Copy link

Love it

@mikhailkoliada mikhailkoliada self-assigned this Mar 11, 2024
@mikhailkoliada mikhailkoliada added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Mar 11, 2024
@mikhailkoliada
Copy link
Contributor Author

Deployed

@d3vinda
Copy link

d3vinda commented Mar 27, 2024

hey @mikhailkoliada , there is an issue with 11.3.1 which is fixed in 11.4.0. are we able to pin the new version to be pre-installed in the agents instead of 11.3.1 ??

its related to using what-if flag in deployments and causing failures in pipelines using ubuntu and windows agent images, issue is also mentioned here --> Azure/bicep#12112

@chromebohemian448
Copy link

"Actions:

Use the AzurePowershell@5 Azure DevOps task to specify a desired version"

how to set desired version of Az module? from the link I understand that its the version of Powershell but not of the Az modules
how to downgrade Az module on the MS hosted agents? Thanks

@d3vinda
Copy link

d3vinda commented Mar 30, 2024

@chromebohemian448 , used below to install a specific version of Azure PowerShell.

image

azurePowerShellVersion: "OtherVersion"
preferredAzurePowerShellVersion: "11.4.0"

Problem with this approach is that it takes time to install Az modules after a new agent is allocated when running the pipeline using Microsoft hosted agents. It also adds additional time if you have parallel stages since you'll be allocated a new agent/s I believe for a parallel stage/s in your pipeline.

Was hoping versions pinned to *-latest images are patched regularly when issues are identified.
--> https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
--> https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
image

References:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-powershell-v5?view=azure-pipelines
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software

cc: @mikhailkoliada

@clRecruitment21
Copy link

So I am experiencing an issue with our build pipeline last seen to work on the 21st March - now fails, no code changes.

The 'New-AzSubscriptionDeployment' command was found in the module
'Az.Resources', but the module could not be loaded due to the following
error: [Assembly with same name is already loaded] For more information,
run 'Import-Module Az.Resources'.

We are running New-AzSubscriptionDeployment inside a powershell script that runs from AzurePowerShell@5.

Have tried
azurePowerShellVersion: OtherVersion
preferredAzurePowerShellVersion: 9.3.0

Which i think seems to line up with the previous version - and i still get the same error.

I tried changing the ubuntu image too (mainly because I got confused as to when the definition of 'latest' had changed) but i get the same message for pinned ubuntu-20.04

What is odd if there is very little 'out there' about this error.

if I do as it suggests I get

image

Anyone help?

@clRecruitment21
Copy link

If i do that, I am back to the highlighted error.

image

I added the import because the error said to try it... but it sheds no light what-so-ever.

I am stumbling around to try and understand what might have changed with the 'ubuntu-latest' which last ran successfully on the 21st March.

Looking further at this you can see the image versions etc here:

WORKED
image

DOESN'T
image

@clRecruitment21
Copy link

it may be relevent it may not.. but notice that the
image
AzurePowerShell version has changed.

@clRecruitment21
Copy link

If i compare the 'included software' between the two reported urls
OLD:
https://github.com/actions/runner-images/blob/ubuntu22/20240317.1/images/ubuntu/Ubuntu2204-Readme.md?plain=1

NEW:
https://github.com/actions/runner-images/blob/ubuntu22/20240407.1/images/ubuntu/Ubuntu2204-Readme.md?plain=1

You can see an announcement "Az Powershell module will be updated to v11.3.1" however across both versions new and old it is/already 11.3.1

and the link it refers to is here...

@clRecruitment21
Copy link

So @chromebohemian448's message appears to have disappeared.. you were asking me to remove the 'import' I'd added as the error advised. See my findings.

However, I have noticed that in the same time window an awesome package we use 'RegionOrebroLan.Transforming' had changed a version number, and reverting this back - our error disappears.

I have no idea at this stage what they could have changed, but the thrust of my investigation goes that way now.

@jonathh21

@actions actions deleted a comment from Ottapettavan Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants