Fix ansible sanity job

The ansible sanity job was failing because the new node
that runs the job was updated and no longer have python 3.8.
In order to use python 3.10 you need to update ansible-core
to at least 2.13, doing so, it also requires that we add
the ignore-2.13.txt, and update the zuul.d/layout.yaml.
The pylint complains then about use-a-generator, so adding
a comment in sova.py to ignore it for now
The new node that runs tox requires new python version

Change-Id: I1370d41b0c4e057c1c65cfd75ff945d648696771
This commit is contained in:
Arx Cruz 2022-11-14 11:48:01 +01:00
parent adab619a16
commit ff96a4112b
4 changed files with 7 additions and 2 deletions

View File

@ -173,6 +173,7 @@ class Pattern(object):
return self._patterns
# pylint: disable=use-a-generator
def line_match(pat, line, exclude=None):
if isinstance(pat, str):
return pat in line
@ -187,6 +188,9 @@ def line_match(pat, line, exclude=None):
return True
# pylint: enable=use-a-generator
def parse(text_file, patterns):
ids = []
msgs = []

View File

@ -0,0 +1 @@
ignore-2.10.txt

View File

@ -75,7 +75,7 @@ description = Used as base for all tox-ansible environments
[testenv:sanity]
usedevelop = False
deps =
ansible-core>=2.11,<2.12
ansible-core>=2.11,<2.14
[testenv:units]
usedevelop = False

View File

@ -6,7 +6,7 @@
vars:
tox_envlist: sanity # dynamic tox env added by tox-ansible
# we want to run sanity only on py38 instead of implicit 2.6-3.9 range
tox_extra_args: -- --python 3.8
tox_extra_args: -- --python 3.10
- job:
name: tox-ansible-test-units