-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Update Session Token Sample and Retry Documentation #42250
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
Conversation
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 improves the Cosmos DB Python SDK's session token management samples and retry documentation. The changes clarify how session tokens should be retrieved from cache and streamline the code structure while also updating retry behavior documentation to be more accurate.
Key changes:
- Refactored session token samples to properly demonstrate using cached session tokens for requests
- Updated retry documentation to reflect current SDK behavior for error codes 408, 500, and 503
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
File | Description |
---|---|
session_token_management_async.py | Refactored to extract shared logic into a new function and properly use cached session tokens |
session_token_management.py | Applied the same refactoring as the async version for consistency |
ErrorCodesAndRetries.md | Updated retry behavior documentation for status codes 408, 500, and 503 |
sdk/cosmos/azure-cosmos/samples/session_token_management_async.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/samples/session_token_management_async.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/samples/session_token_management_async.py
Outdated
Show resolved
Hide resolved
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.
Thanks for the changes @tvaron3 , lgtm!
Description