Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failed when packaging for openSUSE: "argparse.ArgumentError: argument --connection: conflicting option string: --connection" #200

Open
johanneskastl opened this issue Nov 13, 2023 · 0 comments

Comments

@johanneskastl
Copy link

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 <module>
[   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] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant