Merge lp:~julian-edwards/launchpad/no-udev-diff into lp:launchpad/db-devel

Proposed by Julian Edwards
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~julian-edwards/launchpad/no-udev-diff
Merge into: lp:launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp:~julian-edwards/launchpad/no-udev-diff
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Gavin Panella (community) Approve
Review via email: mp+12270@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Don't attempt diffs for the udev package, as they will currently fail and fill
the disk with output.

See https://bugs.edge.launchpad.net/soyuz/+bug/314436

= Implementation details =
Package diffs are requested in a single place,
ISourcePackageRelease.requestDiffTo(). They are created with a status of
PENDING and some time after the process-pending-diffs script runs and looks
for PENDING diffs to process.

I've made udev packages a special case so that they are always created with a
status of FAILED, thus preventing the script from attempting a diff.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

=== modified file 'lib/lp/soyuz/doc/package-diff.txt'
--- lib/lp/soyuz/doc/package-diff.txt 2009-07-16 03:31:45 +0000
+++ lib/lp/soyuz/doc/package-diff.txt 2009-09-23 10:16:13 +0000
@@ -672,6 +672,32 @@
     None

+== Problematic packages ==
+
+XXX Julian bug=314436
+Because of bug 314436, diffs of udev can generate huge output which fills the
+disk very quickly. For that reason, diffs of udev are created FAILED by
+default, which will stop the diff script from attempting to create the diff.
+
+ >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
+ >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+ >>> stp = SoyuzTestPublisher()
+ >>> discard = stp.setUpDefaultDistroSeries(hoary)
+ >>> udev_orig = stp.getPubSource(
+ ... sourcename="udev", version="1.0",
+ ... status=PackagePublishingStatus.PUBLISHED)
+ >>> udev_new = stp.getPubSource(
+ ... sourcename="udev", version="1.1",
+ ... status=PackagePublishingStatus.PENDING)
+
+ >>> udev_diff = udev_orig.sourcepackagerelease.requestDiffTo(
+ ... requester=cprov,
+ ... to_sourcepackagerelease=udev_new.sourcepackagerelease)
+
+ >>> print udev_diff.status.name
+ FAILED
+
+
 == PackageDiff privacy ==

 Packagediff decides whether the 'diff_content' file should be

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py 2009-07-20 15:05:42 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py 2009-09-23 10:31:47 +0000
@@ -39,7 +39,8 @@
 from lp.soyuz.interfaces.archive import (
     ArchivePurpose, IArchiveSet, MAIN_ARCHIVE_PURPOSES)
 from lp.soyuz.interfaces.build import BuildStatus
-from lp.soyuz.interfaces.packagediff import PackageDiffAlreadyRequested
+from lp.soyuz.interfaces.packagediff import (
+ PackageDiffAlreadyRequested, PackageDiffStatus)
 from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
 from lp.soyuz.model.build import Build
@@ -602,6 +603,14 @@
                 "%s was already requested by %s"
                 % (candidate.title, candidate.requester.displayname))

+ if self.sourcepackagename.name == 'udev':
+ # XXX Julian bug=314436
+ # Currently diff output for udev will fill disks. It's
+ # disabled until diffutils is fixed in that bug.
+ status = PackageDiffStatus.FAILED
+ else:
+ status = PackageDiffStatus.PENDING
+
         return PackageDiff(
             from_source=self, to_source=to_sourcepackagerelease,
- requester=requester)
+ requester=requester, status=status)

Revision history for this message
Gavin Panella (allenap) :
review: Approve
Revision history for this message
Brad Crittenden (bac) wrote :

Julian the changes look good. Please add a date to the XXX comments you've added as shown in https://dev.launchpad.net/XXXPolicy

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/doc/package-diff.txt'
2--- lib/lp/soyuz/doc/package-diff.txt 2009-07-16 03:31:45 +0000
3+++ lib/lp/soyuz/doc/package-diff.txt 2009-09-23 10:16:13 +0000
4@@ -672,6 +672,32 @@
5 None
6
7
8+== Problematic packages ==
9+
10+XXX Julian bug=314436
11+Because of bug 314436, diffs of udev can generate huge output which fills the
12+disk very quickly. For that reason, diffs of udev are created FAILED by
13+default, which will stop the diff script from attempting to create the diff.
14+
15+ >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
16+ >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
17+ >>> stp = SoyuzTestPublisher()
18+ >>> discard = stp.setUpDefaultDistroSeries(hoary)
19+ >>> udev_orig = stp.getPubSource(
20+ ... sourcename="udev", version="1.0",
21+ ... status=PackagePublishingStatus.PUBLISHED)
22+ >>> udev_new = stp.getPubSource(
23+ ... sourcename="udev", version="1.1",
24+ ... status=PackagePublishingStatus.PENDING)
25+
26+ >>> udev_diff = udev_orig.sourcepackagerelease.requestDiffTo(
27+ ... requester=cprov,
28+ ... to_sourcepackagerelease=udev_new.sourcepackagerelease)
29+
30+ >>> print udev_diff.status.name
31+ FAILED
32+
33+
34 == PackageDiff privacy ==
35
36 Packagediff decides whether the 'diff_content' file should be
37
38=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
39--- lib/lp/soyuz/model/sourcepackagerelease.py 2009-07-20 15:05:42 +0000
40+++ lib/lp/soyuz/model/sourcepackagerelease.py 2009-09-23 10:31:47 +0000
41@@ -39,7 +39,8 @@
42 from lp.soyuz.interfaces.archive import (
43 ArchivePurpose, IArchiveSet, MAIN_ARCHIVE_PURPOSES)
44 from lp.soyuz.interfaces.build import BuildStatus
45-from lp.soyuz.interfaces.packagediff import PackageDiffAlreadyRequested
46+from lp.soyuz.interfaces.packagediff import (
47+ PackageDiffAlreadyRequested, PackageDiffStatus)
48 from lp.soyuz.interfaces.publishing import PackagePublishingStatus
49 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
50 from lp.soyuz.model.build import Build
51@@ -602,6 +603,14 @@
52 "%s was already requested by %s"
53 % (candidate.title, candidate.requester.displayname))
54
55+ if self.sourcepackagename.name == 'udev':
56+ # XXX Julian bug=314436
57+ # Currently diff output for udev will fill disks. It's
58+ # disabled until diffutils is fixed in that bug.
59+ status = PackageDiffStatus.FAILED
60+ else:
61+ status = PackageDiffStatus.PENDING
62+
63 return PackageDiff(
64 from_source=self, to_source=to_sourcepackagerelease,
65- requester=requester)
66+ requester=requester, status=status)

Subscribers

People subscribed via source and target branches

to status/vote changes: