-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Az module cannot be imported in parallel #18321
Comments
Hi everyone, Just a quick update - I've confirmed that this is an issue with Az.Accounts 2.8.0, and specifically the AzureSessionInitializer code here: azure-powershell/src/Accounts/Authentication/AzureSessionInitializer.cs Lines 249 to 259 in 5ea071f
It looks like module imports lock PSConfig.json and cause concurrent ones to fail. |
Thanks for reporting. @isra-fel , let's fix it in upcoming release. |
Yes, confirmed that switching the Az.Accounts module to an older version resolved our issue. Install-Module -Name Az ;
Uninstall-Module -Name Az.Accounts -AllVersions ;
Install-Module -Name Az.Accounts -RequiredVersion 2.7.6 -Force -Verbose ; |
I seem to also have this new error relating to
commenting to follow. |
@brwilkinson Hi Ben, if the issue persists, or if you have more info, could you submit a new issue so that I can follow up? Thanks. |
Thanks @isra-fel I saw this a few times. Will keep an eye and provide more info if persists. I wanted to drop a note if others have the similar issue. |
We are still having this issue |
Is there any update on this? |
Description
The Az module cannot be imported by jobs running in parallel because of contention for access to the ~/.azure/psconfig.json file, as seen in the first error line in the debug output. This seems like a recent issue, since our organization first saw it on 5/24, but I've seen it on both the current PS5 version and a version released before 5/24, so there might be some external factor.
This may also happen with multiple session - it behaves like an issue with the filesystem, rather than the individual Powershell session. I've tried this with delays between jobs, and this resolves the issue, but isn't a reliable fix since module imports vary in timing, so concurrent jobs importing any module dependent on Az will intermittently fail.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: