launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04489
[Merge] lp:~danilo/launchpad/bug-811447 into lp:launchpad
Данило Шеган has proposed merging lp:~danilo/launchpad/bug-811447 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #811447 in Launchpad itself: "BugTask:+index timeout - death by sql in PersonSubscriptions(user, bug)"
https://bugs.launchpad.net/launchpad/+bug/811447
For more details, see:
https://code.launchpad.net/~danilo/launchpad/bug-811447/+merge/70561
= Bug #811447: pofile-stats.txt not found =
pofile-stats script runs very long (sometimes even 10 days) and during that time we get a few nodowntime deployments, thus replacing the LP tree with another one (with a different revision number in the tree path on our servers).
Thus, getting an email template fails when DBLoopTuner completes the run().
I will fix the lint issues after review and before landing.
== Proposed fix ==
Move the fetching of the email template before the loop is executed.
== Tests ==
bin/test -cvvt verify.pofile
== Demo and Q/A ==
run the pofile-stats.py script and move the LP tree while it's running: it should still have the correct email template
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/translations/scripts/verify_pofile_stats.py
./lib/lp/translations/scripts/verify_pofile_stats.py
121: E203 whitespace before ':'
121: E225 missing whitespace around operator
161: E203 whitespace before ':'
198: E203 whitespace before ':'
209: W391 blank line at end of file
--
https://code.launchpad.net/~danilo/launchpad/bug-811447/+merge/70561
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~danilo/launchpad/bug-811447 into lp:launchpad.
=== modified file 'lib/lp/translations/scripts/verify_pofile_stats.py'
--- lib/lp/translations/scripts/verify_pofile_stats.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/scripts/verify_pofile_stats.py 2011-08-05 13:11:50 +0000
@@ -137,6 +137,14 @@
% self.start_at_id)
loop = Verifier(self.transaction, self.logger, self.start_at_id)
+ # Since the script can run for a long time, our deployment
+ # process might remove the Launchpad tree the script was run
+ # from, thus the script failing to find the email template
+ # if it was attempted after DBLoopTuner run is completed.
+ # See bug #811447 for OOPS we used to get then.
+ template = helpers.get_email_template(
+ 'pofile-stats.txt', 'translations')
+
# Each iteration of our loop collects all statistics first, before
# modifying any rows in the database. With any locks on the database
# acquired only at the very end of the iteration, we can afford to
@@ -149,8 +157,6 @@
if loop.total_incorrect > 0 or loop.total_exceptions > 0:
# Not all statistics were correct, or there were failures while
# checking them. Email the admins.
- template = helpers.get_email_template(
- 'pofile-stats.txt', 'translations')
message = template % {
'exceptions' : loop.total_exceptions,
'errors' : loop.total_incorrect,
Follow ups