Merge lp:~brian-murray/ubuntu-archive-tools/fix-early-phasing into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 1448
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/fix-early-phasing
Merge into: lp:ubuntu-archive-tools
Diff against target: 20 lines (+9/-0)
1 file modified
phased-updater (+9/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/fix-early-phasing
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+397749@code.launchpad.net

Commit message

Only start phasing the package after it has been in updates for more than 7 hours.

Description of the change

Its possible for the phased-updater to check for crashes about a version of a package which has "just" been copied to -updates. This can result in the package being immediately set to a phased update percentage of 0% which will not help us gather additional data about the quantity of crashes and is confusing. This has happened a couple of times recently:

https://launchpad.net/ubuntu/bionic/amd64/nautilus
https://launchpad.net/ubuntu/groovy/amd64/gnome-shell

This change checks the date_published of the source package and does not consider it for phasing if it is less than 7 hours old. Here's an excerpt from a test run:

2021-02-08 16:03:33,192 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/firefox
2021-02-08 16:03:33,194 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/linux-meta-raspi2-5.3
2021-02-08 16:03:33,196 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/linux-raspi2-5.3
2021-02-08 16:03:33,197 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/linux-meta-hwe
2021-02-08 16:03:33,198 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/linux-signed-hwe
2021-02-08 16:03:33,199 - INFO - Skipping recently published pkg https://api.launchpad.net/devel/ubuntu/bionic/linux-hwe

N.B the times are PST.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

The adverse consequence of this is that if a package has a very high crash rate immediately after publishing, we are going to continue pushing the package out to users instead of us failing closed. Why is that a reasonable tradeoff?

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

> The adverse consequence of this is that if a package has a very high crash
> rate immediately after publishing, we are going to continue pushing the
> package out to users instead of us failing closed. Why is that a reasonable
> tradeoff?

We aren't going to continue pushing the package out as it the crash rate will be caught at the next run of the phased-updater and the phased update percentage will have only reached 10%. That being said the original goal can still be accomplished by changing the number of hours from 7 to something else. Would "< 4" work for you?

Revision history for this message
Steve Langasek (vorlon) wrote :

> To be clearer the package is sru-release'd and then the phased-update-percentage
> is immediately set to 10% but the phased-updater can run with-in minutes of the
> phasing being set to 10% so the data it gets about the package is from when it
> was in -proposed.

Based on this clarification I'm +1.

review: Approve

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 2020-11-05 00:33:05 +0000
3+++ phased-updater 2021-02-09 17:22:16 +0000
4@@ -632,7 +632,16 @@
5 order_by_date=True,
6 pocket='Updates', status='Published', distro_series=release)
7 for pub_source in pub_sources:
8+ # if it was published within the last 6 hours skip it
9+ published = pub_source.date_published.replace(tzinfo=None)
10+ age = datetime.datetime.utcnow() - published
11 src_pkg = pub_source.source_package_name
12+ age_days = age.days
13+ age_hours = age.seconds // 3600
14+ if age_days == 0 and age_hours < 7:
15+ logging.info('Skipping recently published pkg %s/%s' %
16+ (release, src_pkg))
17+ continue
18 version = pub_source.source_package_version
19 spph_link = pub_source.self_link
20 pbs = None

Subscribers

People subscribed via source and target branches