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

Issue 806770 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

GitFileIsolator is failing on some changes

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

Issue description

Example failure: https://chromium-swarm.appspot.com/task?id=3b57f6cf42f3e810&refresh=10&show_raw=1

Corresponding Gerrit change: https://gerrit-review.googlesource.com/c/gerrit/+/155410

The fetch command is failing and it seems to be due to the file in question being deleted. This information needs to be either propagaed to the function via the GitDetails or the git command needs to be relaxed (if possible).
 
So, to clarify, are these the possible options below?

Option #1: Change GitFileDetails (and possibly AnalyzeRequest) to include details about how files were modified (added/removed/modified/copied/renamed etc.) and then, in git-file-isolator, skip over files that were deleted.

https://chromium.googlesource.com/infra/infra/+/89dfd42aff/go/src/infra/tricium/api/v1/data.proto#35

Option #2: Change GitFileIsolator to check whether files exist when checking out and copying these files over; if they don't exist, just log a message and skip that file, and omit that file path from the paths list in the Files data.


Slightly related separate discussion: Currently it looks like GitFileDetails and Files don't directly contain any data about specifically which parts of the file were changed, although it seems like would be useful information for most analyzers. Does it sound like a potentially good idea to include the patch as a text file with the files data? Or something else?
Owner: qyears...@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/c/infra/infra/+/935677
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 26 2018

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

commit ae28364c740acff97ae118adcb2808b6cb5129c5
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Feb 26 20:46:58 2018

Filter out deleted files when polling Gerrit

GitFileIsolator was failing only when it encountered files that
were deleted in a change. This only happens when an AnalyzeRequest
was created that includes deleted files.

It turns out that Emma had already thought of filtering out deleted
files when creating analyze requests when polling Gerrit -- the
only reason why they weren't filtered out because the wrong constant
was used to indicate deletion.

This CL adds a unit test to cover the filtering behavior and makes
named constants for the possible Gerrit file statuses.

Bug:  806770 
Change-Id: If28e22968b383e948d492e673488b450d2be904e
Reviewed-on: https://chromium-review.googlesource.com/935677
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/ae28364c740acff97ae118adcb2808b6cb5129c5/go/src/infra/tricium/appengine/gerrit/poll.go
[modify] https://crrev.com/ae28364c740acff97ae118adcb2808b6cb5129c5/go/src/infra/tricium/appengine/gerrit/gerrit.infra_testing
[modify] https://crrev.com/ae28364c740acff97ae118adcb2808b6cb5129c5/go/src/infra/tricium/appengine/gerrit/poll_test.go

Status: Fixed (was: Started)
Verified that in https://canary-chromium-review.googlesource.com/c/playground/gerrit-tricium/+/943678, GitFileIsolator now no longer fails since it no longers looks at deleted files.

Although, now analyze requests with only deleted files with fail, see  bug 817808 .

Sign in to add a comment