New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 809742 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Tricium service fails to send SetReview requests to Gerrit

Project Member Reported by qyears...@chromium.org, Feb 6 2018

Issue description

Background:
Tricium sends SetReview requests to Gerrit in order to send update messages and comments. API reference: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review. The request, apart from the request body, requires a change ID and revision ID. Previously, this was working with a "project~branch~change-id-footer" change ID, and a SHA1 hash revision ID. The documentation says that a legacy patchset number could also be used.

In https://chromium.googlesource.com/infra/infra/+/38bc02077, I changed the revision string to a git ref hash, and after deploying that change, Gerrit started returning 404 not found responses.

Then, in https://chromium.googlesource.com/infra/infra/+/47b35eab2, I changed the revision string to a legacy patch set number, and after deploying that change and making a test patch set upload, I got the following in the Tricium logs:

[gerrit] JSON body: {"message":"Tricium finished analyzing patch set and found 2 results (run ID: 5710239819104256).\n  GitFileIsolator: 0\n  Hello: 1\n  Spacey: 1\n","notify":"NONE"}
Using Gerrit Set Review URL: chromium-review.googlesource.com/a/changes/playground%2Fgerrit-tricium%2Fdemo~master~I362c3eebfda853f8f22df3b98b2c0c572ae00f66/revisions/1/review
[gerrit] Failed to call Gerrit.ReportCompleted :: {"error":"rpc error: code = Internal desc = failed to report completed to Gerrit: Post chromium-review.googlesource.com/a/changes/playground%2Fgerrit-tricium%2Fdemo~master~I362c3eebfda853f8f22df3b98b2c0c572ae00f66/revisions/1/review: API error 1 (urlfetch: INVALID_URL)"}

Note, this log entry corresponds to an analyze request made last week:
with GerritRevision and GitRef set to: refs/changes/63/899863/1

The response from Gerrit suggests that it might not accept legacy patch set numbers, but this isn't yet fully confirmed. We know that revision SHA1 hashes work, so it's possible we may want to go back to using those.
 
Status: Fixed (was: Assigned)
Summary: Tricium service fails to send SetReview requests to Gerrit (was: Tricium service fails to set SetReview requests to Gerrit)
Gerrit is now successfully sending SetReview requests with the legacy patch set number.

Sign in to add a comment