Skip to content
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

Merged
merged 47 commits into from
Mar 10, 2022
Merged

[Cosmos] Add max_integrated_cache_staleness param option to item methods #22946

merged 47 commits into from
Mar 10, 2022

Conversation

simorenoh
Copy link
Member

@simorenoh simorenoh commented Feb 7, 2022

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.

simorenoh and others added 25 commits January 26, 2022 19:22
Kushagra improved documentation and comments

Co-authored-by: Kushagra Thapar <[email protected]>
@ghost ghost added the Cosmos label Feb 7, 2022
@azure-sdk
Copy link
Collaborator

API changes have been detected in azure-cosmos. You can review API changes here

@simorenoh simorenoh added Do Not Merge Client This issue points to a problem in the data-plane of the library. labels Feb 23, 2022
@simorenoh simorenoh marked this pull request as ready for review February 23, 2022 18:32
@azure-sdk
Copy link
Collaborator

API changes have been detected in azure-cosmos. You can review API changes here

… out

these changes will also likely be used for creating the diagnostics later on
@kushagraThapar
Copy link
Member

@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!

@azure-sdk
Copy link
Collaborator

API changes have been detected in azure-cosmos. You can review API changes here

@simorenoh simorenoh merged commit 4083a32 into Azure:main Mar 10, 2022
@simorenoh simorenoh deleted the integrated-cache branch March 10, 2022 01:21
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Apr 7, 2022
…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]>
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Apr 10, 2022
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants