summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAgeFilesLines
* Merge "[CI] Install dependencies for docs target" into stable/ussuriZuul2022-05-311-0/+1
|\
| * [CI] Install dependencies for docs targetElod Illes2022-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tox 'docs' target is called, first it installs the dependencies (listed in 'deps') in 'installdeps' phase, then it installs nova (with its requirements) in 'develop-inst' phase. In the latter case 'deps' is not used so that the constraints defined in 'deps' are not used. This could lead to failures on stable branches when new packages are released that break the build. To avoid this, the simplest solution is to pre-install requirements, i.e. add requirements.txt to 'docs' tox target. Conflicts: tox.ini NOTE(elod.illes): conflict is due to branch specific upper constraints file link. Change-Id: I4471d4488d336d5af0c23028724c4ce79d6a2031 (cherry picked from commit 494e8d7db6f8a3d1a952f657acab353787f57e04) (cherry picked from commit 1ac0d6984a43cddbb5a2f1a2f7bc115fd83517c9) (cherry picked from commit 64cc0848be9bf92d79e6fa7b424668d21321d593) (cherry picked from commit f66a570e946d980162a1313aa5a7e2ce5856a128) (cherry picked from commit bc92f05a6d6647e709a23a9d78b49f916874ef85)
* | Merge "Define new functional test tox env for placement gate to run" into ↵Zuul2022-05-251-0/+10
|\ \ | |/ |/| | | stable/ussuri
| * Define new functional test tox env for placement gate to runGhanshyam Mann2022-05-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have placement-nova-tox-functional-py38 job defined and run on placement gate[1] to run the nova functional test excluding api and notification _sample_tests, and db-related tests but that job skip those tests via tox_extra_args which is not right way to do as we currently facing error when tox_extra_args is included in tox siblings task - https://opendev.org/zuul/zuul-jobs/commit/c02c28a982da8d5a9e7b4ca38d30967f6cd1531d - https://zuul.openstack.org/build/a8c186b2c7124856ae32477f10e2b9a4 Let's define a new tox env which can exclude the required test in stestr command itself. Conflicts: tox.ini NOTE(melwitt): The conflict is because change I1d6a2986fcb0435cfabdd104d202b65329909d2b (Moving functional jobs to Victoria testing runtime) is not in Ussuri. The stestr option for the exclude regex also had to be changed because --exclude-regex is not in stestr 3.0.1, the version installed in Ussuri. [1] https://opendev.org/openstack/placement/src/commit/bd5b19c00e1ab293fc157f4699bc4f4719731c25/.zuul.yaml#L83 Change-Id: I20d6339a5203aed058f432f68e2ec1af57030401 (cherry picked from commit 7b063e4d0518af3e57872bc0288a94edcd33c19d) (cherry picked from commit 64f5c1cfb0e7223603c06e22a204716919d05294) (cherry picked from commit baf0d93e0fafcd992d37543aa9df3f6dc248a738) (cherry picked from commit d218250eb53791012f49825140e2592dab89e69c)
* | [stable-only] Drop lower-constraints jobElod Illes2022-04-221-7/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | During the PTG the TC discussed the topic and decided to drop the job completely. Since the latest job configuration broke all stable gate for nova (older than yoga) this is needed there to unblock our gates. For dropping the job on master let's wait to the resolution as the gate is not broken there, hence the patch is stable-only. Conflicts: .zuul.yaml lower-constraints.txt NOTE(elod.illes): conflict is due to branch specific settings (job was set to non-voting, lower constraints changes). Another change in .zuul.yaml is due to requirements-check job runs now against ubuntu-focal, that breaks tools/test_setup.sh script (fix exists in victoria: I97b0dcbb88c6ef7c22e3c55970211bed792bbd0d). This patch pins the job locally for ubuntu-bionic nodeset. Change-Id: I514f6b337ffefef90a0ce9ab0b4afd083caa277e (cherry picked from commit 15b72717f2f3bd79791b913f1b294a19ced47ca7) (cherry picked from commit ba3c5b81abce49fb86981bdcc0013068b54d4f61) (cherry picked from commit 327693af402e4dd0c03fe247c4cee7beaedd2852) (cherry picked from commit 8ff36f184dd7aedf9adfdbdf8845504557e2bef5)
* [stable-only] Pin virtualenv and setuptoolsBalazs Gibizer2021-10-011-1/+5
| | | | | | | | | | | | Setuptools 58.0 (bundled in virtualenv 20.8) breaks the installation of decorator 3.4.0. So this patch pins virtualenv to avoid the break. As the used 'require' feature was introduced in tox in version 3.2 [1], the required minversion has to be bumped, too. [1] https://tox.readthedocs.io/en/latest/config.html#conf-requires Change-Id: I26b2a14e0b91c0ab77299c3e4fbed5f7916fe8cf
* Move 'check-cherry-picks' test to gate, n-v checkStephen Finucane2021-06-181-3/+9
| | | | | | | | | | | | | | | | | | | | | | | This currently runs in the 'check' pipeline, as part of the pep8 job, which causes otherwise perfectly valid backports to report as failing CI. There's no reason a stable core shouldn't be encouraged to review these patches: we simply want to prevent them *merging* before their parent(s). Resolve this conflict by moving the check to separate voting job in the 'gate' pipeline as well as a non-voting job in the 'check' pipeline to catch more obvious issues. NOTE(lyarwood): Conflicts as I1d6a2986fcb0435cfabdd104d202b65329909d2b and If6758c83a6bd95aefb7703529cbccd14e3adfee2 are not present on stable/ussuri. Conflicts: .zuul.yaml Change-Id: Id3e4452883f6a3cf44ff58b39ded82e882e28c23 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> (cherry picked from commit 98b01c9a59df4912f5a162c2c52d1f00c84d24c2) (cherry picked from commit fef0305abefbf165fecb883f03bce97f525a790a) (cherry picked from commit b7677ae08ae151858ecb0e67039e54bb3df89700)
* tools: Allow check-cherry-picks.sh to be disabled by an env varLee Yarwood2021-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | The checks performed by this script aren't always useful to downstream consumers of the repo so allow them to disable the script without having to make changes to tox.ini. NOTE(lyarwood): This backport has Ie8a672fd21184c810bfe9c0e3a49582189bf2111 squashed into it to ensure the introduced env var is passed into the pep8 tox env. tox: Add passenv DISABLE_CHERRY_PICK_CHECK to pep8 I4f551dc4b57905cab8aa005c5680223ad1b57639 introduced the environment variable to disable the check-cherry-pick.sh script but forgot to allow it to be passed into the pep8 tox env. Change-Id: I4f551dc4b57905cab8aa005c5680223ad1b57639 (cherry picked from commit 610396f8ad5fe8c3abb7731fcd42c81e5246a938) (cherry picked from commit 3d86df068a7a78f8faa9ac6437ff4fc19f5cebcc)
* Check cherry-pick hashes in pep8 tox targetDan Smith2020-06-161-0/+1
| | | | | | | | | | | This adds a tools/ script that checks any cherry-picked hashes on the current commit (or a provided commit) to make sure that all the hashes exist on at least master or stable/.* branches. This should help avoid accidentally merging stable backports where one of the hashes along the line has changed due to conflicts. Change-Id: I4afaa0808b75cc31a8dd14663912c162281a1a42 (cherry picked from commit aebc829c4e0d39a160eaaa5ad949c1256c8179e6)
* Update TOX_CONSTRAINTS_FILE for stable/ussuriOpenStack Release Bot2020-04-231-2/+2
| | | | | | | | | | | | Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/ussuri branch, tests will continue to use the upper-constraints list on master. Change-Id: Ie55b9cde6e3fcca4a6708dddc495018f327aef00
* Use placement stable version for functional jobGhanshyam Mann2020-04-121-9/+14
| | | | | | | | | | | | | | | | | | | nova-tox-functional is py2 job and need placement as required project. and started failing for incompatible py version: ERROR: Package 'openstack-placement' requires a different Python: 2.7.17 not in '>=3.6' - https://zuul.opendev.org/t/openstack/build/b460a8c59ad64e57b871aa3c00638b01/log/job-output.txt#782 Placement master is now py3 only which mean master version will stop working on py2 env: - I6f458fb60b5a33b5aa2ce3ab292862ab98eb4670 Current tox env mention the placement master link as deps, where need to use the stable version for stable jobs. Making deps with version not the fresh git clone like how other test-requirements.txt deps work. Change-Id: I96bb9fcb55f2a4fc3aefa01db70b45740db166c8
* api: Add framework for extra spec validationStephen Finucane2020-04-081-1/+1
| | | | | | | | | | | | | | | | | Add the validation framework necessary to verify extra specs along with the definitions for every extra spec we currently recognize in-tree. None of this is currently used since we don't have the API microversions wired up, but that will come in a future patch. Note that we must add the H238 hacking check to the ignore list here, since this includes our first use of Python 3-type classes without the explicit 'object' subclass. This can be removed when that check is removed from hacking. Part of blueprint flavor-extra-spec-validators Change-Id: Ib64a1348cce1dca995746214616c4f33d9d664bd Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Switch to hacking 2.xStephen Finucane2020-01-171-2/+53
| | | | | | | | | This bumps the version of flake8 and pycodestyle to something much newer, which resolves a long-standing warning about nested sets and allows us to use new fangled features like f-strings if we so choose. Change-Id: I0bb9077f1cea2243b7945e87cfa140f9cf89d558 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Stop testing Python 2Stephen Finucane2019-11-181-18/+7
| | | | | | | | | | | | | | | | | | It's Ussuri. We can *finally* stop testing Python 2 [1]. Time to party. We don't attempt any cleanup but simply stop testing with Python 2, indicate that we only support Python 3 via 'setup.cfg' and remove any Python 2 only dependencies. Our 'tox.ini' is modified such that 'functional' now runs with 'python3', whatever that may point to, though the gate will only use a versioned variant (currently 'functional-py36'). This should free up a significant amount of resources from the gate and let us start using Python 3 idioms in our code. Win-win. [1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline Change-Id: Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Stop building docs with (test-)requirements.txtMatt Riedemann2019-10-251-1/+3
| | | | | | | | | | | | | Change Iba797243d2a137b551223165a1af1a8676bcea02 was a bit overzealous in using {[testenv]deps} and changed the docs tox target to also install requirements.txt and test-requirements.txt which means for docs builds we're installing things like psycopg2 which we shouldn't be doing if we don't have the correct native packages installed to build those types of dependencies. Change-Id: Ib718911596b93ec6ec7e899210300d2f0d9572ed Closes-Bug: #1849870
* Make sure tox install requirements.txt with upper-constraintsBalazs Gibizer2019-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | Ieb4ab13cf8ca5683fcd7b18ed669e8a26659bff1 removed the upper-constraints from the install_command which caused that only the test-requirements are installed with the upper-constraints enforced. This caused that when tox installed nova in the virtual env it installed the content of the requirement.txt without enforcing the upper-constraints. Today networkx 2.4 package has been released to pypi. The taskflow lib depends on networkx but does not pin the requirement but the openstack upper-constraints pins the networkx requirements properly. Nova depends on taskflow therefore when nova is installed by tox without the upper-constraints the new networkx 2.4 is installed. This broke the nova unit tests. This patch makes sure that all the requirements are installed with the upper-constraints enforced. Change-Id: Iba797243d2a137b551223165a1af1a8676bcea02 Closes-Bug: #1848499
* tox: Stop overriding the 'install_command'Stephen Finucane2019-09-271-13/+10
| | | | | | | | This is not encouraged by infra (particularly mordred and smcginnis) since it's less obvious and easy to miss. Change-Id: Ieb4ab13cf8ca5683fcd7b18ed669e8a26659bff1 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* tox: Use common 'command' definition for unit testsStephen Finucane2019-09-271-12/+3
| | | | | | | Less LoC. Winning. Change-Id: Icc1531d18ea1e0692c41320a98100bba92d7b48a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* PDF documentation buildAkihiro Motoki2019-09-041-1/+12
| | | | | | | | | | | | | | | | - Add a new pdf-docs environment to enable PDF build. - sphinxcontrib-svg2pdfconverter is used to handle SVG properly. - maxlistdepth=10 in latex_elements is needed to handle deeper levels of nesting. - Sample config/policy files are skipped in the PDF document as inline sample files cause LaTeX error [1] and direct links in PDF doc is discouraged. Note that sample-config and sample-policy need to be excluded to avoid the LaTeX error [1] and :orphan: is specified in those files. [1] https://github.com/sphinx-doc/sphinx/issues/3099 Change-Id: I3aaea1d15a357f550f529beaa84fb1a1a7748358
* Merge "tox: Keeping going with docs"Zuul2019-08-071-4/+4
|\
| * tox: Keeping going with docsStephen Finucane2019-07-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name suggests, keeps the build running when it encounters non-fatal errors. This is exceptionally useful in avoiding a continuous edit-build loop when undertaking large doc reworks where multiple errors may be introduced. [1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045 Change-Id: Idc38751e1629947f5842651d99b1528f74247b42 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Update api-ref locationAndreas Jaeger2019-07-221-2/+2
|/ | | | | | | | | | | | | | | | The api documentation is now published on docs.openstack.org instead of developer.openstack.org. Update all links that are changed to the new location. Note that Neutron publishes to api-ref/network, not networking anymore. Note that redirects will be set up as well but let's point now to the new location. For details, see: http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html Change-Id: Id2cf3aa252df6db46575b5988e4937ecfc6792bb
* Add Python 3 Train unit testsCorey Bryant2019-07-051-1/+1
| | | | | | | | | | | | This is a mechanically generated patch to ensure unit testing is in place for all of the Tested Runtimes for Train. See the Train python3-updates goal document for details: https://governance.openstack.org/tc/goals/train/python3-updates.html Change-Id: I331c42a1a79b8a79d9afd04edb136c8c31dc483c Story: #2005924 Task: #34226
* hacking: Resolve W605 (invalid escape sequence)Stephen Finucane2019-06-241-2/+2
| | | | | | | | This one's actually important since it will be an error in future versions of Python. Change-Id: Ib9f735216773224f91ac7f49fbe2eee119670872 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* hacking: Resolve E741 (ambiguous variable name)Stephen Finucane2019-06-241-2/+2
| | | | | Change-Id: I071ac917d192d0dd70eaf78a22d2716ecb648eb4 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* hacking: Resolve W503 (line break occurred before a binary operator)Stephen Finucane2019-06-241-2/+2
| | | | | Change-Id: I6381365ff882cf23808e8dabfce41143c5e35192 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "update comment on ignore_basepython_conflict"Zuul2019-06-131-3/+3
|\
| * update comment on ignore_basepython_conflictSean Mooney2019-06-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current comment implies that setting ignore_basepython_conflict simply silences the warning emitted if the base python version set in the gloabl [testenv] section conflicts with the automatic python version selected form the test env name .e.g. py27 this is not correct as the upstream documentation states setting ignore_basepython_conflict=true allow enforcing this rule that py37 implies python3.7 however when its is not set basepython from [testenv] override the implied version form the env name. https://tox.readthedocs.io/en/latest/config.html#conf-ignore_basepython_conflict This change updates the comment to reflect that. Change-Id: Ieab65a2a9c6309021d5ee91e56ac07889a9e9bc4 Related-Bug: #1832652
* | update constraints urltonybrad2019-06-121-1/+1
|/ | | | | | See http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html Change-Id: I7be44967f84e0da54596f4b111d5ee6aa55f9ee7
* Delete the placement codeChris Dent2019-04-281-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This finalizes the removal of the placement code from nova. This change primarily removes code and makes fixes to cmd, test and migration tooling to adapt to the removal. Placement tests and documention were already removed in early patches. A database migration that calls consumer_obj.create_incomplete_consumers in nova-manage has been removed. A functional test which confirms the default incomplete consumer user and project id has been changes so its its use of conf.placement.incomplete_* (now removed) is replaced with a constant. The placement server, running in the functional test, provides its own config. placement-related configuration is updated to only register those opts which are relevant on the nova side. This mostly means ksa-related opts. placement-database configuration is removed from nova/conf/database. tox.ini is updated to remove the group_regex required by the placement gabbi tests. This should probably have gone when the placement functional tests went, but was overlooked. A release note is added which describes that this is cleanup, the main action already happened, but points people to the nova to placement upgrade instructions in case they haven't done it yet. Change-Id: I4181f39dea7eb10b84e6f5057938767b3e422aff
* Replace git.openstack.org URLs with opendev.org URLsZhongShengping2019-04-241-2/+2
| | | | | | | Thorough replacement of git.openstack.org URLs with their opendev.org counterparts. Change-Id: I3e0af55e0707f04428a422b973d016ad30c82a12
* Merge "Bump to hacking 1.1.0"Zuul2019-04-161-3/+8
|\
| * Bump to hacking 1.1.0Stephen Finucane2019-04-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | This brings in a couple of new checks which must be addressed, many of which involve a rather large amount of changes, so these are ignored for now. A series of follow-up changes will resolved these. 'pycodestyle' is added as a dependency rather than it being pulled in transitively. This is necessary since we're using it in tests. Change-Id: I35c654bd39f343417e0a1124263ff31dcd0b05c9 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Dropping the py35 testingGhanshyam Mann2019-04-151-15/+4
|/ | | | | | | | | | | | | | | | | | All the integration testing has been moved to Bionic now[1] and py3.5 is not tested runtime for Train or stable/stein[2]. As per below ML thread, we are good to drop the py35 testing now: http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html [2] https://governance.openstack.org/tc/reference/runtimes/stein.html https://governance.openstack.org/tc/reference/runtimes/train.html Change-Id: Ia1289f038b92c36dbdd79bcdf12d7cb95a3e5aa9 Signed-off-by: zhangyangyang <zhangyangyang@unionpay.com>
* Correct lower-constraints.txt and the related tox jobChris Dent2019-04-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the review of a similar change in placement [1], it was realized that the nova lower-constraints tox job probably had the same problems. Testing revealed this to be the case. This change fixes the job and updates the related requirements problems accordingly. The are two main factors at play here: * The default install_command in tox.ini uses the upper_contraints.txt file. When there is more than one constraints.txt they are merged and the higher constraints win. Using upper and lower at the same time violates the point of lower (which is to indicate the bare minimum we are capable of using). * When usedevelop is true in tox, the command that is run to install the current projects code is something like 'python setup.py develop', which installs a project's requirements _after_ the install_command has run, clobbering the constrained installs. When using pbr, 'python setup.py install' (used when usedevelop is False) does not do this. Fixing those then makes it possible to use the test to fix the lower-constraints.txt and *requirements.txt files, changes include: * Defining 'usedevelop = False' in the 'lower-constraints' target and removing the otherwise superfluous 'skipsdist' global setting to ensure requirements aren't clobbered. * Removing packages which show up in lower-constraints.txt but not in the created virtualenv. Note that the job only runs unit tests, so this may be incomplete. In the placement version of this both unit and functional are run. We may want to consider that here. * Updating cryptography. This version is needed with more recent pyopenssl. * Updated keystonemiddleware. This is needed for some tests which confirm passing configuration to the middleware. * Update psycopg2 to a version that can talk with postgresql 10. * Add PyJWT, used by zVMCloudConnector * Update zVMCloudConnector to a version that works with Python 3.5 and beyond. * Update olso.messaging to versions that work with the tests, under Python 3. * Adding missing transitive packages. * Adjusting alpha-ordering to map to how pip freeze does it. * setuptools is removed from requirements.txt because the created virtualenv doesn't contain it NOTE: The lower-constraints.txt file makes no commitment to expressing minimum requirements for anything other than the current basepython. So the fact that a different set of lower-constraints would be present if we were using python2 is not relevant. See discussion at [1]. However, since requirements.txt _is_ used for python2, the requirements-check gate job requires that enum34 be present in lower-constraints.txt because it is in requirements.txt. NOTE: A test is removed because it cannot work in the lower-constraints context: 'test_policy_generator_from_command_line' forks a call to 'oslopolicy-policy-generator --namespace nova' which fails because stevedore fails to pick up nova-based entry points when in a different process. This is because of the change to usedevelop. After discussion with the original author of the test removal was considered an acceptable choice. [1] http://eavesdrop.openstack.org/irclogs/%23openstack-dev/%23openstack-dev.2019-03-05.log.html#t2019-03-05T13:28:23 Closes-Bug: #1822575 Change-Id: Ic6466b0440a4fe012731a63715cf5d793b6ae4dd
* Merge "Fix deps for api-samples tox env"Zuul2019-02-151-1/+1
|\
| * Fix deps for api-samples tox envMatt Riedemann2019-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The api-samples tox target fails since it needs the PlacementFixture which comes from the placement repo. This fixes it by using the same deps trick as the other functional test environments. As a result, the shared environment is also removed. Change-Id: I815b8b3cff5dcbb0fc4be5f1d85019111c2009e5
* | Use tox 3.1.1 fixesEric Fried2019-02-121-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By 3.1.1, tox had fixed: - [1] which mishandled the basepython directive. - ignoring PYTHONDONTWRITEBYTECODE [2] Require this version and remove the workarounds. See ML thread [3] for some details [1] https://github.com/tox-dev/tox/issues/477 [2] https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699 [3] http://lists.openstack.org/pipermail/openstack-dev/2018-July/thread.html#132075 Change-Id: Iff442451c7a95caa7b9d22c76c341150175a34d1
* | tox: Don't write byte code (maybe)Eric Fried2019-02-121-0/+3
|/ | | | | | | | | | | | | | | In tox versions after 3.0.0rc1 [1], setting the environment variable PYTHONDONTWRITEBYTECODE will cause tox not to write .pyc files, which means you don't have to delete them, which makes things faster. In older tox versions, the env var is ignored. If we bump the minimum tox version to something later than 3.0.0rc1, we can remove the commands that find and remove .pyc files. [1] https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699 Change-Id: I779a17afade78997ab084909a9e6a46b0f91f055
* cleanup *.pyc files in docs tox envsSean Mooney2019-02-061-0/+4
| | | | | | | | | | | | | | | | .pyc files are ignored by nova's .gitignore, as a result if you change branches after the .pyc files are generated for example from stable/ocata to master it does not remove the .pyc files. This can lead to the _validate_bytecode_header function that is invoked as part of sphinx-build to fail as the .pyc files no longer match the contents of the checked out files. This change adds {[testenv]commands} to the docs envs to clean up stale .pyc files before running sphinx-build Change-Id: I536a260da639d32afbc998be220305f9489db375
* Make functional-py37 job work like othersChris Dent2019-01-141-1/+1
| | | | | | | | | | | | | | The functional-* jobs have specific dependencies (external placement) which need to be present in the job. When the functional-py37 was created it conflicted with that change but since it is not yet run in the gate, we didn't notice. Also, because the functional jobs use the tox-siblings functionality in the gate, the tox name and tox env have to be the same (that's just how tox-siblings works), so that is fixed here too. Change-Id: I51e60a3149d653753ec4fc9d62a8c670e6eaf96e
* Merge "Add python 3.7 unit and functional tox jobs"Zuul2018-12-171-0/+13
|\
| * Add python 3.7 unit and functional tox jobsChris Dent2018-12-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without these, if you try to run tox -epy37,functional-py37 you'll get a successful tox run, but no actual tests are run, which is rather misleading. Given the generaly availability of python 3.7 this is a bad thing. Running the tests under python 3.7 identified a few minor tests failures, also fixed here. Each is a result of a change in behavior in python 3.7: * printable unicode changes with a new Unicode 11-based unicodedata package * intentionally raising StopIteration in a generator is now considered a RuntimeError, 'return' should be used instead * an exception message is different beween python 3 and python 2, and the guard for it was mapping python 3.5 and 3.6 but not 3.7. zuul configuration is adjusted to add an experimental job for python 3.7 unit. A functional test job is not added, because we don't have 3.6 yet, and we probably want to get through that first. Closes-Bug: #1807976 Closes-Bug: #1807970 Change-Id: I37779a12d3b36eb3dc7e2733d07fe0ed23ab3da6
* | Use external placement in functional testsChris Dent2018-12-121-3/+17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the fixtures used by the functional tests so they use placement database and web fixtures defined by placement code. To avoid making redundant changes, the solely placement- related unit and functional tests are removed, but the placement code itself is not (yet). openstack-placement is required by the functional tests. It is not added to test-requirements as we do not want unit tests to depend on placement in any way, and we enforce this by not having placement in the test env. The concept of tox-siblings is used to ensure that the placement requirement will be satisfied correctly if there is a depends-on. To make this happen, the functional jobs defined in .zuul.yaml are updated to require openstack/placement. tox.ini has to be updated to use a envdir that is the same name as job. Otherwise the tox siblings role in ansible cannot work. The handling of the placement fixtures is moved out of nova/test.py into the functional tests that actually use it because we do not want unit tests (which get the base test class out of test.py) to have anything to do with placement. This requires adjusting some test files to use absolute import. Similarly, a test of the comparison function for the api samples tests is moved into functional, because it depends on placement functionality, TestUpgradeCheckResourceProviders in unit.cmd.test_status is moved into a new test file: nova/tests/functional/test_nova_status.py. This is done because it requires the PlacementFixture, which is only available to functional tests. A MonkeyPatch is required in the test to make sure that the right context managers are used at the right time in the command itself (otherwise some tables do no exist). In the test itself, to avoid speaking directly to the placement database, which would require manipulating the RequestContext objects, resource providers are now created over the API. Co-Authored-By: Balazs Gibizer <balazs.gibizer@ericsson.com> Change-Id: Idaed39629095f86d24a54334c699a26c218c6593
* Remove Placement API referenceTakashi NATSUME2018-11-281-10/+0
| | | | | | | | | | | The placement project has published the API reference in its own repository and the related jobs for the nova project has been removed since Ia4680f24d78af1260f2f0106a458b78a079c1287. So remove the files and definitions related to the placement API reference in the nova repository. Change-Id: Ia43b958a28e7e763e7ecb29e06f8d21d2b9a850f
* tox: Stop build *all* docs in 'docs'Stephen Finucane2018-10-261-4/+13
| | | | | | | | | | | | | | | The 'docs' target currently builds the documentation trees in 'api-ref', 'api-guide' and 'placement-api-ref', in addition to 'doc'. This massively increases the amount of time docs take to build both locally and in the gate. It's not necessary for gate, since separate jobs take care of the other documents for us [1]. As such, we should stop doing it. For users that *do* care about this (for whatever reason) a new 'all-docs' target is included. [1] https://github.com/openstack-infra/project-config/blob/master/zuul.d/projects.yaml#L5578-L5595 Change-Id: I58bd50e869fc00dde5dd388efb686a7196c8db80 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Fix missing specifying doctrees directoryTakashi NATSUME2018-09-201-1/+1
| | | | | | | | | | In tox.ini file, the doctrees directory is specified as an argument of sphinx-build command in api-guide, api-ref, placement-api-ref, releasenotes targets. But it is missing in docs. So add it. TrivialFix Change-Id: I74ea98b1330c1c550dae53fafc79bd6e41727296
* Removing pip-missing-reqs from default tox jobsChris Dent2018-09-031-1/+1
| | | | | | | | | | | Change I1b02384494ae9f440b72b98d9ae5f31d88dc8967 removed the tox env entry for pip-missing-reqs but did not remove the job from the envlist. This means that if you run tox with no args it will run that job, using the default venv setup with takes time but runs no tests. Change-Id: I8355372da93b93cc1c7f7a1501af0fbd01eee615
* Remove blacklisted py3 xen testsEric Fried2018-08-141-2/+2
| | | | | | | | | | Xen UT failures seem to have cleared up, which may or may not have anything to do with [1]. Remove the blacklist file and get these back in the py3 jobs. [1] https://review.openstack.org/#/c/591061/ Change-Id: Iacc1ae01f535caed64793d57b757ea07a8c46620
* Add explicit functional-py36 tox targetChris Dent2018-08-081-0/+7
| | | | | | | | Without this, you can successfully run a 'functional-py36' environment, but no actual tests are run. Python 3.6 is common in many environments these days, and we want devs to test locally. This helps. Change-Id: I2c04b7a8b6ee06638c6ce92dc51e200fa2b13539