From c58555498836066002dc33620018e9bd1e2eeb6a Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Wed, 23 Sep 2020 18:34:23 +0200 Subject: [PATCH] CI: Fix kayobe-tox-molecule job When molecule runs, it installs ansible>2.8, which is version 2.10.0 since today. This now also installs the ansible-base package, currently at version 2.10.1. Then it installs the version of ansible required by kayobe, i.e. ansible>=2.8.0,<2.10.0 (currently 2.9.13). We end up with a tox molecule venv containing: ansible==2.9.13 ansible-base==2.10.1 This causes the following issue: ERROR! Unexpected Exception, this is probably a bug: cannot import name 'AnsibleCollectionLoader' from 'ansible.utils.collection_loader' (/home/zuul/src/opendev.org/openstack/kayobe/.tox/molecule/lib/python3.8/site-packages/ansible/utils/collection_loader/__init__.py) This commit adds requirements.txt to the molecule tox deps, which ensures the correct version of ansible gets installed first. Change-Id: I7ef890a2ae6fd67f53e1b8bca244a1c0d44fea53 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 135521409..d180fd09b 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ commands = [testenv:molecule] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/doc/requirements.txt whitelist_externals =