From 34239888eb661415ed372808304a42339563dad6 Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Thu, 12 Dec 2019 11:14:10 +0100 Subject: [PATCH] Use constraints for docs tox target and cap hacking This patch fixes 3 problems to fix gate jobs in Stein. 1. In Stein the docs target started to fail when new release of neutron-lib appeared. This is because tox installs neutron and its requirements without any constraints. To fix this both the upper constraints and neutron requirements needs to be added to dependencies of docs target. 2. Patch adjusted to stable/stein and by using upper constraints in Stein another sphinx error comes up: ../config-services-agent.rst:70:Error in "code-block" directive: 1 argument(s) required, 0 supplied. This also makes the docs build fail so a 'none' argument is added to the code-block. 3. Cap hacking in test-requirements.txt hacking as a linter is in global requirements blacklist and so is not in constraints. Recent release introduced new rules that required fix on master, on stable branches we should rather cap to the version that was in use during this release development. Closes-Bug: #1856156 Change-Id: Iea61238f37fdf24c0264f96d104ee0b3b6aec8e2 (cherry picked from commit 07be7934359aa121761396ba47128904f19cb2e4) (cherry picked from commit d1c4ba581085f4978da82a597b1387d60e79ff0c) --- doc/source/admin/config-services-agent.rst | 2 +- test-requirements.txt | 2 +- tox.ini | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/source/admin/config-services-agent.rst b/doc/source/admin/config-services-agent.rst index f3b36f1fe4c..e80f6764bcc 100644 --- a/doc/source/admin/config-services-agent.rst +++ b/doc/source/admin/config-services-agent.rst @@ -67,7 +67,7 @@ instead of using the ``kill`` command. Kill scripts are called with two parameters: -.. code-block:: +.. code-block:: none -kill diff --git a/test-requirements.txt b/test-requirements.txt index 3aca6003e02..7f71cfda0cf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 bandit>=1.1.0,<1.6.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 9c5e781633b..db804880265 100644 --- a/tox.ini +++ b/tox.ini @@ -146,7 +146,10 @@ commands = {posargs} [testenv:docs] basepython = python3 envdir = {toxworkdir}/docs -deps = -r{toxinidir}/doc/requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein} + -r{toxinidir}/doc/requirements.txt + -r{toxinidir}/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:linkcheck]