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

Issue 681516 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 16
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 852001



Sign in to add a comment

Add a Tricium Pylint Analyzer

Project Member Reported by emso@chromium.org, Jan 16 2017

Issue description

PyLint analyzer producing real findings and using a real workflow config.

* Propagation of analyzer binary to bots.
* Multiple results and analyzer doing actual work.
* Service analyzer specification with implementation.
* Compose workflow config from analysis request.
* First display of real and multiple results in the UI.
* When done: Consumer dogfooding opportunity!

 

Comment 1 by emso@chromium.org, Sep 13 2017

Status: Available (was: Assigned)

Comment 2 by emso@chromium.org, Sep 13 2017

Owner: ----

Comment 3 by emso@chromium.org, Sep 22 2017

Labels: -Pri-2 -Milestone-PyLint Milestone-Analyze Pri-1
Owner: emso@chromium.org
Status: Assigned (was: Available)

Comment 4 by emso@chromium.org, Sep 25 2017

Status: Started (was: Assigned)

Comment 5 by emso@chromium.org, Jan 22 2018

Owner: ----
Status: Available (was: Started)
Owner: qyears...@chromium.org
Status: Assigned (was: Available)
Summary: Tricium Pylint Analyzer (was: Tricium PyLint Analyzer)
WIP CL: https://chromium-review.googlesource.com/c/infra/infra/+/957935

One design choice for analyzers that depend on external programs will be where to put the external programs.

It might make sense to put them in separate CIPD packages. If that's what we want to do, then for Pylint we need to

Planned things still to do here:
 - Upload a CIPD package for pylint (probably fetched from pip and put
   somewhere like infra/third_party/tools/pylint)
 - Land https://chromium-review.googlesource.com/c/infra/infra/+/957935
 - Add an experimental analyzer specification in the playground repo,
   with all of the required CIPD packages.
 - Test and iterate.
Summary: Add a Tricium Pylint Analyzer (was: Tricium Pylint Analyzer)
Notes from Robbie:

In Pylint for presubmits, we sometimes want to include related files in the same package and also other dependency packages that the code depends on, and add those packages to PYTHONPATH.

We may want to avoid this entirely and disable all analysis that can't be done with just individual file contents.

If we wanted to have Python warnings that relied on third party dependencies and/or other files in the same package, it's possible we would want to change the input data type.
Labels: -Pri-1 -Milestone-Analyze Milestone-Contribution Pri-2
Owner: ----
Status: Available (was: Assigned)
Note, putting this on hold for a little bit. When looking at this again, the above WIP CL will be a good place to start.
Owner: diegomtzg@google.com
Status: Assigned (was: Available)
Blockedon: 852001
Status: Started (was: Assigned)
Diego started this; we deployed a package to CIPD and added the Pylint analyzer definition and selection to the playground/gerrit-tricium project config, but the analyzer wasn't run since the project config didn't contain the changes; this is  bug 852001 .
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 13 2018

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

commit 979940defaa905afb64ab3c22468680aafb35b84
Author: Diego Martinez <diegomtzg@google.com>
Date: Wed Jun 13 20:48:08 2018

Add pylint analyzer

An output parser for pylint. Based off of abandoned CL 957935 by
@qyearsley. Finished tests and added new ones to ensure correctness.

Bug:  681516 
Change-Id: I4d4a9e836710937528d14429ebef09725e5fc815
Reviewed-on: https://chromium-review.googlesource.com/1089995
Commit-Queue: Diego Martinez <diegomtzg@google.com>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/README.md
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/cipd.yaml
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/pylint_parser.go
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/pylint.infra_testing
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/test/python.example
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/pylint_parser_test.go
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/test/tricium/data/files.json
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/pylintrc
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/Makefile
[add] https://crrev.com/979940defaa905afb64ab3c22468680aafb35b84/go/src/infra/tricium/functions/pylint/.gitignore

are there plans/docs for controlling the pylintrc settings on a per-repo basis ?
Good question - There are very rough plans, or at least discussion in this doc: https://docs.google.com/document/d/1_-IDGQ_3_MRD3hrrzeNG8jQnQL563_1aUNUfrbja-bo/edit

There are a couple of possibilities:
 - Path to pylintrc should be able to be specified the analyzer "selections" in the project config.
 - If none given, the analyzer could possibly look for pylintrc files in particular places in the input repo.

Anyway, the initial version doesn't support either way yet.
Components: Infra>Platform>Tricium
Components: -Infra>CodeAnalysis
Labels: -Tricium
Project Member

Comment 18 by bugdroid1@chromium.org, Jul 2

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/7a5dc0cc839eb7f3987cdeefecfe7dd485f57b7e

commit 7a5dc0cc839eb7f3987cdeefecfe7dd485f57b7e
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 02 18:21:56 2018

First Tricium run on a CL with Pylint: https://chromium-review.googlesource.com/c/playground/gerrit-tricium/+/1097599/27

Swarming task:
https://chromium-swarm.appspot.com/task?id=3e756e94fd42fc10&refresh=10&show_raw=1

The pylint wrapper ran, but unexpectedly had no output:
2018/07/02 20:09:32 Command args: []string{"/b/s/w/ir/pylint/bin/pylint", "--rcfile", "/b/s/w/ir/pylintrc", "example.py", "example.txt"}
2018/07/02 20:09:32 Wrote RESULTS data, path: "/b/s/w/ioqwG3nE/tricium/data/results.json", value: 
Project Member

Comment 20 by bugdroid1@chromium.org, Jul 11

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

commit 10787dc8325b0ff4a995e01cfde0f89c5dd99ce8
Author: Diego Martinez <diegomtzg@google.com>
Date: Wed Jul 11 18:33:35 2018

Set PYTHONPATH of Pylint subprocess on Pylint analyzer.

The PYTHONPATH is set so that the subprocess runs the bundled version of Pylint along with its dependencies.

Bug:  681516 

Change-Id: Icb6cccaa968681b1c868fb88fba819c1b7d2a4ba
Reviewed-on: https://chromium-review.googlesource.com/1133590
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Diego Martinez <diegomtzg@google.com>

[modify] https://crrev.com/10787dc8325b0ff4a995e01cfde0f89c5dd99ce8/go/src/infra/tricium/functions/pylint/Makefile
[modify] https://crrev.com/10787dc8325b0ff4a995e01cfde0f89c5dd99ce8/go/src/infra/tricium/functions/pylint/pylint_parser.go

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 12

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

commit 9a6082495e8da5049a30bf75b64932866f609ccc
Author: Diego Martinez <diegomtzg@google.com>
Date: Thu Jul 12 23:34:42 2018

Improved pylint_parser logging

Bug:  681516 
Change-Id: I61216beaa7bb21e902c25d69645fcbd21acc540d
Reviewed-on: https://chromium-review.googlesource.com/1135896
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/9a6082495e8da5049a30bf75b64932866f609ccc/go/src/infra/tricium/functions/pylint/pylint_parser.go

Status: Fixed (was: Started)
Done! Pylint analyzer is now added.

Next step: enable Pylint for infra repo.
Project Member

Comment 23 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/e60dce4023d66c257a6493ef2d39caa08f960b99

commit e60dce4023d66c257a6493ef2d39caa08f960b99
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 16 20:07:56 2018

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/07c3044001c319a6a2782526891e6c25e1e6a26c

commit 07c3044001c319a6a2782526891e6c25e1e6a26c
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 16 22:11:44 2018

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 16

Labels: merge-merged-config
The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/5b49e23a578a279f224f950291f9d81edec65668

commit 5b49e23a578a279f224f950291f9d81edec65668
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Mon Jul 16 23:31:45 2018

[tricium] Enable Pylint in the infra repo

Bug:  681516 
Change-Id: I1e31c8dfc61b7ee8130507a5d16120472357e31b
Reviewed-on: https://chromium-review.googlesource.com/1138713
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/5b49e23a578a279f224f950291f9d81edec65668/tricium-dev.cfg

Sign in to add a comment