tox -e docs fails

Bug #1521965 reported by Daniele Pizzolli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

It works in master, but fails in stable/kilo.

git checkout stable/kilo
git log --oneline -n1
3182bf7 Merge "Remove hardcoded LDAP group schema from emulated enabled mix-in" into stable/kilo

tox -e docs
[...]
11:02:37 O: updating environment: [extensions changed] 130 added, 0 changed, 11 removed
11:03:14 O: reading sources... [ 0%] apache-httpd
reading sources... [100%] setup
11:03:14 E: Traceback (most recent call last):
11:03:14 E: File "setup.py", line 29, in <module>
11:03:14 E: pbr=True)
11:03:14 E: File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
11:03:14 E: dist.run_commands()
11:03:14 E: File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
11:03:14 E: self.run_command(cmd)
11:03:14 E: File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
11:03:14 E: cmd_obj.run()
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 186, in run
11:03:14 E: self._sphinx_run()
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 140, in _sphinx_run
11:03:14 E: app.build(force_all=self.all_files)
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 216, in build
11:03:14 E: self.builder.build_all()
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 177, in build_all
11:03:14 E: self.build(None, summary='all source files', method='all')
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 239, in build
11:03:14 E: self.warn(*warning)
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 268, in warn
11:03:14 E: raise SphinxWarning(warntext)
11:03:14 E: sphinx.errors.SphinxWarning: /vagrant/keystone/doc/source/api/keystone.cmd.rst:18: WARNING: autodoc: failed to import module u'keystone.cmd.cli'; the following exception was raised:
11:03:14 E: Traceback (most recent call last):
11:03:14 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
11:03:14 E: __import__(self.modname)
11:03:14 E: File "/vagrant/keystone/keystone/cmd/cli.py", line 32, in <module>
11:03:14 E: File "/vagrant/keystone/keystone/federation/__init__.py", line 15, in <module>
11:03:14 E: File "/vagrant/keystone/keystone/federation/core.py", line 373, in <module>
11:03:14 E: AttributeError: 'module' object has no attribute 'create_legacy_driver'
11:03:14 E:
11:03:14 O: ERROR: InvocationError: '/vagrant/keystone/.tox/docs/bin/python setup.py build_sphinx'
11:03:14 O: ___________________________________ summary ____________________________________
11:03:14 O: ERROR: docs: commands failed
11:03:14 I: Finished with exitcode 1

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

this file keystone/federation/core.py is only available from master (M), you must have some .pyc from master before switching to stable/kilo.

I was able to reproduce the issue reported, and after doing a clean of all .pyc before running "tox -e docs" fixed the issue.

Changed in keystone:
status: New → Invalid
Revision history for this message
Daniele Pizzolli (daniele-pizzolli) wrote :

Thanks for the response.

Could the test toolchain be fixed to take care of stale .pyc files?
Should I open a different bug?

Anyway it still fails in my environment with:

[...]
16:33:57 O: building [html]: all source files
16:33:57 O: updating environment: 158 added, 0 changed, 0 removed
16:34:29 O: reading sources... [ 0%] apache-httpd
reading sources... [100%] setup
16:34:29 E: Traceback (most recent call last):
16:34:29 E: File "setup.py", line 29, in <module>
16:34:29 E: pbr=True)
16:34:29 E: File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
16:34:29 E: dist.run_commands()
16:34:29 E: File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
16:34:29 E: self.run_command(cmd)
16:34:30 E: File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
16:34:30 E: cmd_obj.run()
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 186, in run
16:34:30 E: self._sphinx_run()
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 140, in _sphinx_run
16:34:30 E: app.build(force_all=self.all_files)
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 216, in build
16:34:30 E: self.builder.build_all()
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 177, in build_all
16:34:30 E: self.build(None, summary='all source files', method='all')
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 239, in build
16:34:30 E: self.warn(*warning)
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 268, in warn
16:34:30 E: raise SphinxWarning(warntext)
16:34:30 E: sphinx.errors.SphinxWarning: /vagrant/keystone/doc/source/api/keystone.cmd.rst:10: WARNING: autodoc: failed to import module u'keystone.cmd.all'; the following exception was raised:
16:34:30 E: Traceback (most recent call last):
16:34:30 E: File "/vagrant/keystone/.tox/docs/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
16:34:30 E: __import__(self.modname)
16:34:30 E: ImportError: No module named cmd.all
16:34:30 E:
16:34:30 O: ERROR: InvocationError: '/vagrant/keystone/.tox/docs/bin/python setup.py build_sphinx'
16:34:30 O: ___________________________________ summary ____________________________________
16:34:30 O: ERROR: docs: commands failed
16:34:30 I: Finished with exitcode 1

Revision history for this message
Daniele Pizzolli (daniele-pizzolli) wrote :

Oh, what a fragile tool-chain. Maybe I will look for appropriate
place to document the issue.

To build the doc for stable/kilo I cleaned up the environment:

git clean -d -x -f

before

tox -e docs

I am still searching for the less invasive way to do it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.