Merge lp:~brian-murray/ubuntu-archive-tools/autopkg-excuses into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 937
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/autopkg-excuses
Merge into: lp:ubuntu-archive-tools
Diff against target: 88 lines (+35/-4)
1 file modified
sru-report (+35/-4)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/autopkg-excuses
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+250795@code.launchpad.net

Description of the change

This adds checking of update_excuses.yaml to discover regressions in autopkg test failures and adds information to the report similar to how build failures are displayed. As an example see:

http://people.canonical.com/~brian/tmp/sru-report.html

and the package haproxy, webkitgtk, etc....

The sample report has some formatting issues which I've fixed in the code, I just don't want to bother running the sample report again.

To post a comment you must log in.
938. By Brian Murray

remove code used for testing with one release

939. By Brian Murray

sru-report: precise is now being tested and also check for in progress tests.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sru-report'
2--- sru-report 2015-02-20 17:42:16 +0000
3+++ sru-report 2015-02-24 21:04:53 +0000
4@@ -37,6 +37,7 @@
5 from urllib.request import urlopen
6 except ImportError:
7 from urllib import urlopen
8+import yaml
9
10 import apt_pkg
11 from launchpadlib.errors import HTTPError
12@@ -68,6 +69,8 @@
13 releases = {} # name -> distro_series
14 broken_bugs = set()
15 ignored_commenters = []
16+excuses_url = ("http://people.canonical.com/~ubuntu-archive/proposed-migration"
17+ "/%s/update_excuses.yaml")
18
19
20 def current_versions(distro_series, sourcename):
21@@ -256,8 +259,15 @@
22 if builds:
23 builds = '<span style="font-size: x-small">%s</span>' % builds
24
25- print(' <tr><td><a href="%s">%s</a>%s</td> ' %
26- (lpurl, pkg, builds))
27+ autopkg_fails = ''
28+ for excuse in rpkg['autopkg_fails']:
29+ autopkg_fails += '<br/>%s' % excuse
30+ if autopkg_fails:
31+ autopkg_fails = '<span style="font-size: x-small">%s</span>' \
32+ % autopkg_fails
33+
34+ print(' <tr><td><a href="%s">%s</a>%s %s</td> ' %
35+ (lpurl, pkg, builds, autopkg_fails))
36 print(' <td><a href="%s">%s</a></td> ' %
37 (lpurl + rpkg['release'], rpkg['release']))
38 print(' <td><a href="%s">%s</a></td> ' %
39@@ -567,6 +577,7 @@
40 'bugs': [buglist],
41 'changesfiles': [changes_urls],
42 'build_problems': { arch -> (state, URL) },
43+ 'autopkg_fails': [excuses]
44 }
45 '''
46 srus = defaultdict(dict)
47@@ -575,6 +586,16 @@
48 #if releases[release].status not in (
49 # "Active Development", "Pre-release Freeze"):
50 # continue # for quick testing
51+ pkg_excuses = []
52+ if release != 'lucid':
53+ excuses_page = excuses_url % release
54+ excuses = urlopen(excuses_page)
55+ excuses_data = yaml.load(excuses)
56+ pkg_excuses = [excuse['source']
57+ for excuse in excuses_data['sources']
58+ if 'autopkgtest' in excuse['reason']
59+ or 'block' in excuse['reason']]
60+
61 for published in archive.getPublishedSources(
62 pocket='Proposed', status='Published',
63 distro_series=releases[release]):
64@@ -605,14 +626,24 @@
65 try:
66 for build in published.getBuilds():
67 if not build.buildstate.startswith('Success'):
68- srus[release][pkg]['build_problems'][build.arch_tag] = (
69- build.buildstate, build.web_link)
70+ srus[release][pkg]['build_problems'][build.arch_tag] \
71+ = (build.buildstate, build.web_link)
72 except HTTPError as e:
73 if e.response['status'] == '401':
74 continue
75 else:
76 raise e
77
78+ srus[release][pkg]['autopkg_fails'] = []
79+ if pkg in pkg_excuses:
80+ for excuse in excuses_data['sources']:
81+ if excuse['source'] == pkg:
82+ for line in excuse['excuses']:
83+ if 'Regression' not in line and \
84+ 'in progress' not in line:
85+ continue
86+ srus[release][pkg]['autopkg_fails'].append(line)
87+
88 return srus
89
90

Subscribers

People subscribed via source and target branches