Local installations of some Python packages break typ and Telemetry |
|||||
Issue descriptionIn https://github.com/catapult-project/catapult/issues/3525 we found that having this package installed: python-egenix-mxdatetime causes: ./content/test/gpu/run_unittests.py to core dump in Python code while discovering the unit test list. ynovikov@ found that having the package: python-logilab-common installed also breaks: ./content/test/gpu/run_unittests.py lint_unittest with: [1/1] gpu_tests.lint_unittest.LintTest.testPassingPylintCheckForGpuTestsDir failed unexpectedly 0.0003s: Traceback (most recent call last): File "/usr/local/google/work/clank/src/content/test/gpu/gpu_tests/lint_unittest.py", line 42, in testPassingPylintCheckForGpuTestsDir self.assertTrue(LintCheckPassed(os.path.abspath(os.path.dirname(__file__)))) File "/usr/local/google/work/clank/src/content/test/gpu/gpu_tests/lint_unittest.py", line 30, in LintCheckPassed assert lint, 'pylint module cannot be found' AssertionError: pylint module cannot be found It looks like when running these tests via typ, the local installations in /usr/lib/python2.7/dist-packages/ are taking precedence over the copies in src/third_party/ -- in particular, src/third_party/logilab/ . This is a significant problem. Can typ be made to be more "hermetic"?
,
Apr 28 2017
You mean I should change "sys.path.append(path)" to "sys.path.insert(1, path)"? That didn't help.
,
Apr 28 2017
Note that I wasn't able to reproduce Yuly's problem by installing the python-logilab-common package. There must be an interaction with some other package.
,
Apr 28 2017
Sorry, I was wrong in #2, this change did help. The cause of my mistake was python-logilab-common installing python-egenix-mxdatetime as a dependency.
,
May 23 2017
I also encountered this problem (mxdatetime), and it's likely xlai also ran into this when trying to run roll_webgl_conformance.py and it never finished because of presubmit check failure.
,
May 23 2017
I changed "sys.path.append(path)" to "sys.path.insert(1, path)" and it didn't help my case
,
Jan 16 2018
,
Jan 16 2018
This showed up again for enne in Issue 802403 . Thanks to the Infra folks' deployment of vpython, I can confirm that switching to using that interpreter categorically fixes this crash!
,
Jan 17 2018
,
Jan 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dd4683fdaecfebad642eaf095a962fd304e66e5e commit dd4683fdaecfebad642eaf095a962fd304e66e5e Author: Kenneth Russell <kbr@chromium.org> Date: Wed Jan 17 05:43:15 2018 Always run GPU unit tests with vpython. The vpython tool that's now in depot_tools (and which should be on all Chromium developers' and bots' paths) is sufficiently hermetic to guard against breakage caused by Python related packages being installed on the system. More widespread usage of vpython in the GPU tests will follow. Bug: 716241 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Id01974c5e1f1d0f76a8ab2e57638de52e233e9f9 Reviewed-on: https://chromium-review.googlesource.com/869114 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Cr-Commit-Position: refs/heads/master@{#529634} [modify] https://crrev.com/dd4683fdaecfebad642eaf095a962fd304e66e5e/content/test/gpu/run_unittests.py
,
Mar 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8b319633ee79471b5cc0d5dab9a36a537c8ba274 commit 8b319633ee79471b5cc0d5dab9a36a537c8ba274 Author: Kenneth Russell <kbr@chromium.org> Date: Fri Mar 09 00:03:53 2018 Use vpython for GPU integration tests. Most developers use this harness when running the tests locally, and they should all have depot_tools' vpython on their PATH. This will help ensure that they get the hermetic Python that the bots use. This won't have any effect on the bots since they invoke vpython earlier, and run more wrapper scripts before getting to this one. TBR=iannucci@chromium.org, ynovikov@chromium.org Bug: 716241 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I820ae66b0232387328c75f937c241050f8776c59 Reviewed-on: https://chromium-review.googlesource.com/956553 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Cr-Commit-Position: refs/heads/master@{#541946} [modify] https://crrev.com/8b319633ee79471b5cc0d5dab9a36a537c8ba274/content/test/gpu/run_gpu_integration_test.py
,
Mar 9 2018
This has now been fixed for the common cases of developers running the GPU tests locally. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by nedngu...@google.com
, Apr 28 2017