Merge lp:~deeptik/lava-dashboard/kernel-ci-data-veiw-report into lp:~linaro-validation/lava-dashboard/data-views-and-reports

Proposed by Deepti B. Kalakeri on 2011-09-08
Status: Merged
Approved by: Zygmunt Krynicki on 2011-09-08
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~deeptik/lava-dashboard/kernel-ci-data-veiw-report
Merge into: lp:~linaro-validation/lava-dashboard/data-views-and-reports
Diff against target: 224 lines (+196/-0)
3 files modified
reports/kernel-ci-data.html (+54/-0)
reports/kernel-ci-data.xml (+4/-0)
views/kernel-ci-data.xml (+138/-0)
To merge this branch: bzr merge lp:~deeptik/lava-dashboard/kernel-ci-data-veiw-report
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) 2011-09-08 Approve on 2011-09-08
Review via email: mp+74563@code.launchpad.net

Description of the change

Adding the xml and html files to get a consolidated view of the kernel test run and
kernel build.

Please note that there are some repetitive feilds and needs some improvisation.
Feedback will help me to improve it further and its welcome.

Thanks and Regards,
Deepti.

To post a comment you must log in.
Zygmunt Krynicki (zyga) wrote :

This is good to land as is but needs some more subsequent work:

1) The query should be fine tuned, in particular ths e join between build results and test result should permit broken builds to be listed (without any test data) (the outer left join vs inner join)

2) The data view documentation and summary should have non-dummy values. Summary is a short one-line description that shows up in help text and various pages. Documentation is a longer free form text.

3) The report page should be extended to explain what is being observed, how to interpret the data, which bundle streams are being analyzed and how the data is being produced. This would make it a very worthwhile target for being displayed or linked to on the validation front page.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'reports/kernel-ci-data.html'
--- reports/kernel-ci-data.html 1970-01-01 00:00:00 +0000
+++ reports/kernel-ci-data.html 2011-09-08 09:22:23 +0000
@@ -0,0 +1,54 @@
1<div id="placeholder"></div>
2<script type="text/javascript">
3 $().dashboard("init", "{{ API_URL }}", function (server) {
4 var data_view_name = "CI Kernel Data";
5 var data_view_arguments = {
6 boot_pathname: "/anonymous/ci-linux-linaro-3_0/",
7 build_pathname: "/anonymous/ci-linux-linaro-3_0-build/"
8 };
9 server.query_data_view(function (response) {
10 if (response.result) {
11 var dataset = response.result;
12 var html = "<table class='demo_jui display' id='kernel_ci_results'>";
13 html += "<thead><tr>";
14 $.each(dataset.columns, function (index, column) {
15 html += "<th>" + column.name + "</th>";
16 });
17 html += "</tr></thead><tbody>";
18 $.each(dataset.rows, function (index, row) {
19 html += "<tr>";
20 $.each(row, function (index, cell) {
21 var column = dataset.columns[index];
22 var cell_link = null;
23 if (column.name.indexOf("UUID") > 0) {
24 /* This is a bit hacky but will work for now */
25 cell_link = "{{ API_URL }}../permalink/test-run/" + cell + "/";
26 cell_html = "go to test run"
27 } else {
28 cell_html = cell;
29 }
30 html += "<td>";
31 if (cell_link) {
32 html += "<a href='" + cell_link + "'>"
33 html += cell_html;
34 html += "</a>";
35 } else {
36 html += cell_html;
37 }
38 html += "</td>";
39 });
40 html += "</tr>";
41 });
42 html += "</tbody></table>";
43 $("#placeholder").html(html);
44 $("#kernel_ci_results").dataTable({
45 "bJQueryUI": true,
46 "sPaginationType": "full_numbers",
47 });
48 } else {
49 $this.html("Error code:" + response.error.faultCode + ", message: " + response.error.faultString);
50 }
51 }, data_view_name, data_view_arguments);
52 });
53</script>
54
055
=== added file 'reports/kernel-ci-data.xml'
--- reports/kernel-ci-data.xml 1970-01-01 00:00:00 +0000
+++ reports/kernel-ci-data.xml 2011-09-08 09:22:23 +0000
@@ -0,0 +1,4 @@
1<data-report name="kernel-ci-data">
2 <title>CI Kernel Data</title>
3 <path>kernel-ci-data.html</path>
4</data-report>
05
=== modified file 'views/android-runs.xml' (properties changed: -x to +x)
=== modified file 'views/board-activity.xml' (properties changed: -x to +x)
=== modified file 'views/boot-status.xml' (properties changed: -x to +x)
=== modified file 'views/hostnames.xml' (properties changed: -x to +x)
=== modified file 'views/hwpack-type.xml' (properties changed: -x to +x)
=== added file 'views/kernel-ci-data.xml'
--- views/kernel-ci-data.xml 1970-01-01 00:00:00 +0000
+++ views/kernel-ci-data.xml 2011-09-08 09:22:23 +0000
@@ -0,0 +1,138 @@
1<data-view name="CI Kernel Data">
2 <sql>
3 SELECT
4 BuildNamedAttribute_BuildID.value AS "Jenkins build ID (build)",
5 BootNamedAttribute_BuildID.value AS "Jenkins build ID (boot)",
6 BuildSoftwareSource.branch_url AS "Git URL (build)",
7 BuildSoftwareSource.branch_revision AS "Git Commit ID (build)",
8 BuildNamedAttribute_KernelConfig.value AS "Kernel Config (build)",
9 BootNamedAttribute_GitURL.value AS "Git URL (boot)",
10 BootNamedAttribute_GitCommitID.value AS "Git Commit ID (boot)",
11 (CASE WHEN BootTestResult.result=0 THEN 'pass' ELSE 'fail' END) AS "Boot result",
12 (CASE WHEN BuildTestResult.result=0 THEN 'pass' ELSE 'fail' END) AS "Build result",
13 BootNamedAttribute_TargetHostname.value AS "Boot target Hostname",
14 BootTestRun.analyzer_assigned_uuid AS "Boot test run UUID",
15 BuildTestRun.analyzer_assigned_uuid AS "Build test run UUID"
16 FROM
17 dashboard_app_testresult AS BuildTestResult
18 INNER JOIN dashboard_app_testrun AS BuildTestRun ON BuildTestResult.test_run_id = BuildTestRun.id
19 INNER JOIN dashboard_app_testrun_sources AS BuildSoftwareSources ON BuildSoftwareSources.testrun_id = BuildTestRun.id
20 INNER JOIN dashboard_app_softwaresource AS BuildSoftwareSource ON BuildSoftwareSources.softwaresource_id = BuildSoftwareSource.id
21 INNER JOIN dashboard_app_namedattribute AS BuildNamedAttribute_BuildID ON (
22 BuildNamedAttribute_BuildID.object_id = BuildTestRun.id
23 AND BuildNamedAttribute_BuildID.name = 'build.id'
24 AND BuildNamedAttribute_BuildID.content_type_id = (
25 SELECT
26 django_content_type.id
27 FROM
28 django_content_type
29 WHERE
30 app_label = 'dashboard_app'
31 AND model='testrun'
32 )
33 )
34 INNER JOIN dashboard_app_namedattribute AS BuildNamedAttribute_KernelConfig ON (
35 BuildNamedAttribute_KernelConfig.object_id = BuildTestRun.id
36 AND BuildNamedAttribute_KernelConfig.name = 'kernel.config'
37 AND BuildNamedAttribute_KernelConfig.content_type_id = (
38 SELECT
39 django_content_type.id
40 FROM
41 django_content_type
42 WHERE
43 app_label = 'dashboard_app'
44 AND model='testrun'
45 )
46 )
47 INNER JOIN dashboard_app_bundle AS BuildBundle ON BuildTestRun.bundle_id = BuildBundle.id
48 INNER JOIN dashboard_app_bundlestream AS BuildBundleStream ON BuildBundle.bundle_stream_id = BuildBundleStream.id
49 INNER JOIN dashboard_app_testcase AS BuildTestCase ON BuildTestResult.test_case_id = BuildTestCase.id
50 INNER JOIN dashboard_app_test AS BuildTest ON BuildTestRun.test_id = BuildTest.id
51,
52 dashboard_app_testresult AS BootTestResult
53 INNER JOIN dashboard_app_testrun AS BootTestRun ON BootTestResult.test_run_id = BootTestRun.id
54 INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_BuildID ON (
55 BootNamedAttribute_BuildID.object_id = BootTestRun.id
56 AND BootNamedAttribute_BuildID.name = 'build.id'
57 AND BootNamedAttribute_BuildID.content_type_id = (
58 SELECT
59 django_content_type.id
60 FROM
61 django_content_type
62 WHERE
63 app_label = 'dashboard_app'
64 AND model='testrun'
65 )
66 )
67 INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_TargetHostname ON (
68 BootNamedAttribute_TargetHostname.object_id = BootTestRun.id
69 AND BootNamedAttribute_TargetHostname.name = 'target.hostname'
70 AND BootNamedAttribute_TargetHostname.content_type_id = (
71 SELECT
72 django_content_type.id
73 FROM
74 django_content_type
75 WHERE
76 app_label = 'dashboard_app'
77 AND model='testrun'
78 )
79 AND BootNamedAttribute_TargetHostname.name = 'target.hostname'
80 )
81 INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_GitCommitID ON (
82 BootNamedAttribute_GitCommitID.object_id = BootTestRun.id
83 AND BootNamedAttribute_GitCommitID.name = 'git_commitid'
84 AND BootNamedAttribute_GitCommitID.content_type_id = (
85 SELECT
86 django_content_type.id
87 FROM
88 django_content_type
89 WHERE
90 app_label = 'dashboard_app'
91 AND model='testrun'
92 )
93 )
94 INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_GitURL ON (
95 BootNamedAttribute_GitURL.object_id = BootTestRun.id
96 AND BootNamedAttribute_GitURL.name = 'git_url'
97 AND BootNamedAttribute_GitURL.content_type_id = (
98 SELECT
99 django_content_type.id
100 FROM
101 django_content_type
102 WHERE
103 app_label = 'dashboard_app'
104 AND model='testrun'
105 )
106 )
107 INNER JOIN dashboard_app_bundle AS BootBundle ON BootTestRun.bundle_id = BootBundle.id
108 INNER JOIN dashboard_app_bundlestream AS BootBundleStream ON BootBundle.bundle_stream_id = BootBundleStream.id
109 INNER JOIN dashboard_app_testcase AS BootTestCase ON BootTestResult.test_case_id = BootTestCase.id
110 INNER JOIN dashboard_app_test AS BootTest ON BootTestRun.test_id = BootTest.id
111 WHERE
112 BootBundleStream.pathname = <value name="boot_pathname"/>
113 AND BuildBundleStream.pathname = <value name="build_pathname"/>
114 AND BootTest.test_id = <value name="boot_test"/>
115 AND BuildTest.test_id = <value name="build_test"/>
116 AND BootTestCase.test_case_id = <value name="boot_test_case"/>
117 AND BuildTestCase.test_case_id = <value name="build_test_case"/>
118 AND BuildSoftwareSource.project_name = 'Linux Linaro'
119 AND BuildNamedAttribute_BuildID.value = BootNamedAttribute_BuildID.value
120 ORDER BY
121 BootTestRun.analyzer_assigned_uuid
122 </sql>
123 <arguments>
124 <argument name="boot_pathname" help="Bundle stream with boot results" type="string"/>
125 <argument name="boot_test" help="Identifier of the test to select" type="string" default="lava"/>
126 <argument name="boot_test_case" help="Identifier of the test case to select" type="string" default="boot_image"/>
127 <argument name="build_pathname" help="Bundle stream with boot results" type="string"/>
128 <argument name="build_test" help="Identifier of the test to select" type="string" default="kernel build"/>
129 <argument name="build_test_case" help="Identifier of the test case to select" type="string" default="linux-linaro-3_0"/>
130 </arguments>
131 <summary>
132 TODO: document this
133 </summary>
134 <documentation>
135 TODO: document this
136 </documentation>
137</data-view>
138
0139
=== modified file 'views/latest-job-complete-for-hwpack-and-rootfs.xml' (properties changed: -x to +x)
=== modified file 'views/latest-test-runs.xml' (properties changed: -x to +x)
=== modified file 'views/measurements.xml' (properties changed: -x to +x)
=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-1.xml' (properties changed: -x to +x)
=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-2.xml' (properties changed: -x to +x)
=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-3.xml' (properties changed: -x to +x)
=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-4.xml' (properties changed: -x to +x)
=== modified file 'views/rootfs-type.xml' (properties changed: -x to +x)

Subscribers

People subscribed via source and target branches