tox -e docs fails trying to import nova.pci.device

Bug #1488637 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Matt Riedemann

Bug Description

The nova.pci.device module was removed in:

https://github.com/openstack/nova/commit/ee2ecfc68aaf52223d6491dd7a366682d06c03c6

Now tox -e docs fails:

2015-08-25 12:14:13.393 7869 CRITICAL nova [-] SphinxWarning: /home/mriedem/git/nova/doc/source/api/nova.pci.device.rst:4: WARNING: autodoc: failed to import module u'nova.pci.device'; the following exception was raised:
Traceback (most recent call last):
  File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
    __import__(self.modname)
ImportError: No module named device

2015-08-25 12:14:13.393 7869 ERROR nova Traceback (most recent call last):
2015-08-25 12:14:13.393 7869 ERROR nova File "setup.py", line 29, in <module>
2015-08-25 12:14:13.393 7869 ERROR nova pbr=True)
2015-08-25 12:14:13.393 7869 ERROR nova File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
2015-08-25 12:14:13.393 7869 ERROR nova dist.run_commands()
2015-08-25 12:14:13.393 7869 ERROR nova File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
2015-08-25 12:14:13.393 7869 ERROR nova self.run_command(cmd)
2015-08-25 12:14:13.393 7869 ERROR nova File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
2015-08-25 12:14:13.393 7869 ERROR nova cmd_obj.run()
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 189, in run
2015-08-25 12:14:13.393 7869 ERROR nova self._sphinx_run()
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/pbr/builddoc.py", line 143, in _sphinx_run
2015-08-25 12:14:13.393 7869 ERROR nova app.build(force_all=self.all_files)
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 216, in build
2015-08-25 12:14:13.393 7869 ERROR nova self.builder.build_all()
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 177, in build_all
2015-08-25 12:14:13.393 7869 ERROR nova self.build(None, summary='all source files', method='all')
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 239, in build
2015-08-25 12:14:13.393 7869 ERROR nova self.warn(*warning)
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 268, in warn
2015-08-25 12:14:13.393 7869 ERROR nova raise SphinxWarning(warntext)
2015-08-25 12:14:13.393 7869 ERROR nova SphinxWarning: /home/mriedem/git/nova/doc/source/api/nova.pci.device.rst:4: WARNING: autodoc: failed to import module u'nova.pci.device'; the following exception was raised:
2015-08-25 12:14:13.393 7869 ERROR nova Traceback (most recent call last):
2015-08-25 12:14:13.393 7869 ERROR nova File "/home/mriedem/git/nova/.tox/docs/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 335, in import_object
2015-08-25 12:14:13.393 7869 ERROR nova __import__(self.modname)
2015-08-25 12:14:13.393 7869 ERROR nova ImportError: No module named device
2015-08-25 12:14:13.393 7869 ERROR nova
2015-08-25 12:14:13.393 7869 ERROR nova

Revision history for this message
Matt Riedemann (mriedem) wrote :

I must have had some stale files under nova/doc/source/api, after deleting that and rebuilding it was fine.

Changed in nova:
status: New → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :

We can still make the tox -e docs target better by automatically removing doc/source/api and doc/build in tox.ini so I'll make that change.

Changed in nova:
status: Invalid → Confirmed
tags: added: low-hanging-fruit
Changed in nova:
importance: Undecided → Low
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/216857

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/216857
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=426a5ffa8ee6d4141d1b14342d287589389f062a
Submitter: Jenkins
Branch: master

commit 426a5ffa8ee6d4141d1b14342d287589389f062a
Author: Matt Riedemann <email address hidden>
Date: Tue Aug 25 13:08:31 2015 -0700

    Remove doc/source/api and doc/build before building docs

    doc/source/api and doc/build are build artifacts from building the docs
    using the tox -e docs target. These are ignored in .gitignore since we
    don't care about them from build to build - but leaving them around can
    actually make the docs build fail if modules no longer exist but are
    still sitting in these directories.

    So this change just cleans those up each time you run tox -e docs.

    Closes-Bug: #1488637

    Change-Id: I646ae0b77a472c425d23815316e804b09bbe867d

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
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.