Merge lp:~arges/arsenal/arsenal into lp:~bryce/arsenal/2.x

Proposed by Chris J Arges
Status: Needs review
Proposed branch: lp:~arges/arsenal/arsenal
Merge into: lp:~bryce/arsenal/2.x
Diff against target: 326 lines (+268/-0) (has conflicts)
5 files modified
reports/point-release/Makefile (+23/-0)
reports/point-release/milestone-12.04.1.json (+31/-0)
reports/point-release/milestone.mako (+175/-0)
scripts/collect-bug-data (+17/-0)
scripts/collect-project-bug-data (+22/-0)
Text conflict in scripts/collect-bug-data
To merge this branch: bzr merge lp:~arges/arsenal/arsenal
Reviewer Review Type Date Requested Status
Brian Murray (community) Needs Fixing
Bryce Harrington Pending
Review via email: mp+117672@code.launchpad.net

Description of the change

Minor changes to work on report server.

To post a comment you must log in.
lp:~arges/arsenal/arsenal updated
1076. By Chris J Arges

reports/point-release: remove html and tasks from json.

Revision history for this message
Brian Murray (brian-murray) wrote :

Disregarding the conflicts in collect-bug-data there are a couple of things that could use cleaning up.

The dir(bug) in collect-bug-data seems to be leftover from some debugging. There is also an import of seg from seglib in collect-project-bug-data and seglib isn't part of arsenal as far as I can tell. The 'print pbug_id' looks like it also may be leftover from debugging.

The current convention is also to have mako templates in the web/templates directory so moving the template file there would be great too.

Otherwise, it looks good, thanks!

review: Needs Fixing

Unmerged revisions

1076. By Chris J Arges

reports/point-release: remove html and tasks from json.

1075. By Chris J Arges

reports/point-release: Update Makefile to work on cranberry.

1074. By Chris J Arges

Updates per suggestions from 12.04.1 team.

1073. By Chris J Arges

Fixes to point-release web template.

1072. By Chris J Arges

Add SEG specific info to CPBD.

1071. By Chris J Arges

Add point-release reports.

1070. By Chris J Arges

Add linked_branches and latest_patch_uploaded to collect_bug_data.

1069. By Chris J Arges

Add functionality to search by milestone.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'reports/point-release'
=== added file 'reports/point-release/Makefile'
--- reports/point-release/Makefile 1970-01-01 00:00:00 +0000
+++ reports/point-release/Makefile 2012-08-01 15:07:41 +0000
@@ -0,0 +1,23 @@
1REPORT_HOST = cranberry.canonical.com
2REPORT_ROOT = /srv/qa.ubuntu.com/reports/rls-mgr/
3RLS_TRACKING = milestone-12.04.1
4RLS_TRACKING_REPORT = $(RLS_TRACKING).html
5ARSENAL_SCRIPTS = ../../scripts
6RESOURCES=../cached-lp-resources.json
7
8all: reports publish
9reports: $(RLS_TRACKING_REPORT)
10
11$(RESOURCES):
12 $(ARSENAL_SCRIPTS)/cache-lp-resources ../cached-lp-resources.json
13
14.PHONY : $(RLS_TRACKING_REPORT)
15$(RLS_TRACKING_REPORT) : $(RESOURCES)
16 $(ARSENAL_SCRIPTS)/collect-bug-data $(RLS_TRACKING).json
17 $(ARSENAL_SCRIPTS)/reporter --title="12.04.1 Point Release Bugs" --template=milestone.mako $(RLS_TRACKING).json > $@
18
19upload:
20 -scp *.json *.html $(RLS_TRACKING_REPORT) $(REPORT_HOST):$(REPORT_ROOT)
21
22publish:
23 -cp *.json *.html $(RLS_MGR_O_MILESTONE_REPORT) $(REPORT_ROOT)
024
=== added file 'reports/point-release/milestone-12.04.1.json'
--- reports/point-release/milestone-12.04.1.json 1970-01-01 00:00:00 +0000
+++ reports/point-release/milestone-12.04.1.json 2012-08-01 15:07:41 +0000
@@ -0,0 +1,31 @@
1{
2 "launchpad_config": {
3 "launchpad_client_name": "milestone-bugs-db",
4 "read_only": true
5 },
6 "search_criteria": [
7 {
8 "distribution": "ubuntu",
9 "milestone": "https://api.launchpad.net/devel/ubuntu/+milestone/ubuntu-12.04.1",
10 "series": [
11 "precise",
12 "quantal",
13 "NONE"
14 ],
15 "status": [
16 "New",
17 "Incomplete",
18 "Incomplete (with response)",
19 "Incomplete (without response)",
20 "Opinion",
21 "Invalid",
22 "Confirmed",
23 "Triaged",
24 "In Progress",
25 "Fix Committed",
26 "Fix Released"
27 ]
28 }
29 ],
30 "tasks": {}
31}
032
=== added file 'reports/point-release/milestone.mako'
--- reports/point-release/milestone.mako 1970-01-01 00:00:00 +0000
+++ reports/point-release/milestone.mako 2012-08-01 15:07:41 +0000
@@ -0,0 +1,175 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <title>${report_title}</title>
6 <link rel="stylesheet" href="./css/light-style.css" type="text/css" media="print, projection, screen" />
7 <link href='http://fonts.googleapis.com/css?family=Cantarell&subset=latin' rel='stylesheet' type='text/css'>
8 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
9 <script type="text/javascript" src="http://datatables.net/download/build/jquery.dataTables.min.js"></script>
10
11 <script type="text/javascript">
12
13 function fnShowHide(iCol)
14 {
15 var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
16 oTable.fnSetColumnVis(iCol, bVis ? false : true);
17 }
18
19 $(document).ready(function() {
20 function getUrlVars()
21 {
22 var vars = { };
23 var parts =
24 window.location.href.replace
25 (/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
26 vars[key] = value;
27 });
28 return vars;
29 }
30
31 function doSearch(text)
32 {
33 oTable.fnFilter(text);
34 }
35
36 var searchParam = decodeURI(getUrlVars()["search"]);
37 if (searchParam == "undefined") {
38 searchParam = "";
39 }
40
41 oTable = $("#linux").dataTable({
42 "bProcessing": false,
43 "bPaginate": false,
44 "bInfo": false,
45 "oSearch": {"sSearch": searchParam},
46 "aaSorting": [[ 5, "desc" ], [ 6, "desc"], [7, "desc"]],
47 });
48 });
49 </script>
50 </head>
51
52 <body class="bugbody">
53 <div class="outermost">
54 <h2><a href="milestone-12.04.1.html">${report_title}</a></h2>
55 <h3>Generated on ${timestamp}</h3>
56 <div class="section">
57 <!-- just use the tablesorter class for style -->
58 <table id="linux" class="tablesorter" border="0" cellpadding="0" cellspacing="1" width="100%%">
59 <thead>
60 <tr>
61 <th width="40">Bug</th>
62 <th width="80">Importance</th>
63 <th width="80">Status</th>
64 <th width="80">Target</th>
65 <th>Title</th>
66 <th width="40">Has Patch</th>
67 <th width="40">Verification</th>
68 <th width="40">Branches Linked</th>
69 <th width="100">Assignee</th>
70 </tr>
71 </thead>
72 <tbody>
73 <%
74 importance_color = {
75 "Unknown" : "importance-unknown",
76 "Critical" : "importance-critical",
77 "High" : "importance-high",
78 "Medium" : "importance-medium",
79 "Low" : "importance-low",
80 "Wishlist" : "importance-wishlist",
81 "Undecided" : "importance-undecided"
82 }
83 status_color = {
84 "New" : "status-new",
85 "Incomplete" : "status-incomplete",
86 "Confirmed" : "status-confirmed",
87 "Triaged" : "status-triaged",
88 "In Progress" : "status-in_progress",
89 "Fix Committed" : "status-fix_committed",
90 "Fix Released" : "status-fix_released",
91 "Invalid" : "status-invalid",
92 "Won't Fix" : "status-wont_fix",
93 "Opinion" : "status-opinion",
94 "Expired" : "status-expired",
95 "Unknown" : "status-unknown"
96 }
97
98 tasks = template_data['tasks']
99
100 status_filter = ["New", "Confirmed", "Triaged", "In Progress", "Fix Committed"];
101 tasks_filtered = []
102 for bid in tasks:
103 for t in tasks[bid]:
104 if t['status'] in status_filter:
105 tasks_filtered.append(t)
106
107 total_bugs = len(tasks_filtered)
108 %>
109 <p><h1> Total Bugs: ${total_bugs} </h1></p>
110 % for t in tasks_filtered:
111 <%
112 importance = t['importance']
113 importance_class = importance_color[importance]
114 status = t['status']
115 status_class = status_color[status]
116 bug_target = t['bug_target_name']
117 assignee = t['assignee'] if 'assignee' in t else 'unknown'
118 owner = t['owner'] if 'owner' in t else 'unknown'
119 pubid = t['bug']['id']
120 series = t['bug']['series_name']
121 age = t['bug']['age_hours']
122
123 # get parameters in tags
124 tags = t['bug']['tags']
125 has_patch = 'patch' in tags or t['bug']['latest_patch_uploaded'] != 'None'
126 verif_needed = 'verification-needed' in tags or 'verification-needed-precise' in tags
127 verif_done = 'verification-done' in tags or 'verification-done-precise' in tags
128 verif = ""
129 verif_color ="#3f3"
130 if verif_done:
131 verif = "Done"
132 if verif_needed:
133 verif_color ="#f33"
134 verif = "Needed"
135
136 linked_branches = []
137 for branch in t['bug']['linked_branches']:
138 linked_branches.append("<a href=" + str(branch) + ">X</a>")
139
140 %>
141 <tr>
142 <td><a href="http://launchpad.net/bugs/${pubid}">${pubid}</a></td>
143 <td><a class="${importance_class}" href="?search=${importance}">${importance}</a></td>
144 <td><a class="${status_class}" href="?search=${status}">${status}</a></td>
145 <td>${bug_target}</td>
146 <td>${t['bug']['title']}</td>
147 <td><b><font color=${'#3f3' if has_patch else '#f33'}>${has_patch}</font></b></td>
148 <td><b><font color=${verif_color}>${verif}</font></b></td>
149 <td>${" ".join(linked_branches)}</td>
150 <td><a href="?search=${assignee}">
151 ${"<b>" + assignee + "</b>" if isseg else assignee}
152 </a></td>
153 </tr>
154 %endfor
155 </tbody>
156 </table>
157 </div>
158
159 <div>
160 Show/Hide:
161 <a href="#" onclick="fnShowHide(0);">Bug</a> |
162 <a href="#" onclick="fnShowHide(1);">Importance</a> |
163 <a href="#" onclick="fnShowHide(2);">Status</a> |
164 <a href="#" onclick="fnShowHide(3);">Target</a> |
165 <a href="#" onclick="fnShowHide(4);">Title</a> |
166 <a href="#" onclick="fnShowHide(5);">Has Patch</a> |
167 <a href="#" onclick="fnShowHide(6);">Verification</a> |
168 <a href="#" onclick="fnShowHide(7);">Branches Linked</a> |
169 <a href="#" onclick="fnShowHide(8);">Assignee</a>
170 <br />
171 </div>
172 </div> <!-- Outermost -->
173 </body>
174</html>
175<!-- vi:set ts=4 sw=4 expandtab: -->
0176
=== modified file 'scripts/collect-bug-data'
--- scripts/collect-bug-data 2012-07-16 19:47:16 +0000
+++ scripts/collect-bug-data 2012-08-01 15:07:41 +0000
@@ -344,6 +344,7 @@
344 reopened = search_criteria['reopened']344 reopened = search_criteria['reopened']
345 except KeyError:345 except KeyError:
346 reopened = False346 reopened = False
347<<<<<<< TREE
347348
348 try:349 try:
349 statuslength = search_criteria['days-in-state']350 statuslength = search_criteria['days-in-state']
@@ -355,6 +356,14 @@
355 except KeyError:356 except KeyError:
356 implength = False357 implength = False
357358
359=======
360
361 try:
362 milestone = search_criteria['milestone']
363 except KeyError:
364 milestone = False
365
366>>>>>>> MERGE-SOURCE
358 # ensure that only one of these are selected367 # ensure that only one of these are selected
359 count = 0368 count = 0
360 if search_assignees != '':369 if search_assignees != '':
@@ -377,6 +386,9 @@
377 'modified_since': last_run_time,386 'modified_since': last_run_time,
378 'order_by': search_order}387 'order_by': search_order}
379388
389 if milestone:
390 search_args['milestone'] = milestone
391
380 if search_reporters != '':392 if search_reporters != '':
381 reported_tasks = []393 reported_tasks = []
382 for reporter in search_reporters:394 for reporter in search_reporters:
@@ -825,6 +837,11 @@
825 b['last_update'] = '%d' % self.how_long_ago(updated)[0]837 b['last_update'] = '%d' % self.how_long_ago(updated)[0]
826838
827 (b['series_name'], b['series_version']) = bug.series839 (b['series_name'], b['series_version']) = bug.series
840 dir(bug)
841 b['latest_patch_uploaded'] = date_to_string(bug.lpbug.latest_patch_uploaded)
842 b['linked_branches'] = []
843 for branch in bug.lpbug.linked_branches:
844 b['linked_branches'].append(branch.web_link)
828845
829 # LiveMediaBuild property846 # LiveMediaBuild property
830 #847 #
831848
=== modified file 'scripts/collect-project-bug-data'
--- scripts/collect-project-bug-data 2012-03-27 03:38:34 +0000
+++ scripts/collect-project-bug-data 2012-08-01 15:07:41 +0000
@@ -477,6 +477,28 @@
477 except:477 except:
478 pass478 pass
479479
480 # Extra Sustaining Engineering fields
481 #
482 try:
483 config = self.iso_config['launchpad_config']
484 if 'bug_type' in config.keys():
485 if config['bug_type'] == "seg":
486 from seglib import seg
487 b['seg'] = seg.parseSegBug(bug, t['assignee'], t['importance'],b['age_days'])
488 pbug_id = b['seg']['public_id']
489 b['seg']['milestone'] = []
490 if pbug_id is not '':
491 print pbug_id
492 pbug = self.lp.launchpad.bugs[int(pbug_id)]
493 for ptask in pbug.bug_tasks:
494 if ptask.milestone is not None:
495 pmilestone = ptask.milestone.name
496 b['seg']['milestone'].append(str(pmilestone))
497 t['team'] = self.team_xref[b['seg']['package']]
498 except:
499 print sys.exc_info()[:]
500 pass
501
480 t['bug'] = b502 t['bug'] = b
481503
482 Dbg.leave("CollectBugData.get_task_info")504 Dbg.leave("CollectBugData.get_task_info")

Subscribers

People subscribed via source and target branches