Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2676 +/- ##
==========================================
- Coverage 79.37% 79.30% -0.07%
==========================================
Files 662 662
Lines 52526 52590 +64
Branches 734 734
==========================================
+ Hits 41690 41707 +17
- Misses 10756 10803 +47
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
What there a reason you didn't use import requests
from requests.adapters import HTTPAdapter
from urllib3.util import Retry
session = requests.Session()
retries = Retry(total=5, backoff_factor=1, status_forcelist=[429, 500, 502, 503])
session.mount('http://', HTTPAdapter(max_retries=retries))
response = session.get('http://example.com') |
Retrying regular 500 is super dangerous, because it could duplicate actions (don't know where in the code it crashed). 502, 503 is probably ok. |
|
What about Ruby? |
ryanmelt
left a comment
There was a problem hiding this comment.
Ruby and python behavior should be the same.
clayandgen
left a comment
There was a problem hiding this comment.
Could we use the Faraday retry in Ruby and urllib3 Retry in Python to simplify the logic? I think that's more standard, unless this was intentional to keep the python and ruby code more in-line
|
Based on claude's analysis, faraday-retry cannot directly replace the current custom retry logic. Here's why: The custom retry logic does something faraday-retry cannot: Why faraday-retry Won't Work
We could use faraday-retry if we changed the architecture to not persist the @http connection - i.e., create a new Faraday instance for each request. But that would:
The same thing applies for the Python code and urllib3:
|
closes #2233