auto fallback when loading settings from env#46668
Merged
kashifkhan merged 4 commits intomainfrom May 5, 2026
Merged
Conversation
…d `AZURE_SDK_TRACING_IMPLEMENTATION` environment variables no longer raise errors.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR changes azure-core settings parsing so invalid environment variable values no longer raise exceptions; instead they fall back to defaults and emit warnings.
Changes:
- Added warning-and-fallback behavior for invalid
AZURE_LOG_LEVEL,AZURE_TRACING_ENABLED, andAZURE_SDK_TRACING_IMPLEMENTATIONvalues. - Added
VERBOSEas an alias forDEBUGforAZURE_LOG_LEVEL. - Updated docs and tests to reflect the new fallback behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/azure-core/azure/core/settings.py | Implements warning logs + fallback defaults; adds VERBOSE alias and updates docstrings. |
| sdk/core/azure-core/tests/test_settings.py | Updates tests to expect fallback return values; adds VERBOSE alias coverage. |
| sdk/core/azure-core/ENVIRONMENT_VARIABLES.md | Documents fallback behavior and VERBOSE alias. |
| sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md | Updates env var table to mention fallback behavior and VERBOSE. |
| sdk/core/azure-core/CHANGELOG.md | Notes behavior change (no error on invalid env vars) and the new VERBOSE alias. |
pvaneck
approved these changes
May 4, 2026
Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
pvaneck
approved these changes
May 4, 2026
kashifkhan
approved these changes
May 5, 2026
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.
Invalid values for the
AZURE_LOG_LEVEL,AZURE_TRACING_ENABLED, andAZURE_SDK_TRACING_IMPLEMENTATIONenvironment variables no longer raise errors.Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines