Hi,
On patchset https://review.openstack.org/#/c/153417/1, pep8 is throwing a traceback:
vagrant@vagrant-ubuntu-trusty-64:/data/Volumes/Development/dev/ironic-python-agent$ tox -r -epep8
pep8 recreate: /data/Volumes/Development/dev/ironic-python-agent/.tox/pep8
pep8 installdeps: -r/data/Volumes/Development/dev/ironic-python-agent/requirements.txt, -r/data/Volumes/Development/dev/ironic-python-agent/test-requirements.txt
pep8 develop-inst: /data/Volumes/Development/dev/ironic-python-agent
pep8 runtests: PYTHONHASHSEED='2035998905'
pep8 runtests: commands[0] | flake8 ironic_python_agent imagebuild
Traceback (most recent call last):
File ".tox/pep8/bin/flake8", line 9, in <module>
load_entry_point('flake8==2.0', 'console_scripts', 'flake8')()
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/flake8/main.py", line 29, in main
report = flake8_style.check_files()
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/pep8.py", line 1604, in check_files
self.input_dir(path)
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/pep8.py", line 1640, in input_dir
runner(os.path.join(root, filename))
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/flake8/engine.py", line 69, in input_file
return fchecker.check_all(expected=expected, line_offset=line_offset)
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/pep8.py", line 1348, in check_all
self.check_ast()
File "/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/local/lib/python2.7/site-packages/pep8.py", line 1329, in check_ast
if not noqa(self.lines[lineno - 1]):
IndexError: list index out of range
ERROR: InvocationError: '/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/bin/flake8 ironic_python_agent imagebuild'
__________________________________________________________________________ summary ___________________________________________________________________________
ERROR: pep8: commands failed
On further investigation, it appears if you go into the virtualenv and uninstall hacking; flake8 passes perfectly:
(pep8)vagrant@vagrant-ubuntu-trusty-64:/data/Volumes/Development/dev/ironic-python-agent$ pip uninstall hacking
Uninstalling hacking:
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking-0.8.1-py2.7.egg-info
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/__init__.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/__init__.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/config.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/config.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/core.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/core.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/__init__.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/__init__.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_config.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_config.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_doctest.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_doctest.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_gittest.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_gittest.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_import_exceptions.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_import_exceptions.pyc
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_local.py
/data/Volumes/Development/dev/ironic-python-agent/.tox/pep8/lib/python2.7/site-packages/hacking/tests/test_local.pyc
Proceed (y/n)? y
Successfully uninstalled hacking
(pep8)vagrant@vagrant-ubuntu-trusty-64:/data/Volumes/Development/dev/ironic-python-agent$ flake8 ironic_python_agent imagebuild
Additionally, if I replace the commit message with something short and simple, pep8 passes properly.
It's my expectation that even if a commit message is somehow malformed (I'm not convinced it is for this patch), that pep8/hacking present an error that leads them to the cause of the failure and why it failed.
Thanks!
we have removed all git based hacking checks