-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH]: Retry Strategy for HttpClient #2183
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
d57133a
to
809c5d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
chromadb/test/test_client.py
Outdated
retry=RetryStrategy(connect=connect_retries - 1, backoff_factor=1), | ||
) | ||
assert ( | ||
time.time() - start_time > 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, not super clear to me, does this work because .heartbeat()
is called when initing the client?
chromadb/test/test_client.py
Outdated
|
||
|
||
@pytest.fixture | ||
def retry_session_with_custom_retry(httpserver: HTTPServer) -> chromadb.api.ClientAPI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
def retry_session_with_custom_retry(httpserver: HTTPServer) -> chromadb.api.ClientAPI: | |
def retry_session_on_504(httpserver: HTTPServer) -> chromadb.api.ClientAPI: |
809c5d9
to
0f39d31
Compare
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Example added
Refs
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