From 84bf94b86b79b61e8ebda34513bed08f84a5a552 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 13 Jan 2020 09:30:06 -0800 Subject: [PATCH 1/2] Add test constraint for setuptools. --- changelogs/fragments/ansible-test-setuptools-constraint.yml | 2 ++ .../targets/inventory_kubevirt_conformance/constraints.txt | 1 + .../integration/targets/inventory_kubevirt_conformance/runme.sh | 2 +- test/integration/targets/pip/meta/main.yml | 1 + test/integration/targets/pip/tasks/pip.yml | 1 + test/lib/ansible_test/_data/requirements/constraints.txt | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ansible-test-setuptools-constraint.yml create mode 100644 test/integration/targets/inventory_kubevirt_conformance/constraints.txt diff --git a/changelogs/fragments/ansible-test-setuptools-constraint.yml b/changelogs/fragments/ansible-test-setuptools-constraint.yml new file mode 100644 index 00000000000000..8fb0d0551f17bb --- /dev/null +++ b/changelogs/fragments/ansible-test-setuptools-constraint.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test no longer tries to install ``setuptools`` 45+ on Python 2.x since those versions are unsupported diff --git a/test/integration/targets/inventory_kubevirt_conformance/constraints.txt b/test/integration/targets/inventory_kubevirt_conformance/constraints.txt new file mode 100644 index 00000000000000..c44f44e9dee5d6 --- /dev/null +++ b/test/integration/targets/inventory_kubevirt_conformance/constraints.txt @@ -0,0 +1 @@ +setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later diff --git a/test/integration/targets/inventory_kubevirt_conformance/runme.sh b/test/integration/targets/inventory_kubevirt_conformance/runme.sh index 390f80cb547cb9..47e0fb7162a8a6 100755 --- a/test/integration/targets/inventory_kubevirt_conformance/runme.sh +++ b/test/integration/targets/inventory_kubevirt_conformance/runme.sh @@ -9,7 +9,7 @@ fi set -eux source virtualenv.sh -pip install openshift +pip install openshift -c constraints.txt ./server.py & diff --git a/test/integration/targets/pip/meta/main.yml b/test/integration/targets/pip/meta/main.yml index 07faa217762603..129fa698f16a85 100644 --- a/test/integration/targets/pip/meta/main.yml +++ b/test/integration/targets/pip/meta/main.yml @@ -1,2 +1,3 @@ dependencies: - prepare_tests + - setup_remote_constraints diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index 3dd451a6308848..ee31fe20378313 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -499,6 +499,7 @@ name: distribute virtualenv: "{{ output_dir }}/pipenv" state: present + extra_args: "-c {{ remote_constraints }}" - name: try to remove distribute pip: diff --git a/test/lib/ansible_test/_data/requirements/constraints.txt b/test/lib/ansible_test/_data/requirements/constraints.txt index 4d8d4e58c41e30..09225c32b30242 100644 --- a/test/lib/ansible_test/_data/requirements/constraints.txt +++ b/test/lib/ansible_test/_data/requirements/constraints.txt @@ -37,6 +37,7 @@ lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 pyvmomi < 6.0.0 ; python_version < '2.7' # pyvmomi 6.0.0 and later require python 2.7 or later pyone == 1.1.9 # newer versions do not pass current integration tests botocore >= 1.10.0 # adds support for the following AWS services: secretsmanager, fms, and acm-pca +setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later # freeze pylint and its requirements for consistent test results astroid == 2.2.5 From 9a648a727addced2b976f640daf20943f2f54c86 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 13 Jan 2020 11:15:07 -0800 Subject: [PATCH 2/2] Update pip test to work on centos6 container. --- test/integration/targets/pip/meta/main.yml | 1 - test/integration/targets/pip/tasks/pip.yml | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/pip/meta/main.yml b/test/integration/targets/pip/meta/main.yml index 129fa698f16a85..07faa217762603 100644 --- a/test/integration/targets/pip/meta/main.yml +++ b/test/integration/targets/pip/meta/main.yml @@ -1,3 +1,2 @@ dependencies: - prepare_tests - - setup_remote_constraints diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index ee31fe20378313..19bd5d813876a4 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -496,10 +496,13 @@ - name: install distribute in the virtualenv pip: - name: distribute + # using -c for constraints is not supported as long as tests are executed using the centos6 container + # since the pip version in the venv is not upgraded and is too old (6.0.8) + name: + - distribute + - setuptools<45 # setuptools 45 and later require python 3.5 or later virtualenv: "{{ output_dir }}/pipenv" state: present - extra_args: "-c {{ remote_constraints }}" - name: try to remove distribute pip: