Add gerrit retries for HTTP 409 Conflict responses.

BUG=crbug.com/854886,b/110032771
R=tandrii@google.com

Change-Id: Iabd67f8042ab3bc7c6ef15101effeeebf39d4500
Reviewed-on: https://chromium-review.googlesource.com/1111007
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Michael Moss <mmoss@chromium.org>
changes/07/1111007/2
Michael Moss 7 years ago committed by Commit Bot
parent 09098853e1
commit 120b2e4f26

@ -393,9 +393,9 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])):
raise GerritAuthenticationError(response.status, reason) raise GerritAuthenticationError(response.status, reason)
# If response.status < 500 then the result is final; break retry loop. # If response.status < 500 then the result is final; break retry loop.
# If the response is 404, it might be because of replication lag, so # If the response is 404/409, it might be because of replication lag, so
# keep trying anyway. # keep trying anyway.
if ((response.status < 500 and response.status != 404) if ((response.status < 500 and response.status not in [404, 409])
or response.status in accept_statuses): or response.status in accept_statuses):
LOGGER.debug('got response %d for %s %s', response.status, LOGGER.debug('got response %d for %s %s', response.status,
conn.req_params['method'], conn.req_params['uri']) conn.req_params['method'], conn.req_params['uri'])

@ -6,7 +6,8 @@ All they had was one poor machine under a desk, and its name was Batty,
the Build and Test Yeti. the Build and Test Yeti.
As the CI needs of the browser grew, Batty, the Build and Test Yeti, got As the CI needs of the browser grew, Batty, the Build and Test Yeti, got
a new friend: a new friend, but this information was marked RVG, so it was months before
any details were revealed.
The End! The End!

Loading…
Cancel
Save