Skip to content
New issue

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

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

Already on GitHub? # to your account

Scheduled CI failing #1997

Closed
mattwthompson opened this issue Jan 16, 2025 · 3 comments · Fixed by #2017
Closed

Scheduled CI failing #1997

mattwthompson opened this issue Jan 16, 2025 · 3 comments · Fixed by #2017
Assignees

Comments

@mattwthompson
Copy link
Member

https://github.com/openforcefield/openff-toolkit/actions/runs/12799622748/job/35686014018

@mattwthompson
Copy link
Member Author

Note that I opened this before #1822 was merged; the linked log above points to a few issues that stand on their own if not magically fixed

There are some new failures after #1822 which are confusing on the surface; nothing obviously changed with the plugins we use but there is some cross-interaction complaining:

============================= test session starts ==============================
platform linux -- Python 3.10.16, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/openff-toolkit/openff-toolkit
configfile: pyproject.toml
plugins: anyio-4.8.0, rerunfailures-15.0, xdist-3.6.1, nbval-0.11.0, timeout-2.3.1, cov-6.0.0
created: 2/2 workers
2 workers [0 items]



------------------------------ coverage ------------------------------
---------------------- coverage: failed workers ----------------------
The following workers failed to return coverage data, ensure that pytest-cov is installed on these workers.
gw0
gw1
Coverage XML written to file coverage.xml

============================ no tests ran in 1.19s =============================

https://github.com/openforcefield/openff-toolkit/actions/runs/12940806133/job/36095749431

Nothing too suspicious in the recent changes of the plugins we use:

https://pytest-cov.readthedocs.io/en/latest/changelog.html#id1

https://pytest-xdist.readthedocs.io/en/latest/changelog.html#pytest-xdist-3-6-1-2024-04-28

https://github.com/pytest-dev/pytest-randomly/blob/main/CHANGELOG.rst

@j-wags
Copy link
Member

j-wags commented Feb 7, 2025

The main things I found in #2004 are:

  • I can't reproduce the failure locally, even though all my versions of python/pytest/etc seem to match up and I ran using the exact same keywords. When I run locally the tests do actually run.
  • Doing pytest ... -m "slow"(instead of -m "slow or not slow") leads to a new and possibly informative failure in CI:
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/_pytest/main.py", line 283, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/_pytest/main.py", line 337, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_callers.py", line 182, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_result.py", line 100, in get_result
INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     teardown.throw(outcome._exception)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/_pytest/logging.py", line 803, in pytest_runtestloop
INTERNALERROR>     return (yield)  # Run all the tests.
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     teardown.throw(outcome._exception)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/_pytest/terminal.py", line 673, in pytest_runtestloop
INTERNALERROR>     result = yield
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/dsession.py", line 138, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/dsession.py", line 163, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/dsession.py", line 306, in worker_collectionfinish
INTERNALERROR>     self.sched.schedule()
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/scheduler/load.py", line 295, in schedule
INTERNALERROR>     self._send_tests(node, node_chunksize)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/scheduler/load.py", line 307, in _send_tests
INTERNALERROR>     node.send_runtest_some(tests_per_node)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/workermanage.py", line 355, in send_runtest_some
INTERNALERROR>     self.sendcommand("runtests", indices=indices)
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/xdist/workermanage.py", line 374, in sendcommand
INTERNALERROR>     self.channel.send((name, kwargs))
INTERNALERROR>   File "/home/runner/micromamba/envs/openff-toolkit-test/lib/python3.10/site-packages/execnet/gateway_base.py", line 911, in send
INTERNALERROR>     raise OSError(f"cannot send to {self!r}")
INTERNALERROR> OSError: cannot send to <Channel id=3 closed>

@mattwthompson
Copy link
Member Author

pytest-xdist has a few famous limiations: https://pytest-xdist.readthedocs.io/en/stable/known-limitations.html

However, none of these seem obviously related to what we're trying to do, nor related to the Pytest 8 bump

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

Successfully merging a pull request may close this issue.

2 participants