launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04854
[Merge] lp:~stub/launchpad/disco into lp:launchpad
Stuart Bishop has proposed merging lp:~stub/launchpad/disco into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stub/launchpad/disco/+merge/73780
= Summary =
Some disconnection handling fixes have landed on Storm trunk that we need.
== Proposed fix ==
Update our Storm branch and install a new egg.
== Pre-implementation notes ==
== Implementation details ==
== Tests ==
== Demo and Q/A ==
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
versions.cfg
scripts/branch-rewrite.py
./scripts/branch-rewrite.py
15: '_pythonpath' imported but unused
--
https://code.launchpad.net/~stub/launchpad/disco/+merge/73780
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stub/launchpad/disco into lp:launchpad.
=== modified file 'scripts/branch-rewrite.py'
--- scripts/branch-rewrite.py 2010-11-06 12:50:22 +0000
+++ scripts/branch-rewrite.py 2011-09-02 10:43:30 +0000
@@ -19,6 +19,8 @@
from canonical.database.sqlbase import ISOLATION_LEVEL_AUTOCOMMIT
from canonical.config import config
+from canonical.launchpad.interfaces.lpstorm import ISlaveStore
+from lp.code.model.branch import Branch
from lp.codehosting.rewrite import BranchRewriter
from lp.services.log.loglevels import INFO, WARNING
from lp.services.scripts.base import LaunchpadScript
@@ -58,11 +60,18 @@
else:
# Standard input has been closed, so die.
return
- except KeyboardInterrupt:
- sys.exit()
- except:
+ except Exception:
self.logger.exception('Exception occurred:')
print "NULL"
+ # The exception might have been a DisconnectionError or
+ # similar. Cleanup such as database reconnection will
+ # not happen until the transaction is rolled back. We
+ # are explicitly rolling back the store here instead of
+ # using transaction.abort() due to Bug #819282.
+ try:
+ ISlaveStore(Branch).rollback()
+ except Exception:
+ self.logger.exception('Exception occurred in rollback:')
if __name__ == '__main__':
=== modified file 'versions.cfg'
--- versions.cfg 2011-09-01 10:58:21 +0000
+++ versions.cfg 2011-09-02 10:43:30 +0000
@@ -84,7 +84,7 @@
soupmatchers = 0.1r53
sourcecodegen = 0.6.9
# lp:~launchpad-committers/storm/with-without-datetime
-storm = 0.18.0.99-lpwithnodatetime-r394
+storm = 0.18.0.99-lpwithnodatetime-r395
testresources = 0.2.4-r58
testtools = 0.9.12-r228
timeline = 0.0.1