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.
Comment 1 by qyears...@chromium.org
, Feb 7 2018Summary: Tricium service fails to send SetReview requests to Gerrit (was: Tricium service fails to set SetReview requests to Gerrit)