[Identity] Adjust log level for EnvCred warning#31814
Merged
pvaneck merged 2 commits intoAzure:mainfrom Aug 29, 2023
Merged
Conversation
a3086db to
d7cc436
Compare
Collaborator
|
API change check API changes are not detected in this pull request. |
billwert
approved these changes
Aug 25, 2023
xiangyan99
reviewed
Aug 25, 2023
If a possible environment credential is passed in, but no complete environment configuration is found, we output a warning log statement. However, since the default log level is WARNING, this warning is always printed when a user is trying to use DefaultAzureCredential with the AZURE_CLIENT_ID envvar set (typically for using a user-assigned managed identity). This warning is not printed with the `WARNING` prefix and can cause confusion for the user. Since setting AZURE_CLIENT_ID is a common use case outside of EnvironmentCredential, the log level is relaxed to INFO if that's the only environment config set. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
77f7ebf to
4e77a91
Compare
xiangyan99
reviewed
Aug 29, 2023
xiangyan99
approved these changes
Aug 29, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a possible environment credential is passed in, but no complete environment configuration is found, we output a warning log statement.
However, since the default log level is WARNING, this warning is always printed when a user is trying to use DefaultAzureCredential with the AZURE_CLIENT_ID envvar set (typically for using a user-assigned managed identity).
This warning is not printed with the
WARNINGprefix and can cause confusion for the user.To address the most common case of this confusing users using DAC, the log level has been changed to INFO if the credential is detected to be within DAC.
Closes: #30214