Skip to content

[Cosmos] add doc on client retry configs#30171

Merged
simorenoh merged 14 commits intoAzure:mainfrom
simorenoh:docs-update
May 17, 2023
Merged

[Cosmos] add doc on client retry configs#30171
simorenoh merged 14 commits intoAzure:mainfrom
simorenoh:docs-update

Conversation

@simorenoh
Copy link
Copy Markdown
Member

@simorenoh simorenoh commented May 1, 2023

This PR adds one more document for our users to leverage when using our SDK. This document specifies the different options that can be used to change the default configurations our client uses for timeouts and retrying connections. With these, users should have additional visibility into the use they can get from the SDK. Other small changes include the removal of some of the logic in our 408/503 policy and the refactoring of how some of our connection policy pieces get built.

For the timeout retry policy, we no longer mark the endpoint as unavailable, as a 408/503 doesn't necessarily point to the endpoint being unavailable and can happen by several other reasons. Changes have been made to ensure we do not do this. The document we had talking about these retries has also been changed to reflect these changes and was simplified to show that we do not retry regardless of the scenario (server vs. client timeout).

We also mark the request_timeout option as legacy for future reference, but show that the connection_timeout variable is the one that should be used instead.

Wondering if we should add a reference to this document anywhere as well, since it dives into the different things Core does: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md

@simorenoh
Copy link
Copy Markdown
Member Author

Before:
408
image
503
image

After:
408
image
503
image

@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

API changes are not detected in this pull request.

Comment thread sdk/cosmos/azure-cosmos/docs/ErrorCodesAndRetries.md Outdated
@simorenoh simorenoh requested a review from ealsur May 4, 2023 14:39
Copy link
Copy Markdown
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small text corrections

Comment thread sdk/cosmos/azure-cosmos/docs/ErrorCodesAndRetries.md Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/ErrorCodesAndRetries.md Outdated
Comment thread sdk/cosmos/azure-cosmos/CHANGELOG.md Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md Outdated
simorenoh and others added 2 commits May 8, 2023 09:58
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
@kushagraThapar
Copy link
Copy Markdown
Member

/azp run python - cosmos - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client.py Outdated
Comment thread sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md Outdated
Comment thread sdk/cosmos/azure-cosmos/docs/TimeoutAndRetriesConfig.md Outdated
@simorenoh simorenoh merged commit 848a9cd into Azure:main May 17, 2023
@simorenoh simorenoh deleted the docs-update branch May 17, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants