aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-04-11 14:28:00 +0200
committerTibor Frank <tifrank@cisco.com>2019-04-15 08:42:33 +0000
commit5e162c7bccb29b4e8414b2fa564cb40336997ec6 (patch)
tree5cc4591eee9788efa023b9658cd93e5c44dade84 /resources/tools
parent7f8cd27748dcf7311ba0ed56b077bcef9fc351f9 (diff)
Alerts: Change the error message
Change-Id: I0fcd6ffaf24de0f6ce95eaba3d591eddf3f16b33 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit 18422fd2221c2474f07450280a7af1a06b1c2207)
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/presentation/generator_alerts.py22
-rw-r--r--resources/tools/presentation/specification_CPTA.yaml18
-rw-r--r--resources/tools/presentation_new/specification_CPTA.yaml18
3 files changed, 34 insertions, 24 deletions
diff --git a/resources/tools/presentation/generator_alerts.py b/resources/tools/presentation/generator_alerts.py
index b106d9589a..1b40dbbbf9 100644
--- a/resources/tools/presentation/generator_alerts.py
+++ b/resources/tools/presentation/generator_alerts.py
@@ -19,7 +19,7 @@ from email.mime.multipart import MIMEMultipart
from os.path import isdir
from collections import OrderedDict
-from utils import execute_command
+from utils import get_last_completed_build_number
from errors import PresentationError
@@ -71,8 +71,10 @@ class Alerting(object):
# Implemented alerts:
self._ALERTS = ("failed-tests", )
+ self._spec = spec
+
try:
- self._spec = spec.alerting
+ self._spec_alert = spec.alerting
except KeyError as err:
raise AlertingError("Alerting is not configured, skipped.",
repr(err),
@@ -81,7 +83,7 @@ class Alerting(object):
self._path_failed_tests = spec.environment["paths"]["DIR[STATIC,VPP]"]
# Verify and validate input specification:
- self.configs = self._spec.get("configurations", None)
+ self.configs = self._spec_alert.get("configurations", None)
if not self.configs:
raise AlertingError("No alert configuration is specified.")
for config_type, config_data in self.configs.iteritems():
@@ -104,7 +106,7 @@ class Alerting(object):
raise AlertingError("Alert of type '{0}' is not implemented.".
format(config_type))
- self.alerts = self._spec.get("alerts", None)
+ self.alerts = self._spec_alert.get("alerts", None)
if not self.alerts:
raise AlertingError("No alert is specified.")
for alert, alert_data in self.alerts.iteritems():
@@ -303,8 +305,16 @@ class Alerting(object):
build, version, nr, failed_tests = \
self._get_compressed_failed_tests(alert, test_set)
if build is None:
- text += "\n\nNo data for the test set '{set}'.\n".\
- format(set=test_set)
+ ret_code, build_nr, _ = get_last_completed_build_number(
+ self._spec.environment["urls"]["URL[JENKINS,CSIT]"],
+ alert["urls"][idx].split('/')[-1])
+ if ret_code != 0:
+ build_nr = ''
+ text += "\n\nNo input data available for '{set}'. See CSIT " \
+ "build {link}/{build} for more information.\n".\
+ format(set='-'.join(test_set.split('-')[-2:]),
+ link=alert["urls"][idx],
+ build=build_nr)
continue
text += ("\n\n{topo}-{arch}, "
"{nr} tests failed, "
diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml
index cc6bb0145c..ada861d790 100644
--- a/resources/tools/presentation/specification_CPTA.yaml
+++ b/resources/tools/presentation/specification_CPTA.yaml
@@ -169,7 +169,7 @@
# 3n-hsw
plot-performance-trending-all-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 501
+ start: 510
end: "lastCompletedBuild"
skip:
- 593
@@ -185,7 +185,7 @@
plot-performance-trending-vpp-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 501
+ start: 510
end: "lastCompletedBuild"
skip:
- 593
@@ -204,7 +204,7 @@
# 3n-skx
plot-performance-trending-all-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 356
@@ -237,7 +237,7 @@
plot-performance-trending-vpp-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 356
@@ -273,7 +273,7 @@
# 2n-skx
plot-performance-trending-all-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 347
@@ -298,7 +298,7 @@
plot-performance-trending-vpp-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 347
@@ -421,7 +421,7 @@
# 3n-hsw
csit-vpp-perf-mrr-daily-master:
- start: 501
+ start: 510
end: "lastCompletedBuild"
skip:
- 593
@@ -437,7 +437,7 @@
# 3n-skx
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 356
@@ -470,7 +470,7 @@
# 2n-skx
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
skip:
- 347
diff --git a/resources/tools/presentation_new/specification_CPTA.yaml b/resources/tools/presentation_new/specification_CPTA.yaml
index b2e47fd4c4..4412a7f786 100644
--- a/resources/tools/presentation_new/specification_CPTA.yaml
+++ b/resources/tools/presentation_new/specification_CPTA.yaml
@@ -84,7 +84,7 @@
# 3n-hsw
plot-performance-trending-all-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 500
+ start: 510
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master:
start: 54
@@ -92,7 +92,7 @@
plot-performance-trending-vpp-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 500
+ start: 510
end: "lastCompletedBuild"
plot-performance-trending-dpdk-3n-hsw:
@@ -103,7 +103,7 @@
# 3n-skx
plot-performance-trending-all-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master-3n-skx:
start: 19
@@ -111,7 +111,7 @@
plot-performance-trending-vpp-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
plot-performance-trending-dpdk-3n-skx:
@@ -122,7 +122,7 @@
# 2n-skx
plot-performance-trending-all-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master-2n-skx:
start: 19
@@ -130,7 +130,7 @@
plot-performance-trending-vpp-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
plot-performance-trending-dpdk-2n-skx:
@@ -228,7 +228,7 @@
# 3n-hsw
csit-vpp-perf-mrr-daily-master:
- start: 500
+ start: 510
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master:
start: 54
@@ -236,7 +236,7 @@
# 3n-skx
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master-3n-skx:
start: 19
@@ -244,7 +244,7 @@
# 2n-skx
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 250
+ start: 260
end: "lastCompletedBuild"
csit-dpdk-perf-mrr-weekly-master-2n-skx:
start: 19