Merge lp:~cjohnston/qa-dashboard/smokeng-kpi-sort-fix into lp:qa-dashboard

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 603
Merged at revision: 603
Proposed branch: lp:~cjohnston/qa-dashboard/smokeng-kpi-sort-fix
Merge into: lp:qa-dashboard
Diff against target: 78 lines (+12/-4)
2 files modified
smokeng/dashboard.py (+11/-3)
smokeng/templates/smokeng/kpi_variant_pass_rate.html (+1/-1)
To merge this branch: bzr merge lp:~cjohnston/qa-dashboard/smokeng-kpi-sort-fix
Reviewer Review Type Date Requested Status
Joe Talbott Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+184786@code.launchpad.net

Commit message

Fixes sorting issues with touch_ro kpi version numbers

To post a comment you must log in.
Revision history for this message
Joe Talbott (joetalbott) wrote :

Review: Approve

Awesome!

Revision history for this message
Chris Johnston (cjohnston) wrote :

Voting does not meet specified criteria. Required: Approve >= 1. Got: 2 Pending.

Revision history for this message
Joe Talbott (joetalbott) wrote :

On Tue, Sep 10, 2013 at 02:25:23PM -0000, Chris Johnston wrote:
> The proposal to merge lp:~cjohnston/qa-dashboard/smokeng-kpi-sort-fix into lp:qa-dashboard has been updated.
>
> Status: Approved => Needs review
>
> For more details, see:
> https://code.launchpad.net/~cjohnston/qa-dashboard/smokeng-kpi-sort-fix/+merge/184786
> --
> https://code.launchpad.net/~cjohnston/qa-dashboard/smokeng-kpi-sort-fix/+merge/184786
> Your team QA Dashboard Developers is requested to review the proposed merge of lp:~cjohnston/qa-dashboard/smokeng-kpi-sort-fix into lp:qa-dashboard.

Review: Approve

Revision history for this message
Joe Talbott (joetalbott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'smokeng/dashboard.py'
2--- smokeng/dashboard.py 2013-08-22 16:13:28 +0000
3+++ smokeng/dashboard.py 2013-09-10 14:16:27 +0000
4@@ -54,7 +54,7 @@
5 def _get_result_bug_count(self, build_number, variant=None):
6 qs = SmokeResultBug.objects.filter(
7 publish=True,
8- result__image__build_number=build_number,
9+ result__image__rootfs_id=build_number,
10 result__image__variant=variant,
11 ).values(
12 'result__image__release',
13@@ -87,9 +87,10 @@
14 'image__variant',
15 'image__release',
16 'image__build_number',
17+ 'image__rootfs_id',
18 ).annotate(
19 avg_pass_rate=models.Avg('pass_rate'),
20- ).order_by('-image__build_number')
21+ ).order_by('-image__rootfs_id')
22
23 return qs
24
25@@ -108,11 +109,12 @@
26 entry['image__arch'],
27 {},
28 ).setdefault(
29- entry['image__build_number'],
30+ entry['image__rootfs_id'],
31 {},
32 )
33
34 build.setdefault('pass_rates', []).append(entry['avg_pass_rate'])
35+ build.setdefault('build_number', entry['image__build_number'])
36
37 return entry_tree
38
39@@ -154,6 +156,10 @@
40 'pass_rate',
41 arch_build['pass_rate'],
42 )
43+ res_arch.setdefault(
44+ 'full_build_number',
45+ arch_build['build_number'],
46+ )
47
48 if build > res_arch['latest_build_number']:
49 res_arch['latest_build_number'] = build
50@@ -397,6 +403,7 @@
51 has_expected_build = False
52 for arch in sorted(arches.keys()):
53 data = arches[arch]
54+ full_build_number = data['full_build_number']
55 build_no = data['latest_build_number']
56 if build_no == expected_build:
57 arch_passrates.append(data['pass_rate'])
58@@ -419,6 +426,7 @@
59 variant=variant,
60 results=dict(
61 build_no=build_no,
62+ full_build_number=full_build_number,
63 pass_rate=pass_rate,
64 found_arches=found_arches,
65 bug_count=bug_count,
66
67=== modified file 'smokeng/templates/smokeng/kpi_variant_pass_rate.html'
68--- smokeng/templates/smokeng/kpi_variant_pass_rate.html 2013-09-04 14:49:38 +0000
69+++ smokeng/templates/smokeng/kpi_variant_pass_rate.html 2013-09-10 14:16:27 +0000
70@@ -12,7 +12,7 @@
71 <tr>
72 <td><a href='{% url "smokeng_overview" release.release kpi.variant %}'>{{ kpi.variant }}</a></td>
73 <td>
74- {{ kpi.results.build_no }}
75+ {{ kpi.results.full_build_number }}
76 </td>
77 <td class="num pad-seven {{ kpi.results.pass_rate|pass_rate_color }}">
78 <a class="css-tooltip no-border" href="#">

Subscribers

People subscribed via source and target branches