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

5.3.4 causing internal errors, as well #6596

Closed
oseiberts11 opened this issue Jan 28, 2020 · 5 comments
Closed

5.3.4 causing internal errors, as well #6596

oseiberts11 opened this issue Jan 28, 2020 · 5 comments
Labels
type: bug problem that needs to be addressed type: regression indicates a problem that was introduced in a release which was working previously

Comments

@oseiberts11
Copy link

oseiberts11 commented Jan 28, 2020

#6517 is closed already, but I want to add some information. There is some finger-pointing to something called "nose", but I see the same problem and I don't use "nose", whatever it is. So a proper fix in the future which only takes "nose" into account may not be perfect.

Fortunately the same workaround (pinning pytest to 5.3.3) works for me.

You can see my test code for instance at syseleven/rebootmgr@cf0ec0b in branch https://github.com/syseleven/rebootmgr/commits/oseibert-os-5267-use-enabled-instead-of-disabled . The next commit adds the workaround.

The weird thing is that all tests succeed, except those in the file tests/test_lock.py. As soon as the testing gets there, it fails. This is the case if you run the file on its own, or when you just run all tests (and then this file gets run as second file).

You can run the tests in their proper environment with the command docker-compose run --rm integration_tests_py35 (or 36 or 37).

@blueyed
Copy link
Contributor

blueyed commented Jan 28, 2020

@oseiberts11
Thanks for a way to reproduce it (have not tried it though).
Please post a traceback yourself.

@blueyed blueyed added type: bug problem that needs to be addressed type: regression indicates a problem that was introduced in a release which was working previously labels Jan 28, 2020
@blueyed
Copy link
Contributor

blueyed commented Jan 28, 2020

@oseiberts11 docker-compose run --rm integration_tests_py35 works for me on syseleven/rebootmgr@cf0ec0b?
So to get more insight a traceback would really be useful.

Keep in mind though that the issue with #6517 is known, and might e.g. get triggered when paths/nodeids are rewritten (which might happen especially with Docker, but would require -v (verbose mode)).

@oseiberts11
Copy link
Author

oseiberts11 commented Jan 29, 2020

The output is short enough that I can paste all of it. I forced the pytest-5.3.4 version here.

I experimented a bit with pytest --pdb, and the offending variable is of type string at that point.

$ docker-compose run --rm integration_tests_py35
Starting rebootmgr_consul3_1 ... done
Starting rebootmgr_consul3_1 ...
Starting rebootmgr_consul1_1 ... done
Starting rebootmgr_consul4_1 ... done
Starting rebootmgr_consul2_1 ... done
GLOB sdist-make: /src/setup.py
py35 recreate: /src/.tox/py35
py35 installdeps: coverage, pytest==5.3.4, pytest-mock, -rrequirements.txt
py35 inst: /src/.tox/.tmp/package/1/rebootmgr-0.0.22.zip
py35 installed: attrs==19.3.0,certifi==2019.11.28,chardet==3.0.4,Click==7.0,colorlog==3.1.4,consul-lib==0.1.0.dev0,coverage==5.0.3,holidays==0.9.8,idna==2.7,importlib-metadata==1.5.0,more-itertools==8.1.0,packaging==20.1,pathlib2==2.3.5,pluggy==0.13.1,py==1.8.1,pyparsing==2.4.6,pytest==5.3.4,pytest-mock==2.0.0,python-consul==1.1.0,python-dateutil==2.8.1,rebootmgr==0.0.22,requests==2.20.1,retrying==1.3.3,six==1.14.0,urllib3==1.24.3,wcwidth==0.1.8,zipp==1.1.0
py35 run-test-pre: PYTHONHASHSEED='236841105'
py35 run-test: commands[0] | coverage run -m pytest -v --color=yes --maxfail 1 tests/
====================================================================================================================== test session starts =======================================================================================================================
platform linux -- Python 3.5.9, pytest-5.3.4, py-1.8.1, pluggy-0.13.1 -- /src/.tox/py35/bin/python
cachedir: .tox/py35/.pytest_cache
rootdir: /src
plugins: mock-2.0.0
collected 46 items

tests/test_config.py::test_ensure_config_when_already_valid PASSED                                                                                                                                                                                         [  2%]
tests/test_config.py::test_ensure_config_when_old_style_config_present PASSED                                                                                                                                                                              [  4%]
tests/test_config.py::test_ensure_config_when_invalid[None] PASSED                                                                                                                                                                                         [  6%]
tests/test_config.py::test_ensure_config_when_invalid[] PASSED                                                                                                                                                                                             [  8%]
tests/test_config.py::test_ensure_config_when_invalid[{}] PASSED                                                                                                                                                                                           [ 10%]
tests/test_config.py::test_ensure_config_when_invalid[disabled] PASSED                                                                                                                                                                                     [ 13%]
tests/test_config.py::test_ensure_config_when_invalid[{"somekey": false}] PASSED                                                                                                                                                                           [ 15%]
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/main.py", line 197, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/main.py", line 271, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/runner.py", line 83, in pytest_runtest_protocol
INTERNALERROR>     item.ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/compat.py", line 420, in __get__
INTERNALERROR>     value = instance.__dict__[self.func.__name__] = self.func(instance)
INTERNALERROR>   File "/src/.tox/py35/lib/python3.5/site-packages/_pytest/nodes.py", line 465, in location
INTERNALERROR>     assert isinstance(location[0], py.path.local), location[0]
INTERNALERROR> AssertionError: /Users/oseibert/git/rebootmgr/tests/test_lock.py

======================================================================================================================= 7 passed in 4.72s ========================================================================================================================
ERROR: InvocationError for command /src/.tox/py35/bin/coverage run -m pytest -v --color=yes --maxfail 1 tests/ (exited with code 3)
____________________________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________________________
ERROR:   py35: commands failed

@bluetech
Copy link
Member

This is fixed in version 5.3.5.

Should have been closed by merge of #6614, not sure why it didn't.

@blueyed
Copy link
Contributor

blueyed commented Jan 29, 2020

@bluetech

Should have been closed by merge of #6614, not sure why it didn't.

Only merged to the default branch (master) close issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

No branches or pull requests

3 participants