We need to catch ValueError when we extract log information
from the file name provided by user.
Instead of raising an exception, we just log a warning to the
user. The normal usage can handle None uuid or timestamp or
validation-id.
This will aim to make the ValidationLog class more generic.
Change-Id: Iccc2a37b4c2c911e634a210de253ba1111e5b7e7
When missing datas in ansible log for some reasons,
we need to avoid None value, and just ignore it.
Change-Id: Ic6e05bf65bf01eeafd5e9222f3410a4dc5a50c9e
In order to run ansible on its own and get validations
progress and result with the CLI, the review adds an
option to run ansible asynchronously
Change-Id: Id884c9fd606ba03cb7d7fb02491582f1f88c3857
From time to time, unit tests execution fails with error: "TypeError:
'NoneType' object is not iterable". It seems that problem is in
unittest2 library, which is used by testtools for executing the tests.
Stestr lib is usinig unittest by default and the problem does not appear
for several hundred launches.
Authored-By: danpawlik <dpawlik@redhat.com>
Change-Id: I6646629128d9265b5fb7390dc131c55cf34a07ca
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: Ia57c69b8433fa3bf8d8edb47441ef737945232cb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.
Change-Id: I853112437e2e9610d421cc48e16f1386a0967788
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Globalize usage of the validation_path attribut set by
the __init__ instead of playing with variables which
introduce bugs and wrong usage
Change-Id: Ie61b380762c911d120076d50551b4661f1ef1526
Increase the unit tests coverage for recent code:
validation, group and logs classes.
(Increase of 54 unit tests)
Move per action files into one test file:
test_validation_actions
Change-Id: I7a1a8b0681c13ebd758a5686b2398a0a9e87a4eb
In python3.x mock is now part of unittest library.
For being still compatible with python 2.7 we need to
catch import error when trying to import unittest.mock
Change-Id: I6aca21bea4f1563e1f3c5ecfb91c511191eb409b
Add backward compatibility for old ansible_runner releases.
Ansible_runner.runner_config under 1.4.x has a different
way to handle envars and doesn't have location isolation behavior.
So we need to handle this two differences in ansible.py code to be
able to use it in stable/train openstack branch.
Change-Id: Ic2e477ec55758144b6eacc8a9b52ece881855d44
Create two classes for Log and Logs in order to get
a simpler representation of the validation Log and
provide easy way to manage the log data informations
Change-Id: I743355cef943e43492264d4c4700bebbeab9a37d
This patch also adds dependency to the linters jobs to save the CI.
Change-Id: I2ce56ddc1841bba78905a8460e26c541602f75df
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
It's better to use templates so that we can change configuration
globally. Use the lower-constraints template.
Also, sort list of templates and indent items by two spaces as we do
normally.
Change-Id: I64197cd887e9af5e0c9a811bb7e75b1e87e96ded
Move all validation actions into a ValidationActions class
in order to have one object with several validations actions
Add group info implementation
And add group object like validation object to have
a simpler representation of the validation group.
Change-Id: Idc7a55e26de20968f0a6a90f2a005d21a30c9e70
This review add functionnalities to parse and show
validations output as dict with the required format
Change-Id: I57ca3d18397c7fbdb084b06224d7cab3d4592d30
Now that we have moved to py36 and later runtimes, we no longer
need to use the third party mock library and can only use the standard
library unittest.mock instead.
Change-Id: I97219a6b3ca2cff88b8871458466825e79736f77
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>