talos --print-tests and --print-suites are broken

RESOLVED FIXED in Firefox 45, Firefox OS v2.5

Status

Testing
Talos
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: parkouss, Assigned: parkouss)

Tracking

unspecified
mozilla45
Points:
---

Firefox Tracking Flags

(firefox45 fixed, b2g-v2.5 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
talos --printsuites

Traceback (most recent call last):
  File "/home/jp/dev/mozilla-central/testing/talos/venv/bin/talos", line 9, in <module>
    load_entry_point('talos==0.0', 'console_scripts', 'talos')()
  File "/home/jp/dev/mozilla-central/testing/talos/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/jp/dev/mozilla-central/testing/talos/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/home/jp/dev/mozilla-central/testing/talos/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/home/jp/dev/mozilla-central/testing/talos/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/jp/dev/mozilla-central/testing/talos/talos/run_tests.py", line 21, in <module>
    from talos.config import get_configs, ConfigurationError
  File "/home/jp/dev/mozilla-central/testing/talos/talos/config.py", line 10, in <module>
    from talos.cmdline import parse_args
  File "/home/jp/dev/mozilla-central/testing/talos/talos/cmdline.py", line 9, in <module>
    from talos.config import suites_conf
ImportError: cannot import name suites_conf

And same kind of error for --print-tests.
(Assignee)

Comment 1

2 years ago
Created attachment 8684436 [details]
MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher

Bug 1222603 - talos --print-tests and --print-suites are broken. r=wlach
Attachment #8684436 - Flags: review?(wlachance)
Comment on attachment 8684436 [details]
MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher

https://reviewboard.mozilla.org/r/24569/#review22123

Looks good! I slightly prefer global imports, but I don't think it matters that much in this case.
Attachment #8684436 - Flags: review?(wlachance) → review+
(Assignee)

Comment 3

2 years ago
Yeah, we have a circular dependency if I don't do that - and I also find that it is not that important here, so let's stick with that. Thanks!
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
(Assignee)

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6c8c54a1a4ba21066af2e5ba79300f9450a2a4e
Bug 1222603 - talos --print-tests and --print-suites are broken. r=wlach

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e6c8c54a1a4b
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1217019
(Assignee)

Comment 7

2 years ago
So, I just rebuilt firefox from scratch, "./mach clobber && ./mach build", I still see the issue:

./mach talos-test --print-suites
Error running mach:

    ['talos-test', '--print-suites']

The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.

Please consider filing a bug against mach by going to the URL:

    https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach


If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

ImportError: No module named talos.config

  File "/home/jp/dev/mozilla-central/python/mach/mach/main.py", line 336, in run
    return self._run(argv)
  File "/home/jp/dev/mozilla-central/python/mach/mach/main.py", line 382, in _run
    args = parser.parse_args(argv)
  File "/usr/lib/python2.7/argparse.py", line 1701, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1921, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1898, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/jp/dev/mozilla-central/python/mach/mach/dispatcher.py", line 220, in __call__
    command_namespace, extra = subparser.parse_known_args(args)
  File "/usr/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1939, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1879, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/jp/dev/mozilla-central/testing/talos/talos/cmdline.py", line 40, in __call__
    from talos.config import suites_conf
  File "/home/jp/dev/mozilla-central/build/mach_bootstrap.py", line 338, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)

My guess is that it worked with the previous patch because I installed talos in the global virtualenv in obj dir. ;
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

2 years ago
Attachment #8684436 - Attachment description: MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=wlach → MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher
Attachment #8684436 - Flags: review?(jmaher)
(Assignee)

Comment 8

2 years ago
Comment on attachment 8684436 [details]
MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24569/diff/1-2/
(Assignee)

Comment 9

2 years ago
It works well locally now.

Note that what fixes the issue is to add in sys.path the talos dir, and not talos/talos. I took the opportunity to clean a bit the file.
Comment on attachment 8684436 [details]
MozReview Request: Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher

https://reviewboard.mozilla.org/r/24569/#review23345

this looks good, maybe I don't understand the changes fully- is the main change a sys.path.insert vs sys.path.append?
Attachment #8684436 - Flags: review?(jmaher) → review+
(Assignee)

Comment 11

2 years ago
So we discussed on irc, going to land it.
(Assignee)

Comment 12

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/aadf9704e451d949c356648ee2235a5acbb89247
Bug 1222603 - talos --print-tests and --print-suites are broken. r=jmaher

Comment 13

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/aadf9704e451
Status: REOPENED → RESOLVED
Last Resolved: 2 years ago2 years ago
Resolution: --- → FIXED

Comment 14

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/1336d8c3418f
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/87aa3bcf4e4c
status-b2g-v2.5: --- → fixed
You need to log in before you can comment on or make changes to this bug.