-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Corehttp] Add misc updates #44931
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
Open
pvaneck
wants to merge
3
commits into
Azure:main
Choose a base branch
from
pvaneck:corehttp-jan-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Corehttp] Add misc updates #44931
Conversation
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
This pulls in applicable changes that were made in azure-core but not yet applied to corehttp. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR synchronizes corehttp with applicable changes from azure-core, bringing in multiple bug fixes, improved error handling, and new serialization utilities.
Changes:
- Adds new timeout-specific exception types (
ServiceRequestTimeoutError,ServiceResponseTimeoutError) with improved exception handling across requests and aiohttp transports - Fixes
retry_backoff_maxconfiguration bug where the parameter was being ignored - Introduces
TypeHandlerRegistry,is_generated_model, andattribute_listto the serialization module for SDK model handling - Adds
start_timeandcontextparameters to OpenTelemetry tracer methods along withset_span_error_statushelper - Improves transport lifecycle management with proper closed state detection
- Enhances exception chaining in authentication policies for better error diagnostics
- Adds comprehensive test coverage for transport timeout scenarios and tracer functionality
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/corehttp/tests/test_transport.py | New tests for transport lifecycle and timeout handling (requests) |
| sdk/core/corehttp/tests/async_tests/test_transport_async.py | New tests for async transport lifecycle and timeout handling (aiohttp) |
| sdk/core/corehttp/tests/test_tracer_otel.py | Removed exception event assertions, added tests for new tracer features |
| sdk/core/corehttp/tests/test_stream_generator.py | Updated to expect specific timeout exception types |
| sdk/core/corehttp/corehttp/transport/requests/_requests_basic.py | Improved timeout exception handling, transport lifecycle management, removed unused imports |
| sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py | Added ConnectionTimeoutError handling for aiohttp 3.10+, improved lifecycle management |
| sdk/core/corehttp/corehttp/transport/_base_async.py | Simplified exception handling with try-finally pattern |
| sdk/core/corehttp/corehttp/transport/_base.py | Simplified exception handling with try-finally pattern |
| sdk/core/corehttp/corehttp/serialization.py | Added TypeHandlerRegistry class and model utility functions |
| sdk/core/corehttp/corehttp/rest/_requests_basic.py | Enhanced stream download exception handling with timeout-specific errors |
| sdk/core/corehttp/corehttp/rest/_aiohttp.py | Enhanced async response read error handling |
| sdk/core/corehttp/corehttp/rest/_rest_py3.py | Fixed docstring formatting for raises clauses |
| sdk/core/corehttp/corehttp/rest/_http_response_impl_async.py | Added missing blank lines in docstrings |
| sdk/core/corehttp/corehttp/runtime/policies/_retry.py | Fixed backoff_max bug, improved docstring formatting, added RetryMode docstring |
| sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py | Improved docstring formatting |
| sdk/core/corehttp/corehttp/runtime/policies/_authentication.py | Enhanced exception chaining for claims challenge failures |
| sdk/core/corehttp/corehttp/runtime/policies/_authentication_async.py | Enhanced exception chaining for claims challenge failures |
| sdk/core/corehttp/corehttp/runtime/policies/_universal.py | Added missing docstrings for policy methods |
| sdk/core/corehttp/corehttp/runtime/policies/_distributed_tracing.py | Added missing docstrings for policy methods |
| sdk/core/corehttp/corehttp/runtime/pipeline/init.py | Fixed docstring formatting for raises clauses |
| sdk/core/corehttp/corehttp/runtime/pipeline/_tools.py | Fixed docstring formatting for raises clauses |
| sdk/core/corehttp/corehttp/paging.py | Added missing docstrings for iterator methods |
| sdk/core/corehttp/corehttp/instrumentation/tracing/opentelemetry.py | Added start_time, context parameters and set_span_error_status method |
| sdk/core/corehttp/corehttp/credentials.py | Added missing docstrings for close methods and improved raises documentation |
| sdk/core/corehttp/corehttp/utils/_utils.py | Fixed docstring formatting for raises clause |
| sdk/core/corehttp/CHANGELOG.md | Comprehensive documentation of all changes |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
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.
This pulls in applicable changes that were made in azure-core but not yet applied to corehttp.