Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: Disallow pytest 5.4.0, which is crashing. #16752

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

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 12, 2020

PR Summary

All CIs (except docs) are failing with an internal pytest error. The exact error is inconsistent, but sometimes it is:

============================= test session starts ==============================
platform linux -- Python 3.8.0, pytest-5.4.0, py-1.8.0, pluggy-0.13.0
rootdir: /home/travis/build/matplotlib/matplotlib, inifile: pytest.ini, testpaths: lib
plugins: cov-2.8.1, timeout-1.3.4, forked-1.1.3, rerunfailures-8.0, xdist-1.31.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
gw0 I / gw1 I
gw0 [1135] / gw1 [1135]
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/_pytest/main.py", line 191, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/xdist/dsession.py", line 177, in worker_workerfinished
INTERNALERROR>     assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('lib/matplotlib/tests/test_afm.py::test_parse_header', <WorkerController gw1>)
INTERNALERROR> assert not 'lib/matplotlib/tests/test_afm.py::test_parse_header'

but the exact test case on which it fails changes. Sometimes it is:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/_pytest/main.py", line 191, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/dsession.py", line 241, in worker_collectionfinish
INTERNALERROR>     self.sched.schedule()
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/scheduler/load.py", line 249, in schedule
INTERNALERROR>     self._send_tests(next(nodes), 1)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/scheduler/load.py", line 261, in _send_tests
INTERNALERROR>     node.send_runtest_some(tests_per_node)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/workermanage.py", line 281, in send_runtest_some
INTERNALERROR>     self.sendcommand("runtests", indices=indices)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/xdist/workermanage.py", line 297, in sendcommand
INTERNALERROR>     self.channel.send((name, kwargs))
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/execnet/gateway_base.py", line 728, in send
INTERNALERROR>     raise IOError("cannot send to {!r}".format(self))
INTERNALERROR> OSError: cannot send to <Channel id=1 closed>

@QuLogic QuLogic added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: testing labels Mar 12, 2020
@QuLogic QuLogic added this to the v3.2.1 milestone Mar 12, 2020
@jklymak
Copy link
Member

jklymak commented Mar 12, 2020

Feel free to self merge if it passes CI ;-)

@tacaswell
Copy link
Member

Do we report this against pytest or pytest-xdist?

I dug into how xdist works awhile ago (when we were having ordering issues due to dict randomization) and it was cool but a bit scary....

@QuLogic
Copy link
Member Author

QuLogic commented Mar 12, 2020

AppVeyor's the only one that ran anything with 5.4.0, but it seems like something changed with our hacked on parameters:

______________ ERROR collecting lib/matplotlib/tests/test_agg.py ______________
In function "test_agg_filter":
Parameter "extension" should be declared explicitly via indirect or in function itself

I'll have to investigate pytest changelog to see if this is some expected upstream thing.

@QuLogic
Copy link
Member Author

QuLogic commented Mar 12, 2020

On macOS, Python 3.8, Azure:

E           RuntimeError: In set_text: Could not load glyph (error code 0x55)

for 10 tests. I guess it's something flaky as every other test seems to be passing, but I've not seen this one before.

@QuLogic
Copy link
Member Author

QuLogic commented Mar 12, 2020

Well, everything else passed, so I'm going to merge and investigate the other changes later.

@QuLogic QuLogic merged commit a104914 into matplotlib:master Mar 12, 2020
@QuLogic QuLogic deleted the no-pytest540 branch March 12, 2020 22:51
@lumberbot-app
Copy link

lumberbot-app bot commented Mar 12, 2020

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 a104914b3a14c1d623b56b4e737aa7b62abac310
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #16752: ci: Disallow pytest 5.4.0, which is crashing.'
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-16752-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR #16752 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants