Merge lp:~brian-murray/ubuntu-archive-tools/phased-updater-rate-of-crashes into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 930
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/phased-updater-rate-of-crashes
Merge into: lp:ubuntu-archive-tools
Diff against target: 68 lines (+19/-14)
1 file modified
phased-updater (+19/-14)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/phased-updater-rate-of-crashes
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+248153@code.launchpad.net

Description of the change

I've updated the error tracker to use the phased-update percentage when calculating the rate of crashes for one package version to another package version. This updates the phased-updater to pass the phased-update-percentage to the Error Tracker. It also turns on the rate of crash checking now that we have sufficient data for comparing package versions.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phased-updater'
2--- phased-updater 2014-10-23 18:05:19 +0000
3+++ phased-updater 2015-01-30 18:35:30 +0000
4@@ -428,7 +428,7 @@
5 return (None, None)
6
7
8-def crash_rate_increase(release, src_pkg, version):
9+def crash_rate_increase(release, src_pkg, version, last_pup):
10 pvers, date = package_previous_version(release, src_pkg, version)
11 date = str(date).replace('-', '')
12 if not pvers:
13@@ -437,9 +437,9 @@
14 return False
15 release_name = 'Ubuntu ' + release.version
16 rate_url = BASE_ERRORS_URL + 'package-rate-of-crashes/?format=json' + \
17- '&release=%s&package=%s&old_version=%s&new_version=%s&date=%s' % \
18+ '&release=%s&package=%s&old_version=%s&new_version=%s&phased_update_percentage=%s&date=%s' % \
19 (quote(release_name), quote(src_pkg), quote(pvers), quote(version),
20- date)
21+ last_pup, date)
22 rate_file = urlopen(rate_url)
23 if rate_file.getcode() >= 400:
24 logging.error('HTTP error retrieving %s' % rate_url)
25@@ -546,20 +546,12 @@
26 else:
27 issues[rname][pub_source] = {}
28 issues[rname][pub_source]['buckets'] = problems
29- # 2014-06-12 turn off rate_increase as we have a new database
30- rate_increase = False
31- #rate_increase = crash_rate_increase(release, src_pkg, version)
32- if rate_increase and (src_pkg, version) not in rate_overrides:
33- if pub_source not in issues[rname]:
34- issues[rname][pub_source] = {}
35- issues[rname][pub_source]['rate'] = rate_increase
36 if pbs:
37 # the p-u-p is currently the same for all binary packages
38 last_pup = pbs[0].phased_update_percentage
39- if pub_source not in issues[rname]:
40- issues[rname][pub_source] = {}
41- # phasing has stopped so check what the max value was
42- if last_pup == 0:
43+ else:
44+ last_pup = None
45+ if last_pup == 0:
46 for allpb in archive.getPublishedBinaries(
47 exact_match=True, pocket='Updates',
48 binary_name=pbs[0].binary_package_name):
49@@ -567,6 +559,19 @@
50 if allpb.phased_update_percentage > 0:
51 max_pup = allpb.phased_update_percentage
52 break
53+ if max_pup and last_pup == 0:
54+ rate_increase = crash_rate_increase(release, src_pkg, version, max_pup)
55+ else:
56+ rate_increase = crash_rate_increase(release, src_pkg, version, last_pup)
57+ if rate_increase and (src_pkg, version) not in rate_overrides:
58+ if pub_source not in issues[rname]:
59+ issues[rname][pub_source] = {}
60+ issues[rname][pub_source]['rate'] = rate_increase
61+ if pbs:
62+ if pub_source not in issues[rname]:
63+ issues[rname][pub_source] = {}
64+ # phasing has stopped so check what the max value was
65+ if last_pup == 0:
66 issues[rname][pub_source]['max_pup'] = max_pup
67 issues[rname][pub_source]['pup'] = last_pup
68 suite = rname + '-updates'

Subscribers

People subscribed via source and target branches