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
1=== added directory 'reports/point-release'
2=== added file 'reports/point-release/Makefile'
3--- reports/point-release/Makefile 1970-01-01 00:00:00 +0000
4+++ reports/point-release/Makefile 2012-08-01 15:07:41 +0000
5@@ -0,0 +1,23 @@
6+REPORT_HOST = cranberry.canonical.com
7+REPORT_ROOT = /srv/qa.ubuntu.com/reports/rls-mgr/
8+RLS_TRACKING = milestone-12.04.1
9+RLS_TRACKING_REPORT = $(RLS_TRACKING).html
10+ARSENAL_SCRIPTS = ../../scripts
11+RESOURCES=../cached-lp-resources.json
12+
13+all: reports publish
14+reports: $(RLS_TRACKING_REPORT)
15+
16+$(RESOURCES):
17+ $(ARSENAL_SCRIPTS)/cache-lp-resources ../cached-lp-resources.json
18+
19+.PHONY : $(RLS_TRACKING_REPORT)
20+$(RLS_TRACKING_REPORT) : $(RESOURCES)
21+ $(ARSENAL_SCRIPTS)/collect-bug-data $(RLS_TRACKING).json
22+ $(ARSENAL_SCRIPTS)/reporter --title="12.04.1 Point Release Bugs" --template=milestone.mako $(RLS_TRACKING).json > $@
23+
24+upload:
25+ -scp *.json *.html $(RLS_TRACKING_REPORT) $(REPORT_HOST):$(REPORT_ROOT)
26+
27+publish:
28+ -cp *.json *.html $(RLS_MGR_O_MILESTONE_REPORT) $(REPORT_ROOT)
29
30=== added file 'reports/point-release/milestone-12.04.1.json'
31--- reports/point-release/milestone-12.04.1.json 1970-01-01 00:00:00 +0000
32+++ reports/point-release/milestone-12.04.1.json 2012-08-01 15:07:41 +0000
33@@ -0,0 +1,31 @@
34+{
35+ "launchpad_config": {
36+ "launchpad_client_name": "milestone-bugs-db",
37+ "read_only": true
38+ },
39+ "search_criteria": [
40+ {
41+ "distribution": "ubuntu",
42+ "milestone": "https://api.launchpad.net/devel/ubuntu/+milestone/ubuntu-12.04.1",
43+ "series": [
44+ "precise",
45+ "quantal",
46+ "NONE"
47+ ],
48+ "status": [
49+ "New",
50+ "Incomplete",
51+ "Incomplete (with response)",
52+ "Incomplete (without response)",
53+ "Opinion",
54+ "Invalid",
55+ "Confirmed",
56+ "Triaged",
57+ "In Progress",
58+ "Fix Committed",
59+ "Fix Released"
60+ ]
61+ }
62+ ],
63+ "tasks": {}
64+}
65
66=== added file 'reports/point-release/milestone.mako'
67--- reports/point-release/milestone.mako 1970-01-01 00:00:00 +0000
68+++ reports/point-release/milestone.mako 2012-08-01 15:07:41 +0000
69@@ -0,0 +1,175 @@
70+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
71+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
72+ <head>
73+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
74+ <title>${report_title}</title>
75+ <link rel="stylesheet" href="./css/light-style.css" type="text/css" media="print, projection, screen" />
76+ <link href='http://fonts.googleapis.com/css?family=Cantarell&subset=latin' rel='stylesheet' type='text/css'>
77+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
78+ <script type="text/javascript" src="http://datatables.net/download/build/jquery.dataTables.min.js"></script>
79+
80+ <script type="text/javascript">
81+
82+ function fnShowHide(iCol)
83+ {
84+ var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
85+ oTable.fnSetColumnVis(iCol, bVis ? false : true);
86+ }
87+
88+ $(document).ready(function() {
89+ function getUrlVars()
90+ {
91+ var vars = { };
92+ var parts =
93+ window.location.href.replace
94+ (/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
95+ vars[key] = value;
96+ });
97+ return vars;
98+ }
99+
100+ function doSearch(text)
101+ {
102+ oTable.fnFilter(text);
103+ }
104+
105+ var searchParam = decodeURI(getUrlVars()["search"]);
106+ if (searchParam == "undefined") {
107+ searchParam = "";
108+ }
109+
110+ oTable = $("#linux").dataTable({
111+ "bProcessing": false,
112+ "bPaginate": false,
113+ "bInfo": false,
114+ "oSearch": {"sSearch": searchParam},
115+ "aaSorting": [[ 5, "desc" ], [ 6, "desc"], [7, "desc"]],
116+ });
117+ });
118+ </script>
119+ </head>
120+
121+ <body class="bugbody">
122+ <div class="outermost">
123+ <h2><a href="milestone-12.04.1.html">${report_title}</a></h2>
124+ <h3>Generated on ${timestamp}</h3>
125+ <div class="section">
126+ <!-- just use the tablesorter class for style -->
127+ <table id="linux" class="tablesorter" border="0" cellpadding="0" cellspacing="1" width="100%%">
128+ <thead>
129+ <tr>
130+ <th width="40">Bug</th>
131+ <th width="80">Importance</th>
132+ <th width="80">Status</th>
133+ <th width="80">Target</th>
134+ <th>Title</th>
135+ <th width="40">Has Patch</th>
136+ <th width="40">Verification</th>
137+ <th width="40">Branches Linked</th>
138+ <th width="100">Assignee</th>
139+ </tr>
140+ </thead>
141+ <tbody>
142+ <%
143+ importance_color = {
144+ "Unknown" : "importance-unknown",
145+ "Critical" : "importance-critical",
146+ "High" : "importance-high",
147+ "Medium" : "importance-medium",
148+ "Low" : "importance-low",
149+ "Wishlist" : "importance-wishlist",
150+ "Undecided" : "importance-undecided"
151+ }
152+ status_color = {
153+ "New" : "status-new",
154+ "Incomplete" : "status-incomplete",
155+ "Confirmed" : "status-confirmed",
156+ "Triaged" : "status-triaged",
157+ "In Progress" : "status-in_progress",
158+ "Fix Committed" : "status-fix_committed",
159+ "Fix Released" : "status-fix_released",
160+ "Invalid" : "status-invalid",
161+ "Won't Fix" : "status-wont_fix",
162+ "Opinion" : "status-opinion",
163+ "Expired" : "status-expired",
164+ "Unknown" : "status-unknown"
165+ }
166+
167+ tasks = template_data['tasks']
168+
169+ status_filter = ["New", "Confirmed", "Triaged", "In Progress", "Fix Committed"];
170+ tasks_filtered = []
171+ for bid in tasks:
172+ for t in tasks[bid]:
173+ if t['status'] in status_filter:
174+ tasks_filtered.append(t)
175+
176+ total_bugs = len(tasks_filtered)
177+ %>
178+ <p><h1> Total Bugs: ${total_bugs} </h1></p>
179+ % for t in tasks_filtered:
180+ <%
181+ importance = t['importance']
182+ importance_class = importance_color[importance]
183+ status = t['status']
184+ status_class = status_color[status]
185+ bug_target = t['bug_target_name']
186+ assignee = t['assignee'] if 'assignee' in t else 'unknown'
187+ owner = t['owner'] if 'owner' in t else 'unknown'
188+ pubid = t['bug']['id']
189+ series = t['bug']['series_name']
190+ age = t['bug']['age_hours']
191+
192+ # get parameters in tags
193+ tags = t['bug']['tags']
194+ has_patch = 'patch' in tags or t['bug']['latest_patch_uploaded'] != 'None'
195+ verif_needed = 'verification-needed' in tags or 'verification-needed-precise' in tags
196+ verif_done = 'verification-done' in tags or 'verification-done-precise' in tags
197+ verif = ""
198+ verif_color ="#3f3"
199+ if verif_done:
200+ verif = "Done"
201+ if verif_needed:
202+ verif_color ="#f33"
203+ verif = "Needed"
204+
205+ linked_branches = []
206+ for branch in t['bug']['linked_branches']:
207+ linked_branches.append("<a href=" + str(branch) + ">X</a>")
208+
209+ %>
210+ <tr>
211+ <td><a href="http://launchpad.net/bugs/${pubid}">${pubid}</a></td>
212+ <td><a class="${importance_class}" href="?search=${importance}">${importance}</a></td>
213+ <td><a class="${status_class}" href="?search=${status}">${status}</a></td>
214+ <td>${bug_target}</td>
215+ <td>${t['bug']['title']}</td>
216+ <td><b><font color=${'#3f3' if has_patch else '#f33'}>${has_patch}</font></b></td>
217+ <td><b><font color=${verif_color}>${verif}</font></b></td>
218+ <td>${" ".join(linked_branches)}</td>
219+ <td><a href="?search=${assignee}">
220+ ${"<b>" + assignee + "</b>" if isseg else assignee}
221+ </a></td>
222+ </tr>
223+ %endfor
224+ </tbody>
225+ </table>
226+ </div>
227+
228+ <div>
229+ Show/Hide:
230+ <a href="#" onclick="fnShowHide(0);">Bug</a> |
231+ <a href="#" onclick="fnShowHide(1);">Importance</a> |
232+ <a href="#" onclick="fnShowHide(2);">Status</a> |
233+ <a href="#" onclick="fnShowHide(3);">Target</a> |
234+ <a href="#" onclick="fnShowHide(4);">Title</a> |
235+ <a href="#" onclick="fnShowHide(5);">Has Patch</a> |
236+ <a href="#" onclick="fnShowHide(6);">Verification</a> |
237+ <a href="#" onclick="fnShowHide(7);">Branches Linked</a> |
238+ <a href="#" onclick="fnShowHide(8);">Assignee</a>
239+ <br />
240+ </div>
241+ </div> <!-- Outermost -->
242+ </body>
243+</html>
244+<!-- vi:set ts=4 sw=4 expandtab: -->
245
246=== modified file 'scripts/collect-bug-data'
247--- scripts/collect-bug-data 2012-07-16 19:47:16 +0000
248+++ scripts/collect-bug-data 2012-08-01 15:07:41 +0000
249@@ -344,6 +344,7 @@
250 reopened = search_criteria['reopened']
251 except KeyError:
252 reopened = False
253+<<<<<<< TREE
254
255 try:
256 statuslength = search_criteria['days-in-state']
257@@ -355,6 +356,14 @@
258 except KeyError:
259 implength = False
260
261+=======
262+
263+ try:
264+ milestone = search_criteria['milestone']
265+ except KeyError:
266+ milestone = False
267+
268+>>>>>>> MERGE-SOURCE
269 # ensure that only one of these are selected
270 count = 0
271 if search_assignees != '':
272@@ -377,6 +386,9 @@
273 'modified_since': last_run_time,
274 'order_by': search_order}
275
276+ if milestone:
277+ search_args['milestone'] = milestone
278+
279 if search_reporters != '':
280 reported_tasks = []
281 for reporter in search_reporters:
282@@ -825,6 +837,11 @@
283 b['last_update'] = '%d' % self.how_long_ago(updated)[0]
284
285 (b['series_name'], b['series_version']) = bug.series
286+ dir(bug)
287+ b['latest_patch_uploaded'] = date_to_string(bug.lpbug.latest_patch_uploaded)
288+ b['linked_branches'] = []
289+ for branch in bug.lpbug.linked_branches:
290+ b['linked_branches'].append(branch.web_link)
291
292 # LiveMediaBuild property
293 #
294
295=== modified file 'scripts/collect-project-bug-data'
296--- scripts/collect-project-bug-data 2012-03-27 03:38:34 +0000
297+++ scripts/collect-project-bug-data 2012-08-01 15:07:41 +0000
298@@ -477,6 +477,28 @@
299 except:
300 pass
301
302+ # Extra Sustaining Engineering fields
303+ #
304+ try:
305+ config = self.iso_config['launchpad_config']
306+ if 'bug_type' in config.keys():
307+ if config['bug_type'] == "seg":
308+ from seglib import seg
309+ b['seg'] = seg.parseSegBug(bug, t['assignee'], t['importance'],b['age_days'])
310+ pbug_id = b['seg']['public_id']
311+ b['seg']['milestone'] = []
312+ if pbug_id is not '':
313+ print pbug_id
314+ pbug = self.lp.launchpad.bugs[int(pbug_id)]
315+ for ptask in pbug.bug_tasks:
316+ if ptask.milestone is not None:
317+ pmilestone = ptask.milestone.name
318+ b['seg']['milestone'].append(str(pmilestone))
319+ t['team'] = self.team_xref[b['seg']['package']]
320+ except:
321+ print sys.exc_info()[:]
322+ pass
323+
324 t['bug'] = b
325
326 Dbg.leave("CollectBugData.get_task_info")

Subscribers

People subscribed via source and target branches