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
Replaces static implementation that received password and a member
function that can make use of the config object.
Change-Id: If9617b6db73eb49c5193f098d45e357a267529dd
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
The elastic-recheck-tox-queries job is failing because
there is a query on an os-brick bug and the os-brick
project in launchpad is not part of the openstack project
group. This change simply hard-codes it since we know os-brick
is part of openstack.
Change-Id: Ia05c009226f88da427ec6ad9724410cd6ebed859
Story: 2006736
Task: 37197
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
Previously we gave every event a 20 minute timeout. This meant that we
could eventually rollover on the day and start querying against current
indexes for data in older indexes. If this happens every query would
fail because we are looking in the wrong index. Every query failing
means we run the 20 minute timeout every time.
All this results in snowballing never being able to check if events are
indexed.
Address this by using the gerrit eventCreatedOn timestamp to determine
when our timeout is hit. We will timeout 20 minutes from that timestamp
regardless of how long interim processing has taken us. This should over
longer periods of time ensure we query the current index for current
events.
Change-Id: Ic9ed7fefae37d2668de5d89e0d06b8326eadfbb9
When gerrit is running slow we get 502 responses
back which kills the graph builder. We can retry
these requests from the client to keep going. Generally
a single retry fixes it.
Change-Id: I745d7c9b80ab8861972193d82c037df76af69e06
When elastic search indexing is behind, and the day has
progressed forward to a new day, the latest
index is not yet available for use. Exclude it from searches
until it is ready in order to avoid the ElasticHttpNotFoundError.
Add Unit tests for this case as well as for when multiple days
are specified for the search.
Change-Id: Ifd27d1ab21bebcb63b48ea164f425c4a2ac8759c
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
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
When stackforge was compacted into the openstack/ git namespace this
broke our filtering on just integrated gate projects. This commit does
2 things to handle this. First it takes a list of the projects using
the integrated gate job template from zuul's layout.yaml and uses that
to be the filter. This way we actual have a view of the integrated gate
again. It then makes a second page for all the other projects failures
which can be used by those to track uncategorized failures. A future
next step will be to add a config file to make the functional split of
these views configurable so that we can more easily adjust the split
as the interactions between projects change.
Change-Id: I41c8ae1e75e8a3d8893f6af5af7c283b5f5c1bcf
Fixtures 3.0.0 adds another parameter to MonkeyPatch fixture usage
which is some kind of link back to the class being patched out. This
makes the ER code pass under fixtures 3.0.
Change-Id: Id19d0dde8fa558cbf3c76a66430170d0d5b0cd94
Like bug 1539271, we should track failures for the live migration
tests in the non-voting multinode job(s).
This has 103 hits in 7 days, all failures.
Change-Id: Ibc65c035614f233f67653c3ca941244704e66c11
Related-Bug: #1524898
By default we add 'voting:1' to all queries so they are filtered
from the graph.
There are cases where we want to track bugs for non-voting jobs
in the graph, so add an 'allow-nonvoting' key for special bugs
that we want to track while we're trying to stabilize a job.
Updates the docs, adds a test query and unit test for the query
loader, fixes a bad query that was setting voting:1 already, and
removes the TODO in the query for bug 1539271.
Change-Id: I61b1d4b0faaa3f20fc5b04aa3392c68c61990866
This code doesn't work at all. Bring it back to life.
Also accept inputs from a config file.
Closes-Bug: #1526921
Change-Id: I8f45dc9d42f7547f9d849686739b9a641c176814
Elastic recheck is about failures, all queries should only include
voting changes. We do this by explicitly adding voting:1 to all
queries that load in the query builder.
Change-Id: I4bd4827f72d85bf69bf501be2f5744e71de35a3c
These tests don't work anymore. Skip them until they are fixed.
They are not normally run, but are run by default in IDEs that
run all unit tests.
Related-Bug: #1517730
Change-Id: I7ad86158ba29ae7210b31c0f45df62277112b3f4
jaraco.functools 1.6 is broken and is pulled in by the irc lib. Use an
older version to avoid the brokenness. Use a real url in the fake
connection url as this is checked for correctness when creating
elasticsearch transport objects.
Change-Id: I41b5868c0c055297bb9ead1ad96486afeed9cce5
This is an upstreaming of:
https://github.com/dolph/spandexhttps://pypi.python.org/pypi/spandex
... which I'll nuke if this is merged.
I use this tool to write, test, and look for patterns in the results of
elastic recheck queries. I never use logstash.openstack.org anymore.
Change-Id: I864b22c05b398f6ad8ccb9009b5866f36b46789d
Some teams aren't using elastic recheck for tracking issues, which is
fine, but with the big tent this means that the openstack/ method of
inclusion no long works. Specifically exclude jobs from projects and
efforts that seem to not be using ER regularly.
Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com>
Change-Id: Iaa55bb46f4c1cc20dc05fd03797f35e9d74f7cc0
This commit adds a new field to the query yaml test_ids which is a
list of test_ids that will be query the subunit2sql db to verify that
at least one of them failed on the failed uuid.
Change-Id: If3668709e3294b5d6bf9e1f082396fbc39c08512
Instead of getting the queries directory from the config file, just hard
code the default path inside this repo.
Change-Id: Ia7a860b8b81b1b9b3f1628ef1214480754f6711a
* Check if launchpad bug is part of OpenStack or oslo launchpad groups.
fail if no tasks are targeted against those groups
* Ignore specific series
Make sure the test should not fail do to things like bugs closing etc.
Change-Id: I5a0b33c0e809e2ecf2050272142d1a15f60a23da
Previously test_queries, tested for:
* check if the query has hits
* check if the launchpad bug is open
This wasn't a good test to gate on because hits can go away and bugs can
be closed, so this test can stop working without any code changes,
making it a bad gating test.
Split out getting launchpad test working to a separate patch, still a
few more issues to sort out there.
Change-Id: Ic362d89a0ed34bb14864237e4bc5975befc36497
* Similar to suppress-graph
There are some gate failures that are expected and are real errors (such
as global-requirements mismatches in requirements jobs).
suppress-notifications allows us to classify these failures and remove
them from the unclassified page while not telling developers to recheck.
This can be used along with suppress-graph.
Change-Id: I6d905ba65e66e799a65598f8a5d5c3dd684feb8c
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.
Change-Id: I0fe0dcb62ac8e31d6cda8ad292a9c89c24932e1e