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
1=== added file 'reports/kernel-ci-data.html'
2--- reports/kernel-ci-data.html 1970-01-01 00:00:00 +0000
3+++ reports/kernel-ci-data.html 2011-09-08 09:22:23 +0000
4@@ -0,0 +1,54 @@
5+<div id="placeholder"></div>
6+<script type="text/javascript">
7+ $().dashboard("init", "{{ API_URL }}", function (server) {
8+ var data_view_name = "CI Kernel Data";
9+ var data_view_arguments = {
10+ boot_pathname: "/anonymous/ci-linux-linaro-3_0/",
11+ build_pathname: "/anonymous/ci-linux-linaro-3_0-build/"
12+ };
13+ server.query_data_view(function (response) {
14+ if (response.result) {
15+ var dataset = response.result;
16+ var html = "<table class='demo_jui display' id='kernel_ci_results'>";
17+ html += "<thead><tr>";
18+ $.each(dataset.columns, function (index, column) {
19+ html += "<th>" + column.name + "</th>";
20+ });
21+ html += "</tr></thead><tbody>";
22+ $.each(dataset.rows, function (index, row) {
23+ html += "<tr>";
24+ $.each(row, function (index, cell) {
25+ var column = dataset.columns[index];
26+ var cell_link = null;
27+ if (column.name.indexOf("UUID") > 0) {
28+ /* This is a bit hacky but will work for now */
29+ cell_link = "{{ API_URL }}../permalink/test-run/" + cell + "/";
30+ cell_html = "go to test run"
31+ } else {
32+ cell_html = cell;
33+ }
34+ html += "<td>";
35+ if (cell_link) {
36+ html += "<a href='" + cell_link + "'>"
37+ html += cell_html;
38+ html += "</a>";
39+ } else {
40+ html += cell_html;
41+ }
42+ html += "</td>";
43+ });
44+ html += "</tr>";
45+ });
46+ html += "</tbody></table>";
47+ $("#placeholder").html(html);
48+ $("#kernel_ci_results").dataTable({
49+ "bJQueryUI": true,
50+ "sPaginationType": "full_numbers",
51+ });
52+ } else {
53+ $this.html("Error code:" + response.error.faultCode + ", message: " + response.error.faultString);
54+ }
55+ }, data_view_name, data_view_arguments);
56+ });
57+</script>
58+
59
60=== added file 'reports/kernel-ci-data.xml'
61--- reports/kernel-ci-data.xml 1970-01-01 00:00:00 +0000
62+++ reports/kernel-ci-data.xml 2011-09-08 09:22:23 +0000
63@@ -0,0 +1,4 @@
64+<data-report name="kernel-ci-data">
65+ <title>CI Kernel Data</title>
66+ <path>kernel-ci-data.html</path>
67+</data-report>
68
69=== modified file 'views/android-runs.xml' (properties changed: -x to +x)
70=== modified file 'views/board-activity.xml' (properties changed: -x to +x)
71=== modified file 'views/boot-status.xml' (properties changed: -x to +x)
72=== modified file 'views/hostnames.xml' (properties changed: -x to +x)
73=== modified file 'views/hwpack-type.xml' (properties changed: -x to +x)
74=== added file 'views/kernel-ci-data.xml'
75--- views/kernel-ci-data.xml 1970-01-01 00:00:00 +0000
76+++ views/kernel-ci-data.xml 2011-09-08 09:22:23 +0000
77@@ -0,0 +1,138 @@
78+<data-view name="CI Kernel Data">
79+ <sql>
80+ SELECT
81+ BuildNamedAttribute_BuildID.value AS "Jenkins build ID (build)",
82+ BootNamedAttribute_BuildID.value AS "Jenkins build ID (boot)",
83+ BuildSoftwareSource.branch_url AS "Git URL (build)",
84+ BuildSoftwareSource.branch_revision AS "Git Commit ID (build)",
85+ BuildNamedAttribute_KernelConfig.value AS "Kernel Config (build)",
86+ BootNamedAttribute_GitURL.value AS "Git URL (boot)",
87+ BootNamedAttribute_GitCommitID.value AS "Git Commit ID (boot)",
88+ (CASE WHEN BootTestResult.result=0 THEN 'pass' ELSE 'fail' END) AS "Boot result",
89+ (CASE WHEN BuildTestResult.result=0 THEN 'pass' ELSE 'fail' END) AS "Build result",
90+ BootNamedAttribute_TargetHostname.value AS "Boot target Hostname",
91+ BootTestRun.analyzer_assigned_uuid AS "Boot test run UUID",
92+ BuildTestRun.analyzer_assigned_uuid AS "Build test run UUID"
93+ FROM
94+ dashboard_app_testresult AS BuildTestResult
95+ INNER JOIN dashboard_app_testrun AS BuildTestRun ON BuildTestResult.test_run_id = BuildTestRun.id
96+ INNER JOIN dashboard_app_testrun_sources AS BuildSoftwareSources ON BuildSoftwareSources.testrun_id = BuildTestRun.id
97+ INNER JOIN dashboard_app_softwaresource AS BuildSoftwareSource ON BuildSoftwareSources.softwaresource_id = BuildSoftwareSource.id
98+ INNER JOIN dashboard_app_namedattribute AS BuildNamedAttribute_BuildID ON (
99+ BuildNamedAttribute_BuildID.object_id = BuildTestRun.id
100+ AND BuildNamedAttribute_BuildID.name = 'build.id'
101+ AND BuildNamedAttribute_BuildID.content_type_id = (
102+ SELECT
103+ django_content_type.id
104+ FROM
105+ django_content_type
106+ WHERE
107+ app_label = 'dashboard_app'
108+ AND model='testrun'
109+ )
110+ )
111+ INNER JOIN dashboard_app_namedattribute AS BuildNamedAttribute_KernelConfig ON (
112+ BuildNamedAttribute_KernelConfig.object_id = BuildTestRun.id
113+ AND BuildNamedAttribute_KernelConfig.name = 'kernel.config'
114+ AND BuildNamedAttribute_KernelConfig.content_type_id = (
115+ SELECT
116+ django_content_type.id
117+ FROM
118+ django_content_type
119+ WHERE
120+ app_label = 'dashboard_app'
121+ AND model='testrun'
122+ )
123+ )
124+ INNER JOIN dashboard_app_bundle AS BuildBundle ON BuildTestRun.bundle_id = BuildBundle.id
125+ INNER JOIN dashboard_app_bundlestream AS BuildBundleStream ON BuildBundle.bundle_stream_id = BuildBundleStream.id
126+ INNER JOIN dashboard_app_testcase AS BuildTestCase ON BuildTestResult.test_case_id = BuildTestCase.id
127+ INNER JOIN dashboard_app_test AS BuildTest ON BuildTestRun.test_id = BuildTest.id
128+,
129+ dashboard_app_testresult AS BootTestResult
130+ INNER JOIN dashboard_app_testrun AS BootTestRun ON BootTestResult.test_run_id = BootTestRun.id
131+ INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_BuildID ON (
132+ BootNamedAttribute_BuildID.object_id = BootTestRun.id
133+ AND BootNamedAttribute_BuildID.name = 'build.id'
134+ AND BootNamedAttribute_BuildID.content_type_id = (
135+ SELECT
136+ django_content_type.id
137+ FROM
138+ django_content_type
139+ WHERE
140+ app_label = 'dashboard_app'
141+ AND model='testrun'
142+ )
143+ )
144+ INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_TargetHostname ON (
145+ BootNamedAttribute_TargetHostname.object_id = BootTestRun.id
146+ AND BootNamedAttribute_TargetHostname.name = 'target.hostname'
147+ AND BootNamedAttribute_TargetHostname.content_type_id = (
148+ SELECT
149+ django_content_type.id
150+ FROM
151+ django_content_type
152+ WHERE
153+ app_label = 'dashboard_app'
154+ AND model='testrun'
155+ )
156+ AND BootNamedAttribute_TargetHostname.name = 'target.hostname'
157+ )
158+ INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_GitCommitID ON (
159+ BootNamedAttribute_GitCommitID.object_id = BootTestRun.id
160+ AND BootNamedAttribute_GitCommitID.name = 'git_commitid'
161+ AND BootNamedAttribute_GitCommitID.content_type_id = (
162+ SELECT
163+ django_content_type.id
164+ FROM
165+ django_content_type
166+ WHERE
167+ app_label = 'dashboard_app'
168+ AND model='testrun'
169+ )
170+ )
171+ INNER JOIN dashboard_app_namedattribute AS BootNamedAttribute_GitURL ON (
172+ BootNamedAttribute_GitURL.object_id = BootTestRun.id
173+ AND BootNamedAttribute_GitURL.name = 'git_url'
174+ AND BootNamedAttribute_GitURL.content_type_id = (
175+ SELECT
176+ django_content_type.id
177+ FROM
178+ django_content_type
179+ WHERE
180+ app_label = 'dashboard_app'
181+ AND model='testrun'
182+ )
183+ )
184+ INNER JOIN dashboard_app_bundle AS BootBundle ON BootTestRun.bundle_id = BootBundle.id
185+ INNER JOIN dashboard_app_bundlestream AS BootBundleStream ON BootBundle.bundle_stream_id = BootBundleStream.id
186+ INNER JOIN dashboard_app_testcase AS BootTestCase ON BootTestResult.test_case_id = BootTestCase.id
187+ INNER JOIN dashboard_app_test AS BootTest ON BootTestRun.test_id = BootTest.id
188+ WHERE
189+ BootBundleStream.pathname = <value name="boot_pathname"/>
190+ AND BuildBundleStream.pathname = <value name="build_pathname"/>
191+ AND BootTest.test_id = <value name="boot_test"/>
192+ AND BuildTest.test_id = <value name="build_test"/>
193+ AND BootTestCase.test_case_id = <value name="boot_test_case"/>
194+ AND BuildTestCase.test_case_id = <value name="build_test_case"/>
195+ AND BuildSoftwareSource.project_name = 'Linux Linaro'
196+ AND BuildNamedAttribute_BuildID.value = BootNamedAttribute_BuildID.value
197+ ORDER BY
198+ BootTestRun.analyzer_assigned_uuid
199+ </sql>
200+ <arguments>
201+ <argument name="boot_pathname" help="Bundle stream with boot results" type="string"/>
202+ <argument name="boot_test" help="Identifier of the test to select" type="string" default="lava"/>
203+ <argument name="boot_test_case" help="Identifier of the test case to select" type="string" default="boot_image"/>
204+ <argument name="build_pathname" help="Bundle stream with boot results" type="string"/>
205+ <argument name="build_test" help="Identifier of the test to select" type="string" default="kernel build"/>
206+ <argument name="build_test_case" help="Identifier of the test case to select" type="string" default="linux-linaro-3_0"/>
207+ </arguments>
208+ <summary>
209+ TODO: document this
210+ </summary>
211+ <documentation>
212+ TODO: document this
213+ </documentation>
214+</data-view>
215+
216
217=== modified file 'views/latest-job-complete-for-hwpack-and-rootfs.xml' (properties changed: -x to +x)
218=== modified file 'views/latest-test-runs.xml' (properties changed: -x to +x)
219=== modified file 'views/measurements.xml' (properties changed: -x to +x)
220=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-1.xml' (properties changed: -x to +x)
221=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-2.xml' (properties changed: -x to +x)
222=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-3.xml' (properties changed: -x to +x)
223=== modified file 'views/recent-test-runs-for-board-and-hwpack-and-rootfs-4.xml' (properties changed: -x to +x)
224=== modified file 'views/rootfs-type.xml' (properties changed: -x to +x)

Subscribers

People subscribed via source and target branches