Updates for docker and frontpage of elastic-recheck
This patch adds the follow: * Due python package update, the Dockerfile needs to contain some python packages, gcc and g++ * Create a script to instead of copy the queries from a elastic-recheck directory, clone the tripleo-ci-health-queries directly, this will allow better development envionment, and keep the queries updated automatically * Add the Details text with a message or the query used in the bug. The message is provided by https://review.opendev.org/c/openstack/tripleo-ci-health-queries/+/806409 to the query yaml file. If a message exists, Details will display that, otherwise, it will display the query. This will enable people to more quickly figure out what is all about that particular error. Change-Id: I787e03b89905090f7499fa6fe776e49eb3c20bac
This commit is contained in:
@@ -8,8 +8,12 @@ FROM alpine:3.13 as elastic-recheck
|
||||
RUN \
|
||||
apk update && \
|
||||
apk add \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
musl-dev \
|
||||
nginx \
|
||||
python3-dev \
|
||||
py3-argparse \
|
||||
py3-babel \
|
||||
py3-certifi \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
cd /data/www
|
||||
/root/er-safe-run.sh elastic-recheck-graph /opt/elastic-recheck/queries -o all-new.json
|
||||
/root/er-safe-run.sh elastic-recheck-graph /opt/tripleo-ci-health-queries/output/elastic-recheck -o all-new.json
|
||||
mv all-new.json all.json
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
cd /data/www
|
||||
/root/er-safe-run.sh elastic-recheck-graph /opt/elastic-recheck/queries -o gate-new.json -q gate && mv gate-new.json gate.json
|
||||
/root/er-safe-run.sh elastic-recheck-graph /opt/tripleo-ci-health-queries/output/elastic-recheck -o gate-new.json -q gate && mv gate-new.json gate.json
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
set -ex
|
||||
cd /data/www
|
||||
mkdir -p new
|
||||
/root/er-safe-run.sh elastic-recheck-uncategorized -d /opt/elastic-recheck/queries -t /var/www/localhost/templates -o new
|
||||
/root/er-safe-run.sh elastic-recheck-uncategorized -d /opt/tripleo-ci-health-queries/output/elastic-recheck -t /var/www/localhost/templates -o new
|
||||
mv new/*.html .
|
||||
|
||||
17
data/cron/cron-er-queries.sh
Executable file
17
data/cron/cron-er-queries.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#! /bin/sh
|
||||
set -ex
|
||||
|
||||
# Check if elastic-recheck is indeed a git repository
|
||||
|
||||
if [ ! -d /opt/tripleo-ci-health-queries ]; then
|
||||
cd /opt
|
||||
git clone https://opendev.org/openstack/tripleo-ci-health-queries
|
||||
else
|
||||
cd /opt/tripleo-ci-health-queries
|
||||
git pull
|
||||
if [! $? -eq 0]; then
|
||||
cd /opt
|
||||
rm -rf /opt/tripleo-ci-health-queries
|
||||
git clone https://opendev.org/openstack/tripleo-ci-health-queries
|
||||
fi
|
||||
fi
|
||||
@@ -6,6 +6,7 @@ mkdir -p /data/www
|
||||
|
||||
# Used under docker to emulate cron execution, but we force running all
|
||||
# jobs first, so we do not have to wait for refresh when newly deployed.
|
||||
/root/cron-er-queries.sh
|
||||
/root/cron-er-graph-uncat.sh
|
||||
/root/cron-er-graph-gate.sh
|
||||
/root/cron-er-graph-all.sh
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
20,50 * * * * /root//root/cron-er-queries.sh
|
||||
00,30 * * * * /root/cron-er-graph-all.sh
|
||||
10,40 * * * * /root/cron-er-graph-gate.sh
|
||||
20,50 * * * * /root/cron-er-graph-uncat.sh
|
||||
|
||||
@@ -18,8 +18,6 @@ services:
|
||||
- LS_URL
|
||||
volumes:
|
||||
- er-volume:/data
|
||||
# mount queries from outside the container, so we can update them w/o having to restert it
|
||||
- ../tripleo-ci-health-queries/output/elastic-recheck:/opt/elastic-recheck/queries
|
||||
bot:
|
||||
container_name: er-bot
|
||||
image: localhost/elastic-recheck
|
||||
|
||||
@@ -167,7 +167,6 @@ def main():
|
||||
}
|
||||
|
||||
# Get the cluster health for the header
|
||||
|
||||
for query in classifier.queries:
|
||||
if args.queue:
|
||||
query['query'] += ' AND build_queue:%s' % args.queue
|
||||
@@ -190,6 +189,7 @@ def main():
|
||||
fails=0,
|
||||
fails24=0,
|
||||
data=[],
|
||||
msg=query.get('msg') or query['query'],
|
||||
voting=(not query.get('allow-nonvoting')))
|
||||
buglist.append(bug)
|
||||
try:
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
<h3>{{bug.fails24}} fails in 24 hrs / {{bug.fails}} fails in
|
||||
10 days</h3>
|
||||
<h3>Projects: {{bug.bug_data.affects}}</h3>
|
||||
<h3>Details: {{bug.msg}}</h3>
|
||||
<!-- only display that a job is non-voting since voting:1 is the
|
||||
default filter -->
|
||||
{{#unless bug.voting}}
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<h3>{{bug.fails24}} fails in 24 hrs / {{bug.fails}} fails in
|
||||
10 days</h3>
|
||||
<h3>Projects: {{bug.bug_data.affects}}</h3>
|
||||
<h3>Details: {{bug.msg}}</h3>
|
||||
{{#if bug.bug_data.reviews}}
|
||||
<h3 class="openreviews">Open Reviews:</h3>
|
||||
<div class="openreviews">
|
||||
|
||||
Reference in New Issue
Block a user