Refactors configuration loading in order to simplify it and to
allow overriding defaults using environment variables.
This behavior is similar to other tools like pip or ansible, which
can load any configurable option from env.
This step ease migration towards containerized use, where we do not
want to keep any secrets inside containers and we may want to
avoid volume mounting, especially when testing.
Change-Id: I0d3a9f19b0ba8d1604d0ca63db01296a3219fb47
Switches queries testing to use of pytest which provides the following:
- test generator for each query (parametrize)
- ability to test a single query test
- generate html report with test results, making easier to investigate
failures.
- parallel executions
- minor bugfix which prevented running queries from running with py38
as the config parser requires only strings (None being invalid).
Change-Id: I982c694a5160a9ecfd117d177d30b911cfe53425
- Dropping py27 as is out of support
- Enable py38 testing, already default python on several distros.
- removes six as a dependency as is no longer needed for pure py3
Change-Id: I1e825073abc6cd55aa2fdc363358f2701152c57b
- Upgraded hacking(flake8)
- Added more modern tox linters environment (pep8 alias)
- Temporary added skips for broken newer rules
- Fixed few basic rule violations
- Moved flake8 config to setup.cfg (tox.ini is not recommended)
Change-Id: I75b3ce5d2ce965a9dc5bdfaa49b2aacd8f0195ad
As of the great renaming of 2019 we need to update the
openstack gerrit URL default to review.opendev.org.
Change-Id: I2e3f7e7fb03be0deba0c95995265376dbce3c5b6
Story: #2005498
Task: #30599
The playbook location changed and is no longer in project-config
so just make the query generic on the sub-directory rather than
the git repo.
Change-Id: I8532c193992adef0e996a3f42e9e84f491000c32
Monty updated the post-ssh.yaml playbook in project config to do other
post tasks and renamed it to post.yaml as a result. Change
If01bdd7b7656b1a9ebaa5d5d7d021f82093db8ac has all the details.
We need to accomodate that in the all fails query of e-r by updating the
all fails query to look for post.yaml instead of post-ssh.yaml. Note
that there are no query matches for post-ssh.yaml so we don't need an
interim period if matching both.
Change-Id: I208675c2258b6c635925c7b9ea9fae5afd000565
There were two problems with the all fails query as sorted out by
manually running the query in kibana. First the query didn't properly
group the two sides of the job log ending query. They were separated by
an OR and were meant to be grouped together as one clause in the query.
Second zuul now requires the .yaml suffix on playbook names so the query
looking for the post ssh playbook needs to end with .yaml.
Change-Id: I951b2824fe6934eca667d1b14f8caf63428da89a
Updating uncategorized failures is currently failing on a query parse
error in elasticsearch. This appears to be due to unbalanced parens in
the new all fails query. Rebalance the parens by removing the extra
leading paren.
Change-Id: I05626c563a9a053e396782c54dae4c6fa7d6e269
This commit ensures elastic-recheck is able to support zuul v2 and v3
simultaneously:
- Add message queries based on v3 completion messages
- Include job-output.txt where console.html was expected
Change-Id: If3d7990d892a9698a112d9ff1dd5160998a4efe6
Depends-On: I7e34206d7968bf128e140468b9a222ecbce3a8f1
To avoid confusion, switch everything to use jobs_re for recheckwatch
config.
Change-Id: I1a84db6ec346a32f38e00560c1b322e7d377d434
Needed-By: I1e2369225c9bd83296684af0dd9ea0514d9098c4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This should make elastic recheck to capture queries in projects like
neutron where the previous regex was not working for quite some time.
(In neutron gate, full job is called
gate-tempest-dsvm-neutron-full-ubuntu-xenial; there are some jobs that
don't even have 'tempest' in their names that should still participate
in the elastic recheck, like grenade jobs, or rally; all of them have
'dsvm' part though).
Speaking of the regex, probably it should have also be applied to
separate job names before classifying them. But I'll leave it for a
follow-up.
Change-Id: If98951d13ba82833444ef4ffbb7c6be179126f2b
In change Ic6f115a6882494bf4c087ded4d7cafa557765c28, test_queries.py
was not updated to use the new Config class.
It causes the non-voting test to fail for the 'wrong' reasons.
Change-Id: Ib729d5d360619bf289bc9c91f2a3f856f525a947
There are a few hardcoded strings and numbers in uncategorized_fails.
Make these configurable so that it is easier to reuse this tool.
Also add some debug logging.
Change-Id: Ie62ce83bb43dcc8d9b382fe6719fe57eacc5727b
Refactor to use a config class to hold all the
params needed so that they can be more easily
overridden and reused across all the
elastic-recheck tools.
In addition, use the new class to make the
jobs_regex and ci_username configurable.
Change-Id: Ic6f115a6882494bf4c087ded4d7cafa557765c28