chroma
chroma copied to clipboard
[ENH]: Retry Strategy for HttpClient
Description of changes
Summarize the changes made by this PR.
- New functionality
- Retry strategy configuration for HttpClient to give more control to users to deal with intermittent or retryable error codes (e.g. 429, 502,503,504)
- Sensible defaults are configured for the HttpClient
Test plan
How are these changes tested?
- [x] Tests pass locally with
pytest
for python,yarn test
for js,cargo test
for rust
Documentation Changes
Example added
Refs
- https://discord.com/channels/1073293645303795742/1238417639400017920
- https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry
- https://requests.readthedocs.io/en/latest/api/#requests.adapters.HTTPAdapter
Future work
The second-order effect of the Retryable strategy is that it is immediately usable/pluggable into the majority of EFs that rely on requests
library