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] Connection Retry Policy samples #23945

Merged
merged 16 commits into from
Apr 20, 2022
Merged

[Cosmos] Connection Retry Policy samples #23945

merged 16 commits into from
Apr 20, 2022

Conversation

JericHunter
Copy link
Contributor

@JericHunter JericHunter commented Apr 12, 2022

Description

Created samples for retry config on both sync and async clients. The sample shows user how to pass in Connection Retry Policy options.

Deprecated the options 'connection_retry_policy' and 'retry_options' in the sync client.

There are some small code reworks in the cosmos_client.py file in both sync and async clients.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

removing connection retry policy from public view
rewriting some code for the cosmos client both sync and async
retry config samples for both sync and async
@ghost ghost added the Cosmos label Apr 12, 2022
Copy link
Member

@simorenoh simorenoh left a comment

Choose a reason for hiding this comment

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

Overall great job Jeric! Just left a couple comments on some small things missed, but great first PR regardless.

sdk/cosmos/azure-cosmos/samples/client_user_configs.py Outdated Show resolved Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py Outdated Show resolved Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/aio/cosmos_client.py Outdated Show resolved Hide resolved
added more retry options and added more sample comments.
cosmos client reworks for both sync and async
initializing async client with context manager
Copy link
Member

@simorenoh simorenoh left a comment

Choose a reason for hiding this comment

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

Just one little thing and Anna's comments, but you should be good after that!

reverting changes
updating comments in the samples
adding deprecation for retry option
@JericHunter JericHunter changed the title Connection Retry Policy Samples [Cosmos] Connection Retry Policy samples Apr 12, 2022
deprecation added for connection retry policy
@JericHunter JericHunter marked this pull request as ready for review April 12, 2022 21:47
indentation fix
changelog additions
Copy link
Member

@simorenoh simorenoh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Jeric!

Co-authored-by: Simon Moreno <30335873+simorenoh@users.noreply.github.com>
@simorenoh simorenoh merged commit 4bb5561 into main Apr 20, 2022
@simorenoh simorenoh deleted the jh-retry_configs branch April 20, 2022 18:19
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.

3 participants