-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
windows 2022 image: Install-PowershellAzModules.ps1 script is failing in windows #11386
Comments
We have been having the same issue over the last two days. We have run close to 11 builds and kept hitting this issue, I thought it was some internal network problem until I saw that there is a CDN migration going on for PowerShell gallery endpoints. Presumably this is related to this. See: PowerShell/PowerShellGallery#297, PowerShell/PowerShell#24734. |
Hi @antika080 - Thank you for bringing this issue to our attention. We will look into this issue closely and will update you after investigating. |
Seems azurerm need to be deleted. And also with the azure module PS C:\Users\runner\runner-images> Import-Module .\images\windows\scripts\build\Install-PowershellAzModules.ps1
Installing azure to the C:\\Modules path...
- 2.1.0 [C:\\Modules\azure_2.1.0]
- 5.3.0 [C:\\Modules\azure_5.3.0]
WARNING: Package 'Azure' failed to be installed because: End of Central Directory record could not be found.
WARNING: Package 'Azure' failed to install.
PackageManagement\Save-Package : Unable to save the module 'Azure'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+ $null = PackageManagement\Save-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
+ FullyQualifiedErrorId : ProviderFailToDownloadFile,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage |
Seeing the same issue. |
I could only get the image to build by removing all versions of the |
Hi @cgxxv - Thanks for all the inputs! We are looking into this issue closely and will update you after investigating. Appreciate your patience, thanks! |
yes, this worked for us as well. Don't know whether should call it a workaround or do these packages really need to be deleted. |
The errors are due to using EOL versions. I recommend upgrading to the latest versions, as this should resolve the issues. We’re working on it. Also, if possible, consider migrating to the Azure PowerShell module(Az) instead of the older AzureRM and Azure modules. Let me know if you need any further info. Thank you! |
The error is because the CDN is apparently delivering broken content (which itself is likely related to migrating CDNs behind the scenes), not because they're EOL. They've been EOL for a long time, but have been kept around because upgrading some of these modules brings lots of breaking changes to pipelines (#9980 (comment), among others). |
Hi @AtOMiCNebula - Thank you for your findings and efforts. We’ll be migrating to the Az module soon, and AzureRM and Azure will reach end-of-support on the runners. We’ll keep you updated. Thanks again! |
Kindly fork the code and try to build , confirm with your comments. thank you ! cc @philip-lamb @cgxxv @angaaruriakhil @m-soltani @antika080 |
@kishorekumar-anchala |
Description
windows 2022 image: : Install-PowershellAzModules.ps1 script is failing with below error:
Provisioning with powershell script: /agent/_work/21/s/runner-images/images/windows/templates/../scripts/build/Install-PowershellAzModules.ps1
Creating C:\Modules folder to store PowerShell Azure modules...
Installing azurerm to the C:\Modules path...
WARNING: Package 'AzureRM' failed to be installed because: End of Central Directory record could not be found.
WARNING: Package 'AzureRM' failed to install.
PackageManagement\Save-Package : Unable to save the module 'AzureRM'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
ion
Platforms affected
Runner images affected
Image version and build link
NA
Is it regression?
No
Expected behavior
Install-PowershellAzModules.ps1 script should be running without error
Actual behavior
Install-PowershellAzModules.ps1 script is failing with error
Repro steps
run Install-PowershellAzModules.ps1 script
The text was updated successfully, but these errors were encountered: