Circular imports break build_event_unittest. |
||
Issue description
Chrome Version: No
OS: (e.g. Win10, MacOS 10.12, etc...)
What steps will reproduce the problem?
(1) Follow the instructions at chromiumos/infra/suite_scheduler/README.md
What is the expected result?
Passing unit tests.
What happens instead?
Failed import:
$ python runner.py --test_path build_event_unittest
Traceback (most recent call last):
File "runner.py", line 101, in <module>
result = main(args)
File "runner.py", line 49, in main
input_args.test_path, TEST_PATTERN_MAP[input_args.test_type])
File "/usr/lib/python2.7/unittest/loader.py", line 192, in discover
__import__(start_dir)
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/build_event_unittest.py", line 10, in <module>
import build_event
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/build_event.py", line 9, in <module>
import base_event
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/base_event.py", line 14, in <module>
import task
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/task.py", line 13, in <module>
import task_executor
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/task_executor.py", line 11, in <module>
import swarming_lib
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/swarming_lib.py", line 11, in <module>
import config_reader
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/config_reader.py", line 16, in <module>
import timed_event
File "/usr/local/google/home/craigb/src/chromiumos/infra/suite_scheduler/timed_event.py", line 16, in <module>
class TimedEvent(base_event.BaseEvent):
AttributeError: 'module' object has no attribute 'BaseEvent'
,
May 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/infra/suite_scheduler/+/bdf4521711cf58b5aa0b41a000945831a267410c commit bdf4521711cf58b5aa0b41a000945831a267410c Author: Craig Bergstrom <craigb@google.com> Date: Fri May 04 18:07:59 2018 suite_scheduler: Fix TaskProcessor call. In Change-Id Id701f314d13a2e64b833727da39287d41c93c5dc, I refactored calls to TaskProcessor.__init__, but missed one. Hence, I caused a stack trace during the push to staging: __init__() takes exactly 3 arguments (2 given) (/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py:1528) Traceback (most recent call last): File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__ rv = self.handle_exception(request, response, e) File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__ rv = self.router.dispatch(request, response) File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher return route.handler_adapter(request, response) File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__ return handler.dispatch() File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch return self.handle_exception(e, self.app.debug) File "/base/alloc/tmpfs/dynamic_runtimes/python27/c5586dbb532f7e5f_unzipped/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch return method(*args, **kwargs) File "/base/data/home/apps/s~google.com:suite-scheduler-staging/20180504t114757.409486509978209887/cron.py", line 124, in get task_processor = task_executor.TaskProcessor(task_executor.SUITES_QUEUE) TypeError: __init__() takes exactly 3 arguments (2 given) BUG= chromium:834130 TEST=Ran TestPush locally. Change-Id: I34937e9da718f39963325cb4b5b9b5753e5b20a8 [modify] https://crrev.com/bdf4521711cf58b5aa0b41a000945831a267410c/cron.py
,
May 17 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 1 2018