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
=== modified file 'sru-report'
--- sru-report 2015-02-20 17:42:16 +0000
+++ sru-report 2015-02-24 21:04:53 +0000
@@ -37,6 +37,7 @@
37 from urllib.request import urlopen37 from urllib.request import urlopen
38except ImportError:38except ImportError:
39 from urllib import urlopen39 from urllib import urlopen
40import yaml
4041
41import apt_pkg42import apt_pkg
42from launchpadlib.errors import HTTPError43from launchpadlib.errors import HTTPError
@@ -68,6 +69,8 @@
68releases = {} # name -> distro_series69releases = {} # name -> distro_series
69broken_bugs = set()70broken_bugs = set()
70ignored_commenters = []71ignored_commenters = []
72excuses_url = ("http://people.canonical.com/~ubuntu-archive/proposed-migration"
73 "/%s/update_excuses.yaml")
7174
7275
73def current_versions(distro_series, sourcename):76def current_versions(distro_series, sourcename):
@@ -256,8 +259,15 @@
256 if builds:259 if builds:
257 builds = '<span style="font-size: x-small">%s</span>' % builds260 builds = '<span style="font-size: x-small">%s</span>' % builds
258261
259 print(' <tr><td><a href="%s">%s</a>%s</td> ' %262 autopkg_fails = ''
260 (lpurl, pkg, builds))263 for excuse in rpkg['autopkg_fails']:
264 autopkg_fails += '<br/>%s' % excuse
265 if autopkg_fails:
266 autopkg_fails = '<span style="font-size: x-small">%s</span>' \
267 % autopkg_fails
268
269 print(' <tr><td><a href="%s">%s</a>%s %s</td> ' %
270 (lpurl, pkg, builds, autopkg_fails))
261 print(' <td><a href="%s">%s</a></td> ' %271 print(' <td><a href="%s">%s</a></td> ' %
262 (lpurl + rpkg['release'], rpkg['release']))272 (lpurl + rpkg['release'], rpkg['release']))
263 print(' <td><a href="%s">%s</a></td> ' %273 print(' <td><a href="%s">%s</a></td> ' %
@@ -567,6 +577,7 @@
567 'bugs': [buglist],577 'bugs': [buglist],
568 'changesfiles': [changes_urls],578 'changesfiles': [changes_urls],
569 'build_problems': { arch -> (state, URL) },579 'build_problems': { arch -> (state, URL) },
580 'autopkg_fails': [excuses]
570 }581 }
571 '''582 '''
572 srus = defaultdict(dict)583 srus = defaultdict(dict)
@@ -575,6 +586,16 @@
575 #if releases[release].status not in (586 #if releases[release].status not in (
576 # "Active Development", "Pre-release Freeze"):587 # "Active Development", "Pre-release Freeze"):
577 # continue # for quick testing588 # continue # for quick testing
589 pkg_excuses = []
590 if release != 'lucid':
591 excuses_page = excuses_url % release
592 excuses = urlopen(excuses_page)
593 excuses_data = yaml.load(excuses)
594 pkg_excuses = [excuse['source']
595 for excuse in excuses_data['sources']
596 if 'autopkgtest' in excuse['reason']
597 or 'block' in excuse['reason']]
598
578 for published in archive.getPublishedSources(599 for published in archive.getPublishedSources(
579 pocket='Proposed', status='Published',600 pocket='Proposed', status='Published',
580 distro_series=releases[release]):601 distro_series=releases[release]):
@@ -605,14 +626,24 @@
605 try:626 try:
606 for build in published.getBuilds():627 for build in published.getBuilds():
607 if not build.buildstate.startswith('Success'):628 if not build.buildstate.startswith('Success'):
608 srus[release][pkg]['build_problems'][build.arch_tag] = (629 srus[release][pkg]['build_problems'][build.arch_tag] \
609 build.buildstate, build.web_link)630 = (build.buildstate, build.web_link)
610 except HTTPError as e:631 except HTTPError as e:
611 if e.response['status'] == '401':632 if e.response['status'] == '401':
612 continue633 continue
613 else:634 else:
614 raise e635 raise e
615636
637 srus[release][pkg]['autopkg_fails'] = []
638 if pkg in pkg_excuses:
639 for excuse in excuses_data['sources']:
640 if excuse['source'] == pkg:
641 for line in excuse['excuses']:
642 if 'Regression' not in line and \
643 'in progress' not in line:
644 continue
645 srus[release][pkg]['autopkg_fails'].append(line)
646
616 return srus647 return srus
617648
618649

Subscribers

People subscribed via source and target branches