Only run analysis for "non-trivial" Gerrit revisions |
|||||
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.
,
Jun 15 2018
,
Jun 15 2018
,
Oct 8
,
Oct 8
,
Oct 8
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.
,
Oct 26
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.
,
Jan 1
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by qyears...@chromium.org
, May 15 2018