reproducible: introduce a new "timeout" status to represent build timeouts

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent bb4adfb6
......@@ -53,6 +53,7 @@ class Status(Enum):
FTBFS = _status('FTBFS', 'FTBFS', 'weather-storm.png')
FTBR = _status('FTBR', 'unreproducible', 'weather-showers-scattered.png')
E404 = _status('E404', '404', 'weather-severe-alert.png')
TIMEOUT = _status('timeout', 'build timeout', 'Current_event_clock.png')
DEPWAIT = _status('depwait', 'depwait', 'weather-snow.png')
NFU = _status('NFU', 'not for us', 'weather-few-clouds-night.png')
UNTESTED = _status('untested', 'untested', 'weather-clear-night.png')
......
......@@ -146,7 +146,7 @@ update_db_and_html() {
query_db "SELECT status FROM results WHERE package_id='${SRCPKGID}'")
# irc+mail notifications for changing status in unstable and experimental
if [ "$SUITE" = "unstable" ] || [ "$SUITE" = "experimental" ] ; then
if ([ "$OLD_STATUS" = "reproducible" ] && ( [ "$STATUS" = "FTBR" ] || [ "$STATUS" = "FTBFS" ] )) || \
if ([ "$OLD_STATUS" = "reproducible" ] && ( [ "$STATUS" = "FTBR" ] || [ "$STATUS" = "FTBFS" ] || [ "$STATUS" = "timeout" ])) || \
([ "$OLD_STATUS" = "FTBR" ] && [ "$STATUS" = "FTBFS" ] ); then
MESSAGE="${DEBIAN_URL}/${SUITE}/${ARCH}/${SRCPACKAGE} : ${OLD_STATUS}${STATUS}"
log_info "$MESSAGE"
......@@ -243,6 +243,18 @@ handle_NFU() {
exit 0 # RBUILDLOG and SAVE_ARTIFACTS and NOTIFY are used in cleanup_all called at exit
}
handle_timeout() {
echo "${SRCPACKAGE} build timed out"
cleanup_pkg_files
diff_copy_buildlogs
update_rbuildlog
calculate_build_duration
update_db_and_html "timeout"
if [ $SAVE_ARTIFACTS -eq 1 ] ; then SAVE_ARTIFACTS=0 ; fi
if [ ! -z "$NOTIFY" ] ; then NOTIFY="timeout" ; fi
exit 0
}
handle_ftbfs() {
echo "${SRCPACKAGE} failed to build from source."
cleanup_pkg_files
......@@ -779,9 +791,12 @@ remote_build() {
148) # 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
handle_E404
;;
2|3)
2)
handle_ftbfs
;;
3)
handle_timeout
;;
0) # build succcessfully completed
;;
*)
......
......@@ -145,6 +145,7 @@ set_icon() {
;;
FTBFS) ICON=weather-storm.png
;;
timeout) ICON=Current_event_clock.png ;;
depwait) ICON=weather-snow.png
;;
E404) ICON=weather-severe-alert.png
......
#!/bin/bash
# vim: set noexpandtab:
# Copyright 2014-2017 Holger Levsen <holger@layer-acht.org>
# © 2015 Mattia Rizzolo <mattia@mapreri.org>
......@@ -194,15 +195,17 @@ gather_suite_arch_stats() {
COUNT_GOOD=$(query_db "SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status='reproducible'")
COUNT_BAD=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'FTBR'")
COUNT_UGLY=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'FTBFS'")
COUNT_TIMEOUT=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'timeout'")
COUNT_SOURCELESS=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'E404'")
COUNT_NOTFORUS=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'NFU'")
COUNT_BLACKLISTED=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'blacklisted'")
COUNT_DEPWAIT=$(query_db "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND r.status = 'depwait'")
COUNT_OTHER=$(( $COUNT_SOURCELESS+$COUNT_NOTFORUS+$COUNT_BLACKLISTED+$COUNT_DEPWAIT ))
COUNT_OTHER=$(( $COUNT_SOURCELESS+$COUNT_NOTFORUS+$COUNT_BLACKLISTED+$COUNT_DEPWAIT+$COUNT_TIMEOUT ))
PERCENT_TOTAL=$(echo "scale=1 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc)
PERCENT_GOOD=$(echo "scale=1 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_UGLY=$(echo "scale=1 ; ($COUNT_UGLY*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_TIMEOUT=$(echo "scale=1 ; ($COUNT_TIMEOUT*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_DEPWAIT=$(echo "scale=1 ; ($COUNT_DEPWAIT*100/$COUNT_TOTAL)" | bc || echo 0)
PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc || echo 0)
......@@ -420,6 +423,9 @@ write_suite_arch_table() {
set_icon FTBFS
write_icon
write_page "packages failing to build</th><th class=\"center\">"
set_icon timeout
write_icon
write_page "packages timing out</th><th class=\"center\">"
set_icon depwait
write_icon
write_page "packages in depwait state</th><th class=\"center\">"
......@@ -436,7 +442,7 @@ write_suite_arch_table() {
if [ $(echo $PERCENT_TOTAL/1|bc) -lt 99 ] ; then
write_page "<span style=\"font-size:0.8em;\">($PERCENT_TOTAL% tested)</span>"
fi
write_page "</td><td>$COUNT_GOOD / $PERCENT_GOOD%</td><td>$COUNT_BAD / $PERCENT_BAD%</td><td>$COUNT_UGLY / $PERCENT_UGLY%</td><td>$COUNT_DEPWAIT / $PERCENT_DEPWAIT%</td><td>$COUNT_NOTFORUS / $PERCENT_NOTFORUS%</td><td>$COUNT_BLACKLISTED / $PERCENT_BLACKLISTED%</td></tr>"
write_page "</td><td>$COUNT_GOOD / $PERCENT_GOOD%</td><td>$COUNT_BAD / $PERCENT_BAD%</td><td>$COUNT_UGLY / $PERCENT_UGLY%</td><td>$COUNT_TIMEOUT / $PERCEN_TIMEOUT</td><td>$COUNT_DEPWAIT / $PERCENT_DEPWAIT%</td><td>$COUNT_NOTFORUS / $PERCENT_NOTFORUS%</td><td>$COUNT_BLACKLISTED / $PERCENT_BLACKLISTED%</td></tr>"
done
done
write_page "</table>"
......
......@@ -278,6 +278,14 @@ queries = {
).order_by(
desc(results.c.build_date)
),
"timeout_all":
select_sources.where(
and_(
results.c.status == Status.TIMEOUT.value.name
)
).order_by(
sources.c.name
),
"not_for_us_all":
select_sources.where(
and_(
......@@ -393,6 +401,16 @@ pages = {
}
]
},
'timeout': {
'title': 'Packages in {suite}/{arch} which build timed out',
'body': [
{
'icon_status': Status.TIMEOUT.value.icon,
'query': 'timeout_all',
'text': Template('$tot ($percent%) packages which build timed out:')
}
]
},
'blacklisted': {
'title': 'Packages in {suite}/{arch} which have been blacklisted',
'body': [
......@@ -424,6 +442,12 @@ pages = {
'query': 'not_for_us_all',
'text': Template('$tot ($percent%) packages which should not be build in $suite/$arch:')
},
{
'icon_status': Status.TIMEOUT.value.icon,
'icon_lnk': '/index_timeout.html',
'query': 'timeout_all',
'text': Template('$tot ($percent%) packages which build timed out in $suite/$arch:')
},
{
'icon_status': Status.E404.value.icon,
'icon_link': '/index_404.html',
......@@ -565,6 +589,13 @@ pages = {
'nosuite': True,
'text': Template('$tot not for us packages in $suite/$arch:')
},
{
'status': Status.TIMEOUT,
'icon_link': '/index_timeout.html',
'query': 'notes',
'nosuite': True,
'text': Template('$tot timing out packages in $suite/$arch:')
},
{
'status': Status.BLACKLISTED,
'icon_link': '/index_blacklisted.html',
......
......@@ -78,6 +78,10 @@
title="Failed To Build From Source">
<img src="/static/weather-storm.png" alt="FTBFS icon" />
</a>
<a href="/debian/{{suite}}/{{arch}}/index_timeout.html" target="_parent"
title="Build timed out">
<img src="/static/Current_event_clock.png" alt="timeout icon" />
</a>
<a href="/debian/{{suite}}/{{arch}}/index_depwait.html" target="_parent"
title="failed to install build dependencies">
<img src="/static/weather-snow.png" alt="depwait icon" />
......
## Copyright and License information
* Current_event_clock.png
+ https://commons.wikimedia.org/wiki/File:Current_event_clock.svg
+ Public Domain
* error.png
* weather-clear-night.png
* weather-clear.png
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment