From 2bf82c266941c5aa66f2e605c410be792329b603 Mon Sep 17 00:00:00 2001 From: Jakob Meng Date: Tue, 19 Apr 2022 21:55:32 +0200 Subject: [PATCH] Temporarily set job openstack-tox-linters-ansible-2.9 to non-voting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python module rstcheck which is used by ansible-test deprecated Python versions prior 3.7 in version 3.5.0 and removed support in 4.0.0 [1]. Ubuntu 18.04 LTS (Bionic Beaver) comes with Python 3.6 by default, so rstcheck prints a FutureWarning which confuses ansible-test: Run command: ***/python -m rstcheck --report warning --ignore-substitutions _,br,release,today,version docs/openstack_guidelines.rst Traceback (most recent call last): File "***/ansible-test", line 28, in main() File "***/ansible-test", line 24, in main cli_main() File "***/ansible_test/_internal/cli.py", line 130, in main args.func(config) File "***/ansible_test/_internal/sanity/__init__.py", line 193, in command_sanity result = test.test(args, sanity_targets, version) File "***/ansible_test/_internal/sanity/rstcheck.py", line 80, in test results = parse_to_list_of_dict(pattern, stderr) File "***/ansible_test/_internal/util.py", line 799, in parse_to_list_of_dict raise Exception('Pattern "%s" did not match values:\n%s' % (pattern, '\n'.join(unmatched))) Exception: Pattern "^(?P[^:]*):(?P[0-9]+): \((?PINFO|WARNING|ERROR|SEVERE)/[0-4]\) (?P.*)$" did not match values: ***/rstcheck.py:51: FutureWarning: Python versions prior 3.7 are deprecated. Please update your python version. FutureWarning ERROR: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=***/ ansible_collections/openstack/cloud LC_ALL=en_US.UTF-8 ***/python3.6 ***/ansible-test sanity -v --python 3.6 --skip-test metaclass-boilerplate --skip-test future-import-boilerplate plugins/ docs/ meta/ scripts/ --metadata ***.json --truncate 0 --redact --color no --requirements" returned exit status 1. We cannot constrain the version of rstcheck which ansible-test installs into its Python virtual environment. This has to be fixed in Ansible itself, a pull request against Ansible 2.9 has been opened [2]. Ref.: [1] https://github.com/myint/rstcheck/blob/master/README.rst [2] https://github.com/ansible/ansible/pull/77568 As a workaround we temporarily set our Ubuntu 18.04 based linter job openstack-tox-linters-ansible-2.9 to non-voting and remove it from check dependencies and as a gate job. Thanks to Arx Cruz and Jesper Schmitz Mouridsen for pointing out this issue and its root cause ☺️ Change-Id: Ic6f2febc5a40a29534ac4c7f41f714865099086a --- .zuul.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index a6d2c6cd..8f36c075 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -494,6 +494,8 @@ nodeset: ubuntu-bionic description: | Run openstack collections linter tests using the 2.9 branch of ansible + # TODO: Change back to voting once ansible-test is compatible with rstcheck on Python 3.6 + voting: false required-projects: - name: github.com/ansible/ansible override-checkout: stable-2.9 @@ -629,7 +631,8 @@ - ansible-collections-openstack-functional-devstack: dependencies: &deps_unit_lint - tox-pep8 - - openstack-tox-linters-ansible-2.9 + # TODO: Add back once ansible-test is compatible with rstcheck on Python 3.6 + #- openstack-tox-linters-ansible-2.9 - openstack-tox-linters-ansible-2.12 voting: false @@ -678,7 +681,8 @@ jobs: - tox-pep8 - openstack-tox-linters-ansible-2.12 - - openstack-tox-linters-ansible-2.9 + # TODO: Add back once ansible-test is compatible with rstcheck on Python 3.6 + #- openstack-tox-linters-ansible-2.9 # - ansible-collections-openstack-functional-devstack - ansible-collections-openstack-functional-devstack-releases # - ansible-collections-openstack-functional-devstack-ansible-2.9