Commit a06cd091 authored by Andy Perelson's avatar Andy Perelson Committed by Commit Bot

Revert "git cl upload: print response headers on 404 Gerrit RPC status."

This reverts commit ea4301e5. We now have many
reponse headers, stopping contributions until and unless we are asked for more
as part of debugging git cl upload issues.

R=tandrii@chromium.org

Bug: 881860
Change-Id: Ic3524aa93f146cebd882efe30b2e3f110cf74838
Reviewed-on: https://chromium-review.googlesource.com/1241613Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andy Perelson <ajp@chromium.org>
parent aaf2cc09
...@@ -411,26 +411,12 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])): ...@@ -411,26 +411,12 @@ def ReadHttpResponse(conn, accept_statuses=frozenset([200])):
break break
# A status >=500 is assumed to be a possible transient error; retry. # A status >=500 is assumed to be a possible transient error; retry.
http_version = 'HTTP/%s' % ('1.1' if response.version == 11 else '1.0') http_version = 'HTTP/%s' % ('1.1' if response.version == 11 else '1.0')
LOGGER.warn('A transient error occurred while querying %s:\n'
# TODO(crbug/881860): remove this special 404 handling. '%s %s %s\n'
if response.status == 404: '%s %d %s',
LOGGER.warn( conn.req_host, conn.req_params['method'],
'404 NotFound error occurred while querying %s %s: %s\n' conn.req_params['uri'],
'NOTE: if see this while running `git cl upload`,\n' http_version, http_version, response.status, response.reason)
'consider reporting this to https://crbug.com/881860.\n'
'Please, include response headers below:\n'
' %s\n',
conn.req_params['method'], conn.req_params['uri'], response.reason,
'\n '.join(
json.dumps(response, sort_keys=True, indent=2).splitlines()))
else:
LOGGER.warn('A transient error occurred while querying %s:\n'
'%s %s\n'
'%s %d %s\n',
conn.req_host,
conn.req_params['method'], conn.req_params['uri'],
http_version, response.status, response.reason)
if TRY_LIMIT - idx > 1: if TRY_LIMIT - idx > 1:
LOGGER.info('Will retry in %d seconds (%d more times)...', LOGGER.info('Will retry in %d seconds (%d more times)...',
sleep_time, TRY_LIMIT - idx - 1) sleep_time, TRY_LIMIT - idx - 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment