New issue
Advanced search Search tips

Issue 807036 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Only run analysis for "non-trivial" Gerrit revisions

Project Member Reported by qyears...@chromium.org, Jan 29 2018

Issue description

Gerrit revisions ("patchsets") have a "kind" property which indicates whether or not they are "trivial", i.e. whether there may actually be real change in the code behavior. The kind may be one of:

 REWORK
 TRIVIAL_REBASE
 MERGE_FIRST_PARENT_UPDATE
 NO_CODE_CHANGE
 NO_CHANGE

https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-info

Currently when a new revision is uploaded, it's tracked and an analyze request is enqueued regardless of whether the revision is trivial. This results in some unnecessary load on Tricium.

https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/poll.go?l=287

Proposed desired behavior:
 - Tricium should only launch a new AnalyzeRequest for REWORK revisions.
 - The Gerrit plugin UI should always show the results for the last non-trivial.

Specifics: In poll.go when going through changes, Tricium already has the ChangeInfo which contains RevisionInfo, which contains the type for all revisions. I think we should change the logic to only enqueue no analyses when the latest revision has kind == REWORK.

A corresponding change should also be made in the plugin, to always request progress for the latest non-trivial patchset even if there are more trivial patchsets after that.
 
Summary: Only run analysis for "non-trivial" Gerrit revisions (was: Tricium feature refinement: Only run analysis for "non-trivial" revisions)
Components: Infra>Platform>Tricium
Components: -Infra>CodeAnalysis
Labels: -Tricium
Cc: qyears...@chromium.org
 Issue 893108  has been merged into this issue.
Labels: -Pri-3 Pri-2
Note, changing the behavior of the server *should* be relatively easy to do as described in the original report, but the Gerrit library we're using doesn't currently include the required field (Kind) in RevisionInfo:

https://github.com/golang/build/blob/master/gerrit/gerrit.go#L278

This should be added there first.
Note, WIP CL https://chromium-review.googlesource.com/c/infra/infra/+/1302153
As noted in #6, this should be finished after making a change to https://go.googlesource.com/build/+/master/gerrit/gerrit.go.
Labels: Hotlist-GoodFirstBug

Sign in to add a comment