-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Import-Module Az.Accounts throws an exception if 2 environment vars differ only by case #18304
Comments
fyi @isra-fel |
@edyoung , Thanks for reporting and investigation. We should fix it as soon as possible. |
Thanks for the feedback! The issue was resolved by #18312 For now, to work-around the issue, we suggest using the previous version of Az v7.5.0 or Az.Accounts v2.7.6. |
Thanks! |
Downgrade to 7.5.0 nor 7.4.0 or 7.3.2 isn't solve the issue. Az 7.5.0 (last Updated: a month ago) depend on Az.ContainerRegistry 2.2.3 (last update: 5/25/2021) which depend on Az.Accounts 2.8.0 (last updated: 16 days ago). As we can realize, sometimes there is no real option to mitigate a bug in a new release of Az with rollback to previous release. My opinion, this is a critical bug without proper priority. When will be published the fix of the issue with duplicated environment variables in 2.8.0? |
Hi When will the new version be published? so there is some dependency check somewhere for greater than or equal to 2.7.6 rather then equal to 2.7.6 which is making to go for latest version for az.accounts. We also tried to install the az.accounts 2.7.6 before installing az 7.3.2 and it still download and install 2.8.0 accounts as part of az 7.3.2 |
You can remove the Az.Accounts after the installation of Az and install an older version manually:
If you are using AKS, good luck.. |
Almost all functions of Az.Aks already tested with lower version than the original dependency. Workaround for the issue of Az.Accounts with duplicated environment variables: Install previous stable release of Az Remove the Az.Accounts 2.8.0 (installed automatically with Az) Install the previous release |
Description
If any two environment variables which differ only by case exist when importing the az.accounts module, it throws an exception. It doesn't matter if these variables will be referred to by Az, any ones will do.
This occurs because the code introduced in PR #18162 creates a dictionary from all the existing variables, but case-folds them in the process.
See method List() in https://github.com/Azure/azure-powershell/pull/18162/files#diff-adfe64b8657069009dc1abf7f6c0d9981943cd1ba5c943b59d2ef18be56f6b92
This issue can only be reproduced on linux, because on Windows environment variables are case-insensitive.
It is new in Az.Accounts 2.8.0, i could not repro with 2.7.1
Issue script & Debug output
Environment data
Module versions
Error output
I don't appear to have this command?
The text was updated successfully, but these errors were encountered: