Files
gerrit/java/com/google/gerrit
Edwin Kempin 1334b131bb Fix returning trace ID to client on failure after auto retry with trace
There were several bugs:

1. The @Test annotation on the autoRetryWithTrace test was missing so
   that the test wasn't executed.

2. A trace ID is only returned to the client if the request results in
   an Internal Server Error, but the test was checking a case where the
   request was succeeding due to the retry, hence no trace ID was
   returned.

3. In case of Internal Server Error RestApiServlet resets the response
   so that a previously set response header with the trace ID was
   removed. We must reset the header with the trace ID after the reset
   of the response has happened.

4. The test used the Submit REST endpoint, but this REST endpoint has
   custom retry logic (it doesn't use RetryingRestModifyView) that
   didn't capture and return the trace ID to RestApiServlet yet. Fix
   that.

Modifying the return type of Submit#mergeChange(...) is okay, since the
usage at Google doesn't use the return value.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I5d21b8ed20cca6ca0915427bb1258a64b33c4637
2019-09-24 14:28:07 +02:00
..
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00
2019-09-21 19:14:20 +09:00
2019-09-05 10:14:43 +02:00
2019-09-05 10:14:43 +02:00