launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15486
[Merge] lp:~cjwatson/launchpad/copy-missing-builds-logging into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/copy-missing-builds-logging into lp:launchpad.
Commit message:
Pass do_copy's logger down to createMissingBuilds.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1133465 in Launchpad itself: "Package copier doesn't pass a logger to createMissingBuilds"
https://bugs.launchpad.net/launchpad/+bug/1133465
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/copy-missing-builds-logging/+merge/159522
== Summary ==
Bug 1133465: investigating problems involving copies and missing builds is harder than it should be due to lack of logging.
== Proposed fix ==
Pass the existing logger a bit further down.
== LOC Rationale ==
+1; should be lost in the noise.
== Tests ==
bin/test -vvct lp.soyuz.scripts.tests.test_copypackage
I didn't add tests for this since I doubt it's really useful to micro-test exactly what we're logging here.
== Demo and Q/A ==
Possible, but probably not worth the hassle of setting up copies between series with different architecture sets; I'd be inclined to --no-qa this since it isn't an external behaviour change.
--
https://code.launchpad.net/~cjwatson/launchpad/copy-missing-builds-logging/+merge/159522
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/copy-missing-builds-logging into lp:launchpad.
=== modified file 'lib/lp/soyuz/scripts/packagecopier.py'
--- lib/lp/soyuz/scripts/packagecopier.py 2012-11-26 08:33:03 +0000
+++ lib/lp/soyuz/scripts/packagecopier.py 2013-04-17 23:38:27 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Package copying utilities."""
@@ -625,7 +625,7 @@
source, archive, destination_series, pocket, include_binaries,
override, close_bugs=close_bugs, create_dsd_job=create_dsd_job,
close_bugs_since_version=old_version, creator=creator,
- sponsor=sponsor, packageupload=packageupload)
+ sponsor=sponsor, packageupload=packageupload, logger=logger)
if send_email:
notify(
person, source.sourcepackagerelease, [], [], archive,
@@ -653,7 +653,7 @@
def _do_direct_copy(source, archive, series, pocket, include_binaries,
override=None, close_bugs=True, create_dsd_job=True,
close_bugs_since_version=None, creator=None,
- sponsor=None, packageupload=None):
+ sponsor=None, packageupload=None, logger=None):
"""Copy publishing records to another location.
Copy each item of the given list of `SourcePackagePublishingHistory`
@@ -683,6 +683,7 @@
:param sponsor: the sponsor `IPerson`, if this copy is being sponsored.
:param packageupload: The `IPackageUpload` that caused this publication
to be created.
+ :param logger: An optional logger.
:return: a list of `ISourcePackagePublishingHistory` and
`BinaryPackagePublishingHistory` corresponding to the copied
@@ -757,6 +758,6 @@
# Always ensure the needed builds exist in the copy destination
# after copying the binaries.
# XXX cjwatson 2012-06-22 bug=869308: Fails to honour P-a-s.
- source_copy.createMissingBuilds()
+ source_copy.createMissingBuilds(logger=logger)
return copies