Merge lp:~jcsackett/launchpad/i-hate-storm-base-storm-705197 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12262 | ||||
Proposed branch: | lp:~jcsackett/launchpad/i-hate-storm-base-storm-705197 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
523 lines (+88/-63) 16 files modified
lib/canonical/launchpad/database/librarian.py (+2/-2) lib/lp/bugs/model/apportjob.py (+6/-10) lib/lp/bugs/model/bugjob.py (+5/-6) lib/lp/bugs/model/bugsubscription.py (+4/-4) lib/lp/bugs/model/bugsubscriptionfilter.py (+4/-4) lib/lp/bugs/model/bugsubscriptionfilterimportance.py (+4/-4) lib/lp/bugs/model/bugsubscriptionfilterstatus.py (+4/-4) lib/lp/bugs/model/bugsubscriptionfiltertag.py (+4/-3) lib/lp/bugs/model/bugtracker.py (+3/-3) lib/lp/bugs/model/bugwatch.py (+2/-2) lib/lp/code/model/branchmergeproposaljob.py (+4/-5) lib/lp/registry/model/nameblacklist.py (+4/-4) lib/lp/registry/model/persontransferjob.py (+4/-5) lib/lp/services/database/stormbase.py (+31/-0) lib/lp/soyuz/model/archivejob.py (+3/-3) lib/lp/soyuz/model/distributionjob.py (+4/-4) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/i-hate-storm-base-storm-705197 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+47269@code.launchpad.net |
Commit message
[r=abentley]
Description of the change
Summary
=======
Several models uses storm.base.Storm as their parent class. These classes end up introducing cache errors as they don't have the necessary storm hooks to clear/invalidate caches (as other classes e.g. SQLBase do).
This branch introduces a new class, descended from storm.base.Storm, that adds the same storm hook functionality as in SQLBase.
Preimplementation
=================
Spoke with Robert Collins, Curtis Hovey, and William Grant about what exactly was needed.
Proposed Fix
============
Create a new class, StormBase, that descends from storm.base.Storm and adds the hooks needed (borrowed from SQLBase).
Implementation
==============
lib/lp/
-------
Adds the new StormBase class.
All other files
---------------
Updates uses of storm.base.Storm to lp.services.
Tests
=====
Basically you have to run ec2. You can try:
bin/test -m lp.bugs
bin/test -m lp.codehosting
bin/test -m lp.registry
But that's not guaranteed to test all areas changed. I've had to ec2 test to track down any breaks.
Demo & QA
=========
Not terribly qa-able. Make sure bugtracking and bugtasks work--they were heaviest effected. But honestly, if this weren't working, lp.dev will just crash all over the place.
Lint
====
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/canonical/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
35: 'ITemporaryStor
163: E222 multiple spaces after operator
210: E202 whitespace before ')'
./lib/lp/
26: 'removeSecurity
142: E222 multiple spaces after operator.
18: E302 expected 2 blank lines, found 1
./lib/lp/
5: E303 too many blank lines (3)
289: E202 whitespace before ')'
./lib/lp/
14: 'SQLObjectNotFound' imported but unused
./lib/lp/
136: E222 multiple spaces after operator
I'm going to fix lint after review; the diff has a lot of little one-off lines as it is, and I didn't want to clutter it up.