Skip to content

Pin all known dependency versions in tox.ini

Mateusz Żebrak requested to merge mzebrak/ci-fail-fix into develop

pytest and pytest-xdist packages were missing specified versions in the tox.ini file. The latest update of one of these packages caused CI failures during testing phase. It looks like pytest or pytest-xdist has some internal problems, so I decided to stick with the latest known working version of all packages and pin them in the tox.ini file.

Example of a failing job: https://gitlab.syncad.com/hive/hivemind/-/jobs/400726

Error message:

..................................INTERNALERROR> def worker_internal_error(self, node, formatted_error):
INTERNALERROR>         """
INTERNALERROR>         pytest_internalerror() was called on the worker.
INTERNALERROR>     
INTERNALERROR>         pytest_internalerror() arguments are an excinfo and an excrepr, which can't
INTERNALERROR>         be serialized, so we go with a poor man's solution of raising an exception
INTERNALERROR>         here ourselves using the formatted message.
INTERNALERROR>         """
INTERNALERROR>         self._active_nodes.remove(node)
INTERNALERROR>         try:
INTERNALERROR> >           assert False, formatted_error
INTERNALERROR> E           AssertionError: Traceback (most recent call last):
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR> E                 session.exitstatus = doit(config, session) or 0
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR> E                 config.hook.pytest_runtestloop(session=session)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> E                 return outcome.get_result()
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/xdist/remote.py", line 112, in pytest_runtestloop
INTERNALERROR> E                 self.run_one_test(torun)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/xdist/remote.py", line 131, in run_one_test
INTERNALERROR> E                 self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> E                 return outcome.get_result()
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/runner.py", line 112, in pytest_runtest_protocol
INTERNALERROR> E                 runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/runner.py", line 131, in runtestprotocol
INTERNALERROR> E                 reports.append(call_and_report(item, "call", log))
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/runner.py", line 222, in call_and_report
INTERNALERROR> E                 report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR> E                 gen.send(outcome)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/skipping.py", line 265, in pytest_runtest_makereport
INTERNALERROR> E                 rep = outcome.get_result()
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/runner.py", line 366, in pytest_runtest_makereport
INTERNALERROR> E                 return TestReport.from_item_and_call(item, call)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/reports.py", line 349, in from_item_and_call
INTERNALERROR> E                 longrepr = item.repr_failure(excinfo)
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/tavern/_core/pytest/item.py", line 242, in repr_failure
INTERNALERROR> E                 attach_text(str(error), name="error_output")
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/tavern/_core/pytest/error.py", line 219, in __str__
INTERNALERROR> E                 return self.longreprtext
INTERNALERROR> E               File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/tavern/_core/pytest/error.py", line 212, in longreprtext
INTERNALERROR> E                 tw = py.io.TerminalWriter(stringio=True)  # pylint: disable=no-member
INTERNALERROR> E             AttributeError: module 'py' has no attribute 'io'
INTERNALERROR> E           assert False
INTERNALERROR> 
INTERNALERROR> ../../../../.tox/tavern/lib/python3.8/site-packages/xdist/dsession.py:190: AssertionError
.INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/xdist/dsession.py", line 115, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/xdist/dsession.py", line 138, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/builds/hive/hivemind/.tox/tavern/lib/python3.8/site-packages/xdist/dsession.py", line 177, in worker_workerfinished
INTERNALERROR>     assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('bridge_api_negative/get_relationship_between_accounts/invalid_observer.tavern.yaml::Hivemind', <WorkerController gw10>)
INTERNALERROR> assert not 'bridge_api_negative/get_relationship_between_accounts/invalid_observer.tavern.yaml::Hivemind'

Merge request reports

Loading