Weird presubmit error

6 views
Skip to first unread message

Bruce Dawson

unread,
Mar 3, 2023, 8:19:25 PM3/3/23
to python
This presubmit error started showing up on this build of the presubmit --all builder: https://ci.chromium.org/ui/p/chromium/builders/ci/linux-presubmit/3591/overview


** Presubmit ERRORS: 1 **
Pylint (158 files using ['--disable=cyclic-import'] on 8 processes)
/usr/local/google/home/brucedawson/src/depot_tools/pylint-2.7 --args-on-stdin (22.24s) failed
************* Module pylib.base.base_test_result
pylib/base/base_test_result.py:12:0: E0611: No name 'results' in module 'lib' (no-name-in-module)
************* Module resource_sizes
resource_sizes.py:51:2: E0611: No name 'results' in module 'lib' (no-name-in-module)
resource_sizes.py:52:2: E0611: No name 'results' in module 'lib' (no-name-in-module)
************* Module test_runner
test_runner.py:59:0: E0611: No name 'results' in module 'lib' (no-name-in-module)


The mystery is that the blamelist looks blameless and restoring to before those changes didn't help. I looked for relevant depot_tools changes (maybe crrev.com/c/4301253?) but going back in depot_tools history didn't seem to help either.

Is there something else that could have caused this? An infra change perhaps? Am I not correctly restoring the old depot_tools state? Any other ideas?

My minimal repro command, BTW, is this:
  git cl presubmit --force --files "build/android/resource_sizes.py"

--
Bruce Dawson, he/him

Bruce Dawson

unread,
Mar 3, 2023, 8:20:35 PM3/3/23
to python
Oh wait, it looks like my failure to make it appear/disappear is because I wasn't running gclient sync -D. Normally this isn't needed for presubmit errors, but this time it is. Please hold...
--
Bruce Dawson, he/him

Bruce Dawson

unread,
Mar 3, 2023, 8:52:26 PM3/3/23
to python
Okay, it makes sense now. It was a depot_tools change (crrev.com/c/4289679) which creates a lib module which conflicts with the one that build/android uses. The DEPSed version of depot_tools (in third_party/depot_tools) is what was conflicting so I had to run gclient sync so that the depot_tools roll (crrev.com/c/4300023) would take effect.

More clearly stated:
I wish PyLint would print full paths or the current directory because at first I wasn't even sure which resource_sizes.py file was causing the failure.
--
Bruce Dawson, he/him

Reply all
Reply to author
Forward
0 new messages