-
Notifications
You must be signed in to change notification settings - Fork 2.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
[Cosmos] Add max_integrated_cache_staleness param option to item methods #22946
Conversation
Co-authored-by: Gahl Levy <[email protected]>
Co-authored-by: Gahl Levy <[email protected]>
…n consistency to start client session
…ded (thanks Jake!)
Kushagra improved documentation and comments Co-authored-by: Kushagra Thapar <[email protected]>
…-sdk-for-python into integrated-cache
API changes have been detected in |
API changes have been detected in |
… out these changes will also likely be used for creating the diagnostics later on
@simorenoh - was this PR only blocked because of me, if so, apologies for late approval. Please merge it if it is ready. If not, let me know what we need to do to get it in. Thanks! |
API changes have been detected in |
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
…ods (Azure#22946) * consistency level gets set to default found in database account * async client default change * updated docs based on finding and updated samples to reflect best practices * Update CHANGELOG.md * Update README.md * Update README.md * Update README.md * Update CHANGELOG.md * formatting * formatting * updated consistency for first request to Eventual (lowest latency) * pylint * from_connection_string methods * from_connection_string2 * Update sdk/cosmos/azure-cosmos/README.md Co-authored-by: Gahl Levy <[email protected]> * Apply suggestions from code review Co-authored-by: Gahl Levy <[email protected]> * Update README.md * removed forceful header usage, changed setup to only check for Session consistency to start client session * need to set header if Session consistency for updating session if needed (thanks Jake!) * Apply suggestions from code review Kushagra improved documentation and comments Co-authored-by: Kushagra Thapar <[email protected]> * added test for session token * Update CHANGELOG.md * Update _cosmos_client_connection_async.py * added max_integrated_cache_staleness to item methods in containers * added validation and provisional comments * pylint * only applied to read-only operations * Update container.py * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Kushagra Thapar <[email protected]> * Update _base.py * updated param comments to mention integrated cache configuration * moved to kwargs * added tests to verify functionality * Update test_integrated_cache.py * Update test_integrated_cache.py * updates to test to ensure it works with setup * added headers test and new way to track client headers before sending out these changes will also likely be used for creating the diagnostics later on * Update test_integrated_cache.py * Create test_axq.py * Added mocking tests for max integrated cache staleness. Fixed issue with int value being false * upgrade version for release Co-authored-by: Gahl Levy <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]>
…ods (Azure#22946) * consistency level gets set to default found in database account * async client default change * updated docs based on finding and updated samples to reflect best practices * Update CHANGELOG.md * Update README.md * Update README.md * Update README.md * Update CHANGELOG.md * formatting * formatting * updated consistency for first request to Eventual (lowest latency) * pylint * from_connection_string methods * from_connection_string2 * Update sdk/cosmos/azure-cosmos/README.md Co-authored-by: Gahl Levy <[email protected]> * Apply suggestions from code review Co-authored-by: Gahl Levy <[email protected]> * Update README.md * removed forceful header usage, changed setup to only check for Session consistency to start client session * need to set header if Session consistency for updating session if needed (thanks Jake!) * Apply suggestions from code review Kushagra improved documentation and comments Co-authored-by: Kushagra Thapar <[email protected]> * added test for session token * Update CHANGELOG.md * Update _cosmos_client_connection_async.py * added max_integrated_cache_staleness to item methods in containers * added validation and provisional comments * pylint * only applied to read-only operations * Update container.py * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Kushagra Thapar <[email protected]> * Update _base.py * updated param comments to mention integrated cache configuration * moved to kwargs * added tests to verify functionality * Update test_integrated_cache.py * Update test_integrated_cache.py * updates to test to ensure it works with setup * added headers test and new way to track client headers before sending out these changes will also likely be used for creating the diagnostics later on * Update test_integrated_cache.py * Create test_axq.py * Added mocking tests for max integrated cache staleness. Fixed issue with int value being false * upgrade version for release Co-authored-by: Gahl Levy <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]>
These changes make it so users can start trying out the CosmosDB integrated cache in the Python SDK with either the sync or async clients. These changes are basically just passing in additional headers.
Still missing marking these headers as a preview feature. We currently have the SDK in beta version while we work in the async client, but we can't have so many beta versions in a row for the SDK - users shy away from using beta versions, even if not all of it is in beta. We should find a way to make sure we communicate this is a preview header, but the client itself should be good to use.