Autogeneration of API sample docs fails

Bug #1817915 reported by Surya Seetharaman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Surya Seetharaman

Bug Description

Running "tox -e api-samples" to generate api sample docs fails after this change: https://review.openstack.org/#/c/634600/ because its missing the corresponding doc/api_samples files for nova/tests/functional/api_sample_tests/api_samples/os-evacuate/v2.68/server-evacuate-req.json.tpl and nova/tests/functional/api_sample_tests/api_samples/os-evacuate/v2.68/server-evacuate-find-host-req.json.tpl.

The error message is as follows:

nova.tests.functional.api_sample_tests.test_evacuate.EvacuateJsonTestV268.test_server_evacuate_find_host(v2_68)
---------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/opt/stack/nova/.tox/api-samples/lib/python3.5/site-packages/mock/mock.py", line 1305, in patched'
    b' return func(*args, **keywargs)'
    b' File "/opt/stack/nova/nova/tests/functional/api_sample_tests/test_evacuate.py", line 128, in test_server_evacuate_find_host'
    b' server_resp=None, expected_resp_code=200)'
    b' File "/opt/stack/nova/nova/tests/functional/api_sample_tests/test_evacuate.py", line 58, in _test_evacuate'
    b' server_req, req_subs)'
    b' File "/opt/stack/nova/nova/tests/functional/api_samples_test_base.py", line 525, in _do_post'
    b' self._write_sample(name, body)'
    b' File "/opt/stack/nova/nova/tests/functional/api_samples_test_base.py", line 140, in _write_sample'
    b" name, self.microversion), 'w') as outf:"
    b"FileNotFoundError: [Errno 2] No such file or directory: '/opt/stack/nova/doc/api_samples/os-evacuate/v2.68/server-evacuate-find-host-req.json'"
    b''

nova.tests.functional.api_sample_tests.test_evacuate.EvacuateJsonTestV268.test_server_evacuate(v2_68)
-----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/opt/stack/nova/.tox/api-samples/lib/python3.5/site-packages/mock/mock.py", line 1305, in patched'
    b' return func(*args, **keywargs)'
    b' File "/opt/stack/nova/nova/tests/functional/api_sample_tests/test_evacuate.py", line 202, in test_server_evacuate'
    b' server_resp=None, expected_resp_code=200)'
    b' File "/opt/stack/nova/nova/tests/functional/api_sample_tests/test_evacuate.py", line 58, in _test_evacuate'
    b' server_req, req_subs)'
    b' File "/opt/stack/nova/nova/tests/functional/api_samples_test_base.py", line 525, in _do_post'
    b' self._write_sample(name, body)'
    b' File "/opt/stack/nova/nova/tests/functional/api_samples_test_base.py", line 140, in _write_sample'
    b" name, self.microversion), 'w') as outf:"
    b"FileNotFoundError: [Errno 2] No such file or directory: '/opt/stack/nova/doc/api_samples/os-evacuate/v2.68/server-evacuate-req.json'"
    b''

What is strange is that this was not detected as failing in the CIs which means there is no gate job running tox -e api-samples for API changes which should also be added I guess.

Tags: api doc
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/639707

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

Reviewed: https://review.openstack.org/639707
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ba48942c55d0e0a523d7b726a494275176233f4a
Submitter: Zuul
Branch: master

commit ba48942c55d0e0a523d7b726a494275176233f4a
Author: Surya Seetharaman <email address hidden>
Date: Wed Feb 27 16:25:16 2019 +0100

    Fix the api sample docs for microversion 2.68

    This patch adds the following files:

    1) doc/api_samples/os-evacuate/v2.68/server-evacuate-find-host-req.json
    2) doc/api_samples/os-evacuate/v2.68/server-evacuate-req.json

    which were missing in https://review.openstack.org/#/c/634600/
    so that the "tox -e api_samples" can run without errors.

    Change-Id: I248b7e172698a9bee155e72215c231da9033540a
    Closes-bug: #1817915

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

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.