CLI should retry when it encounters a 502 error #88
Replies: 2 comments
-
I see there's some retry logic in https://github.com/codecov/codecov-cli/blob/711b01f82d93359fe459bab7b4e8405e9cf5729d/codecov_cli/helpers/request.py#L19 but it's not catching specific status code, just critical exceptions I've had success using urllib3's native retry capabilities and mounting a custom session = requests.Session()
adapter = HTTPAdapter(
max_retries=Retry(
total=3,
backoff_factor=0,
status_forcelist=[
HTTPStatus.TOO_MANY_REQUESTS,
HTTPStatus.INTERNAL_SERVER_ERROR,
HTTPStatus.BAD_GATEWAY,
HTTPStatus.SERVICE_UNAVAILABLE,
HTTPStatus.GATEWAY_TIMEOUT,
],
raise_on_status=False,
),
)
session.mount("http://", adapter)
session.mount("https://", adapter) but it might not be easy to fit a |
Beta Was this translation helpful? Give feedback.
-
Hey @edgarrmondragon - I'm going to create an issue on the codecov CLI repo so we can track and prioritize there |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When the CLI encounters a 502 error
It should retry.
Beta Was this translation helpful? Give feedback.
All reactions