[MS-632] [API] Update connector retry mechanism with tenacity library. Remove allow_retries #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Update retrying mechanism and making user experience better
Motivation and Context
While doing the unit tests for the connector endpoints, there are some key, values that are redundant.
This ticket addresses the following to make user experience better:
Remove allow_retries and num_of_retries in replacement for a key max_attempts.
With max_attempts it automatically defines if retries is necessary or not.
Replace the naive implementation of retrying with a library that can provide other forms of retries (retries with jitter and others). The library to be used will be tenacity.
Moving model attribute which is part of the optional params to a necessary attribute, but the key may be optional.
Type of Change
How to Test
Run unit-test or run a cookbook/recipe run
Checklist
Please check all the boxes that apply to this pull request using "x":
Screenshots (if applicable)
[If the changes involve visual modifications, include screenshots or GIFs that demonstrate the changes.]
Additional Notes
There is an accompanying ticket in moonshot-data
Developer Certificate of Origin