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

Issue 613015 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 452983
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Pylint not running properly for Autotest

Project Member Reported by bryanlew@chromium.org, May 19 2016

Issue description

Performing a
git commit
and then
repo upload . --cbr
from within src/third_party/autotest/files causes src/repohooks/pre-upload.py to be executed, however, pylint is not executed.

For an example with extra whitespace which would/should have been detected by pylint, see
https://chromium-review.googlesource.com/#/c/343911/
which was uploaded with the following CLI interactions:

bryanlew@bryanlew0 files$ git commit --amend server/hosts/adb_host.py
[log_android_logcat 48b621f] Log Android logcat file, set time beforehand so it is useful.
 Date: Tue May 10 11:21:04 2016 -0700
 1 file changed, 37 insertions(+), 4 deletions(-)
bryanlew@bryanlew0 files$ ggs .
# On branch log_android_logcat
# Your branch is ahead of 'cros/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
nothing to commit, working directory clean
bryanlew@bryanlew0 files$ repo upload . --cbr
Repo must run the script:
  /usr/local/google/home/bryanlew/chromiumos/src/repohooks/pre-upload.py

Do you want to allow this script to run (yes/yes-never-ask-again/NO)? yes

Upload project src/third_party/autotest/files/ to remote branch refs/heads/master:
  branch log_android_logcat ( 1 commit, Wed May 18 16:38:55 2016 -0700):
         48b621f8 Log Android logcat file, set time beforehand so it is useful.
to https://chromium-review.googlesource.com (y/N)? y
Counting objects: 5, done.
Delta compression using up to 48 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.27 KiB | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4)
remote: Processing changes: updated: 1, done    
remote: 
remote: Updated Changes:
remote:   https://chromium-review.googlesource.com/343911 Log Android logcat file, set time beforehand so it is useful.
remote: 
To https://chromium-review.googlesource.com/chromiumos/third_party/autotest
 * [new branch]      log_android_logcat -> refs/for/master

----------------------------------------------------------------------
[OK    ] src/third_party/autotest/files/ log_android_logcat
bryanlew@bryanlew0 files$ 

 

Comment 1 by sbasi@chromium.org, May 19 2016

Cc: dshi@chromium.org
Mike any idea whats up here?

Comment 2 by vapier@chromium.org, May 19 2016

autotest runs its own `./utils/run_pylint.py` hook which uses pylint from $PATH.  it's not the same as `cros lint`.

are you sure it's not running ?  maybe it's just not working well.  either way, seems like a bug in autotest's run_pylint.py rather than a bug in pylint or pre-upload.py.

Comment 3 by sbasi@chromium.org, May 19 2016

Mike, its just his setup. We checked repo and pylint versions, everything is correct.

Not too sure why his setup is having issues...
More data, from trying this inside the chroot

Errors in PROJECT *chromiumos/third_party/autotest*!
    COMMIT 60a7335a:
        Description:
            >Enable logcat logging for adb_host.
            >
            >1. Perform an approximate sync of host and server clocks so that logcat
            >   and Autotest server/test-runner logs can be compared/matched.
            >2. Save ADB device's logcat as 'logcat.log' in the results-#-suiteName
            >   directory.  The entire logcat is included since there are often
            >   boot-time errors which manifest as a test failure much later, for
            >   example, a daemon crashing.
            >
            >BUG= chromium:610699 
            >TEST=L and M devices (for time-set function)
            >TEST=test_droid (on appropriate internal whitelisted targets)
            >
            >Change-Id: I401ca4cb0a4b9aa19d728c6a9c8f6954a99886ce
            >
            >
        Errors:
            * Hook script "./utils/run_pylint.py" failed with code 1:
              Warning: option include-ids is deprecated and ignored.
              ************* Module adb_host
              I:275, 0: Locally disabling missing-docstring (C0111) (locally-disabled)
              I:286, 0: Locally disabling missing-docstring (C0111) (locally-disabled)
              ERROR:root:_check_docstring() got an unexpected keyword argument 'report_missing'

Comment 5 by sbasi@chromium.org, May 19 2016

Summary: Pylint not running properly for Autotest (was: Pylint not running as part of pre-upload.py)
Seems that Dan and I are also not getting errors for whitespace, maybe this broke recently?

Comment 6 by vapier@chromium.org, May 20 2016

running pylint by hand complains.  i try to avoid looking at run_pylint.py.

Comment 7 by autumn@chromium.org, May 23 2016

Labels: Hotlist-Fixit
Mergedinto: 452983
Status: Duplicate (was: Untriaged)
run_pylint doesn't work correctly inside chroot. See https://bugs.chromium.org/p/chromium/issues/detail?id=452983#c31

The right solution is to kill autotest's run_pylint.

Sign in to add a comment