← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/bug-887063 into lp:launchpad

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/bug-887063 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #887063 in Launchpad itself: "Log noise from packaging_translations"
  https://bugs.launchpad.net/launchpad/+bug/887063

For more details, see:
https://code.launchpad.net/~jtv/launchpad/bug-887063/+merge/81439

= Summary =

We're getting some silly log noise from packaging_translations: it skips distributions that don't have "full functionality," and when that happens, logs it as a warning.  Which results in continual log spam: Skipping merge of unsupported distroseries "Lenny".


== Proposed fix ==

Downgrade to info.  We want the error-reports list to be quiet yet interesting.  Launchpad not hosting translations for Lenny is not very interesting.


== Pre-implementation notes ==

I asked on #launchpad-dev.  No reactions.  Silence is assent.


== Implementation details ==

The warning string doesn't seem to occur in any tests (although I am of course running an EC2 test to make sure).  So I don't expect to break any.

We don't usually test for log output anyway, but there were times when it was often our easiest way to establish what a script-related class was doing — especially in doctests.  Hence always worth checking for.


== Tests ==

At least one pre-existing test covers this code path:

{{{
./bin/test -vvc lp.translations.tests.test_translationpackagingjob -t test_skips_non_ubuntu_distros
}}}


== Demo and Q/A ==

Run the job; watch it not break.


= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/translations/model/translationpackagingjob.py
-- 
https://code.launchpad.net/~jtv/launchpad/bug-887063/+merge/81439
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/bug-887063 into lp:launchpad.
=== modified file 'lib/lp/translations/model/translationpackagingjob.py'
--- lib/lp/translations/model/translationpackagingjob.py	2011-07-31 09:09:22 +0000
+++ lib/lp/translations/model/translationpackagingjob.py	2011-11-07 10:49:27 +0000
@@ -26,9 +26,7 @@
     implements,
     )
 
-from lp.services.job.interfaces.job import (
-    IRunnableJob,
-    )
+from lp.services.job.interfaces.job import IRunnableJob
 from lp.services.job.runner import BaseRunnableJob
 from lp.translations.interfaces.translationpackagingjob import (
     ITranslationPackagingJobSource,
@@ -94,7 +92,7 @@
         """See `IRunnableJob`."""
         logger = logging.getLogger()
         if not self.distroseries.distribution.full_functionality:
-            logger.warning(
+            logger.warn(
                 'Skipping merge for unsupported distroseries "%s".' %
                 self.distroseries.displayname)
             return