New issue
Advanced search Search tips

Issue 870389 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 12
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Tricium sends comments for whole file upon renaming change

Project Member Reported by qyears...@chromium.org, Aug 2

Issue description

Example:
https://chromium-review.googlesource.com/c/playground/gerrit-tricium/+/1158848/7

Normally comments are filtered out so that only those comments on changed lines are included; this doesn't work quite as I expected for renamed files, where the whole file is considered changed, so all comments are included.
 
Cc: qyears...@chromium.org
 Issue 890702  has been merged into this issue.
Labels: -Pri-3 Pri-1
(Increasing priority, reported multiple times.)
(If you also implement the requested "don't run on third_party, except third_party/blink" bit, make sure comments aren't disabled when code moves from third_party to non-third_party. Else there are no comments in third_party and then none on the move either.)
Good edge case thakis, I didn't think of that :-)

So, regarding implementation of this:
 - when initially polling the CLs, we have the information from Gerrit about whether the file is a rename, but this information isn't saved
 - when actually filtering out comments that aren't in the diff, we have the patch, which doesn't explicitly mark anything as a rename, it just lists one file as deleted and another file as added -- but we don't have the original information from gerrit that this was a rename (code link https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/gerrit.go?l=151)
Owner: qyears...@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 10

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2

commit 0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Sat Nov 10 01:00:44 2018

[tricium] When sending comments, skip renamed/copied files

This would make it so that:
 - When creating the AnalyzeRequest entity in poll,
   Data_File structs are stored, which include file status.
 - When filtering out comments, we check whether the file
   is a renamed or copied file.

Bug:  870389 
Change-Id: Iec9dc5983fa88e960bf56d1bb74d9da43345f61a
Reviewed-on: https://chromium-review.googlesource.com/c/1274247
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18915}
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/gen.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/common/track/track.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/poll_test.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/tricium.pb.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/proto_gae.gen.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/data.pb.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/gerrit_test.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/poll.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/data.proto
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/driver/rpc_trigger_test.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/config.pb.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/pb.discovery.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/gerrit.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/frontend/rpc_analyze.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/function.pb.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/api/v1/platform.pb.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/rpc_report_results.go
[modify] https://crrev.com/0f5aabec97289c8f4c495b2f8264db5a0d4ff0b2/go/src/infra/tricium/appengine/gerrit/rpc_report_results_test.go

Cc: -qyears...@chromium.org
Status: Started (was: Assigned)
After deploying the above change, I've now gotten the error:

2018/11/12 22:49:28 Failed to read FILES data: failed to unmarshal: unknown field "status" in tricium.Data_File

https://chromium-review.googlesource.com/c/infra/infra/+/1332331/3
https://tricium-dev.appspot.com/run/5712930028912640

First hypothesis: This error is because I updated one function without updating the others. I need to update all analyzers too.
Status: Fixed (was: Started)
Hypothesis confirmed, this now works as expected after updating all of the analyzers (e.g. https://chromium-review.googlesource.com/c/infra/infra/+/1332331/4, https://tricium-dev.appspot.com/run/5669890933391360)

Sign in to add a comment