-
Notifications
You must be signed in to change notification settings - Fork 199
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
SG-33891 Retries also on 504 #316
Conversation
@@ -3443,8 +3443,8 @@ def _call_rpc(self, method, params, include_auth_params=True, first=False): | |||
# We've seen some rare instances of SG returning 502 for issues that | |||
# appear to be caused by something internal to SG. We're going to | |||
# allow for limited retries for those specifically. | |||
if attempt != max_attempts and e.errcode == 502: | |||
LOG.debug("Got a 502 response. Waiting and retrying...") | |||
if attempt != max_attempts and e.errcode in [502, 504]: |
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.
You might want to use HTTPStatus constants instead: http.HTTPStatus.SERVICE_UNAVAILABLE
and http.HTTPStatus.GATEWAY_TIMEOUT
Not a blocker but it's usually better to use constants.
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.
I know. However, this would imply a full rewrite of the python-api and we can address that in the future.
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.
LGTM!
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.
LGTM! 🚢
No description provided.