← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): code
Related bugs:
  #623865 TranslationTemplateBuildJob starvation
  https://bugs.launchpad.net/bugs/623865


= Bug 623865 =

Our TranslationTemplateBuildFarmJobs have been starved out of the build farm since Friday morning.  This raises new jobs' priority a bit, as per discussion with bigjools.

To test:
{{{
./bin/test -vvc -m lp.translations.tests.test_translationtemplatesbuildfarmjob
}}}

To Q/A, confirm that these jobs are being processed.  One way of doing it is to run this against the production db: http://paste.ubuntu.com/482149/

…and verifying that accumulation of jobs in status 0 ("waiting") does not continue.  The older jobs will probably stick around for a while as they still have the older priority of 1000.


No lint.


Jeroen
-- 
https://code.launchpad.net/~jtv/launchpad/bug-623865/+merge/33617
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/bug-623865 into lp:launchpad/devel.
=== modified file 'lib/lp/translations/model/translationtemplatesbuildjob.py'
--- lib/lp/translations/model/translationtemplatesbuildjob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/translations/model/translationtemplatesbuildjob.py	2010-08-25 09:34:45 +0000
@@ -69,9 +69,10 @@
 
     def score(self):
         """See `IBuildFarmJob`."""
-        # Hard-code score for now; anything other than 1000 is probably
-        # inappropriate.
-        return 1000
+        # Hard-code score for now.  Most PPA jobs start out at 2505;
+        # TranslationTemplateBuildJobs are fast so we want them at a
+        # higher priority.
+        return 2510
 
     def getLogFileName(self):
         """See `IBuildFarmJob`."""

=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildjob.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildjob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildjob.py	2010-08-25 09:34:45 +0000
@@ -119,7 +119,7 @@
     def test_score(self):
         # For now, these jobs always score themselves at 1,000.  In the
         # future however the scoring system is to be revisited.
-        self.assertEqual(1000, self.specific_job.score())
+        self.assertEqual(2510, self.specific_job.score())
 
     def test_cleanUp(self):
         # TranslationTemplatesBuildJob has its own customized cleanup