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

[BUG] pytest_runtest_makereport "did not yield" #2460

Closed
aaronatclockwork opened this issue Mar 16, 2023 · 5 comments · Fixed by #2461
Closed

[BUG] pytest_runtest_makereport "did not yield" #2460

aaronatclockwork opened this issue Mar 16, 2023 · 5 comments · Fixed by #2461

Comments

@aaronatclockwork
Copy link

Describe your context
Dash is a transitive dependency and v2.9.0 is being pulled in and failing our GitHub CI.

Describe the bug

Our GitHub CI tests are failing with the below stacktrace. The issue started this morning with the release of dash v2.9.0. I believe I've tracked it to this line: https://github.com/plotly/dash/blame/v2.9.0/dash/testing/plugin.py#L108 which prevents pytest_runtest_makereport from yielding as normal under certain circumstances.

For now, we can pin the version of dash to v2.8.1 which has been working fine for us, but when our dependencies update their requirements, this will become blocking.

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 34, in _multicall
INTERNALERROR>     next(gen)  # first yield
INTERNALERROR> StopIteration
INTERNALERROR> 
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/main.py", line 349, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/runner.py", line 112, in pytest_runtest_protocol
INTERNALERROR>     runtestprotocol(item, nextitem=nextitem)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/runner.py", line 125, in runtestprotocol
INTERNALERROR>     rep = call_and_report(item, "setup", log)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/_pytest/runner.py", line [22](https://github.com/elementreeinc/clockwork/actions/runs/4437079547/jobs/7792251243#step:6:23)2, in call_and_report
INTERNALERROR>     report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line [26](https://github.com/elementreeinc/clockwork/actions/runs/4437079547/jobs/7792251243#step:6:27)5, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pluggy/_callers.py", line [37](https://github.com/elementreeinc/clockwork/actions/runs/4437079547/jobs/7792251243#step:6:38), in _multicall
INTERNALERROR>     _raise_wrapfail(gen, "did not yield")
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.7.16/x[64](https://github.com/elementreeinc/clockwork/actions/runs/4437079547/jobs/7792251243#step:6:65)/lib/python3.7/site-packages/pluggy/_result.py", line 11, in _raise_wrapfail
INTERNALERROR>     % (co.co_name, co.co_filename, co.co_firstlineno, msg)
INTERNALERROR> RuntimeError: wrap_controller at 'pytest_runtest_makereport' /opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dash/testing/plugin.py:106 did not yield
@fkiraly
Copy link

fkiraly commented Mar 16, 2023

The same issue is blowing up our CI at sktime:
sktime/sktime#4349

Downgrading dash to 2.8.1 seems to fix it.

This is only in the optional (soft) dependency set, but it's still unpleasant.

See the issue for some tracebacks and CI runs, if it helps.

@thchang
Copy link

thchang commented Mar 16, 2023

Having the same issue on my project:
parmoo/parmoo

Odd because I am not using dash's pytest for anything, we just have dash as a dependency.

But now that pytest has been included in dash, it seems GitHub Actions favors the dash version of pytest. Not sure if there is an easy fix for this, but it's causing our CI to fail with the same error as shown here. Should be able to do something with my path to just use regular pytest, no?

Removing the dash dependency actually causes all of our tests to pass except those that import dash:
https://github.com/parmoo/parmoo/actions/runs/4442552625

@robin-maillot
Copy link

Having the same problem with my projects, downgrading works as a temp fix

@kasperjanehag
Copy link

Same problem here! Will downgrade to 2.8.1

@ydshieh
Copy link

ydshieh commented Mar 17, 2023

Having the same problem for transformers CI, see this job run page.

Changing back to dash==2.8.1 works fine

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

Successfully merging a pull request may close this issue.

6 participants