Open Bug 1946560 Opened 12 days ago Updated 16 hours ago

./mach perftest only seems to work with python 3.11

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: mgaudet, Unassigned)

References

(Blocks 2 open bugs)

Details

Trying to run anything with mach perftest is failing for me.

Revision: 5223a9e8f62812d59d3daaedadb64d1be3c8757b

M1MacBook:unified-git mgaudet$ ./mach perftest 
Creating the 'common' site at /Users/mgaudet/.mozbuild/srcdirs/unified-git-0c9f9c149629/_virtualenvs/common
Error running mach:

    mach perftest

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

You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file general`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.

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

The details of the failure are as follows:

TypeError: PerftestArgumentParser._parse_known_args() takes 3 positional arguments but 4 were given

  File "/Users/mgaudet/unified-git/python/mach/mach/main.py", line 267, in run
    return self._run(argv)
           ~~~~~~~~~^^^^^^
  File "/Users/mgaudet/unified-git/python/mach/mach/main.py", line 328, in _run
    args = parser.parse_args(argv)
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1889, in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1899, in parse_known_args
    return self._parse_known_args2(args, namespace, intermixed=False)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1928, in _parse_known_args2
    namespace, args = self._parse_known_args(args, namespace, intermixed)
                      ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2183, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2135, in consume_positionals
    take_action(action, args)
    ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 2004, in take_action
    action(self, namespace, argument_values, option_string)
    ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mgaudet/unified-git/python/mach/mach/dispatcher.py", line 216, in __call__
    command_namespace, extra = subparser.parse_known_args(args)
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/Users/mgaudet/unified-git/python/mozperftest/mozperftest/argparser.py", line 214, in parse_known_args
    return super().parse_known_args(args, namespace)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1899, in parse_known_args
    return self._parse_known_args2(args, namespace, intermixed=False)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/argparse.py", line 1928, in _parse_known_args2
    namespace, args = self._parse_known_args(args, namespace, intermixed)
                      ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This appears to work on Linux however.

Tried downgrading to python3.10... now I get a different problem

Ah! I got it working, sort of, by forcing python 3.11 (and -only- Python 3.11 seems to work)

Summary: ./mach perftest is broken on macOS → ./mach perftest only seems to work with python 3.11

Oh, lies.

python3.11 ./mach ... still fails

python3.11 python/mozperftest/mozperftest/runner.py --flavor custom-script --app fenix testing/performance/mobile-startup/cvne.sh --perfherder.

does work on the other hand.

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.