ansible-community / ansible-community/molecule-plugins
Tests failed when packaging for openSUSE: "argparse.ArgumentError: argument --connection: conflicting option string: --connection"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 164
- Forks
- 113
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 1
Description
The molecule-plugins package for openSUSE fails to build with the following error message. And I cannot figure out, where to fix this.
The following packages are being used:
- molecule-6.0.2-26.1.noarch
- python3-pytest-ansible-4.1.1-11.4.noarch
- python311-pytest-7.4.3-1.1.noarch
- python311-pytest-helpers-namespace-2021.12.29-2.1.noarch
- python311-pytest-html-4.0.0-1.1.noarch
- python311-pytest-metadata-3.0.0-1.2.noarch
- python311-pytest-mock-3.12.0-1.1.noarch
- python311-pytest-plus-0.6.0-15.1.noarch
- python311-pytest-testinfra-8.1.0-16.14.noarch
- python311-pytest-xdist-3.3.1-1.4.noarch
Any ideas?
(Yes, I know that the test upstream are run by tox, but that is not possible in the OBS build environment. So please bear with me...)
Kind Regards,
Johannes
```
[ 63s] + pytest-3.11 --ignore=_build.python3 -v --collect-only
[ 67s] Traceback (most recent call last):
[ 67s] File "/usr/bin/pytest-3.11", line 33, in
[ 67s] sys.exit(load_entry_point('pytest==7.4.3', 'console_scripts', 'pytest')())
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 192, in console_main
[ 67s] code = main()
[ 67s] ^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 150, in main
[ 67s] config = _prepareconfig(args, plugins)
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 331, in _prepareconfig
[ 67s] config = pluginmanager.hook.pytest_cmdline_parse(
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/pluggy/_hooks.py", line 493, in __call__
[ 67s] return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 115, in _hookexec
[ 67s] return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 130, in _multicall
[ 67s] teardown[0].send(outcome)
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/helpconfig.py", line 104, in pytest_cmdline_parse
[ 67s] config: Config = outcome.get_result()
[ 67s] ^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/pluggy/_result.py", line 114, in get_result
[ 67s] raise exc.with_traceback(exc.__traceback__)
[ 67s] File "/usr/lib/python3.11/site-packages/pluggy/_callers.py", line 77, in _multicall
[ 67s] res = hook_impl.function(*args)
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1075, in pytest_cmdline_parse
[ 67s] self.parse(args)
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1425, in parse
[ 67s] self._preparse(args, addopts=addopts)
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1308, in _preparse
[ 67s] self.known_args_namespace = self._parser.parse_known_args(
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/argparsing.py", line 157, in parse_known_args
[ 67s] return self.parse_known_and_unknown_args(args, namespace=namespace)[0]
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/argparsing.py", line 171, in parse_known_and_unknown_args
[ 67s] optparser = self._getparser()
[ 67s] ^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib/python3.11/site-packages/_pytest/config/argparsing.py", line 130, in _getparser
[ 67s] arggroup.add_argument(*n, **a)
[ 67s] File "/usr/lib64/python3.11/argparse.py", line 1468, in add_argument
[ 67s] return self._add_action(action)
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib64/python3.11/argparse.py", line 1670, in _add_action
[ 67s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 67s] File "/usr/lib64/python3.11/argparse.py", line 1482, in _add_action
[ 67s] self._check_conflict(action)
[ 67s] File "/usr/lib64/python3.11/argparse.py", line 1619, in _check_conflict
[ 67s] conflict_handler(action, confl_optionals)
[ 67s] File "/usr/lib64/python3.11/argparse.py", line 1628, in _handle_conflict_error
[ 67s] raise ArgumentError(action, message % conflict_string)
[ 67s] argparse.ArgumentError: argument --connection: conflicting option string: --connection
[ 67s] error: Bad exit status from /var/tmp/rpm-tmp.8wIIuo (%check)
[ 67s]
[ 67s] RPM build errors:
[ 67s] Bad exit status from /var/tmp/rpm-tmp.8wIIuo (%check)
[ 67s]
[ 67s] laptop failed "build molecule-plugins.spec" at Mon Nov 13 07:24:08 UTC 2023.
[ 67s]
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified; begin by reproducing the openSUSE/OBS check with pytest 7.4.3 and the listed dependencies, using the shown --collect-only command. Trace which installed plugins register the duplicate --connection option, and consider the issue done when test collection completes without that conflict in the packaging environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100