Merge lp:~powersj/ubuntu-cdimage/megabytes into lp:ubuntu-cdimage

Proposed by Joshua Powers
Status: Merged
Merged at revision: 1965
Proposed branch: lp:~powersj/ubuntu-cdimage/megabytes
Merge into: lp:ubuntu-cdimage
Diff against target: 25 lines (+7/-2)
1 file modified
bin/daily-checks (+7/-2)
To merge this branch: bzr merge lp:~powersj/ubuntu-cdimage/megabytes
Reviewer Review Type Date Requested Status
Steve Langasek Disapprove
Review via email: mp+307252@code.launchpad.net

Description of the change

Each day the daily health checks run and produce a report for over sized ISOs such as the following:

ubuntu-server/daily: xenial-server-powerpc.iso oversized by 8441856 bytes (745107456)
ubuntu-server/daily: yakkety-server-amd64.iso oversized by 117923840 bytes (854589440)
ubuntu-server/daily: yakkety-server-arm64.iso oversized by 42149888 bytes (778815488)
ubuntu-server/daily: yakkety-server-i386.iso oversized by 102195200 bytes (838860800)
ubuntu-server/daily: yakkety-server-powerpc.iso oversized by 136861696 bytes (873527296)
ubuntu-server/daily: yakkety-server-ppc64el.iso oversized by 76937216 bytes (813602816)

Producing the output in bytes is not exactly the most human readable or understandable. This merge request proposes changing the output from bytes to megabytes. The new output should read:

ubuntu-server/daily: xenial-server-powerpc.iso oversized by 8 megabytes (711)
ubuntu-server/daily: yakkety-server-amd64.iso oversized by 112 megabytes (815)
ubuntu-server/daily: yakkety-server-arm64.iso oversized by 40 megabytes (743)
ubuntu-server/daily: yakkety-server-i386.iso oversized by 97 megabytes (800)
ubuntu-server/daily: yakkety-server-powerpc.iso oversized by 131 megabytes (833)
ubuntu-server/daily: yakkety-server-ppc64el.iso oversized by 73 megabytes (776)

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

Brian merged this, but I have reverted it with the following rationale:

  Revert change to daily checks

  - this loses information in the output by rounding
  - in some cases the report would actually report that the image is oversized
    by "0 megabytes"
  - this is an incorrect use of megabyte for binary multiples; it either
    needs to use mibi for the current number, or switch to using decimal
    mega per https://wiki.ubuntu.com/UnitsPolicy

It is my preference that we keep this in bytes, I don't see readability of the numbers as a concern vs precision here.

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/daily-checks'
2--- bin/daily-checks 2016-07-26 17:41:15 +0000
3+++ bin/daily-checks 2016-09-29 23:07:35 +0000
4@@ -125,8 +125,9 @@
5 arch = base.split("-")[-1]
6 sizelimit = publisher.size_limit(arch)
7 if size > sizelimit:
8- warn(project, image, "%s oversized by %d bytes (%d)" %
9- (iso, size - sizelimit, size))
10+ warn(project, image, "%s oversized by %d megabytes (%d)" %
11+ (iso, bytes_to_megabytes(size - sizelimit),
12+ bytes_to_megabytes(size)))
13
14 if project == 'xubuntu':
15 for manifest in filter(
16@@ -184,6 +185,10 @@
17 return '\n\n\n'.join(texts)
18
19
20+def bytes_to_megabytes(size):
21+ return round(size / 1048576.0)
22+
23+
24 def send_warnings(config, options, projects):
25 from cdimage.mail import get_notify_addresses, send_mail
26

Subscribers

People subscribed via source and target branches