/srv/irclogs.ubuntu.com/2012/12/21/#launchpad-dev.txt

StevenKwgrant: With Component and Section preloaded, down to 70.00:04
wgrantExcellent00:09
wgrantWhat are the rest?00:09
StevenKwgrant: PackageDiff and related LFA and LFC; SPPH; ArchivePermission00:12
wgrantRight00:13
StevenKwgrant: So I think it's reasonable00:18
StevenKWe've dropped 160 queries00:18
StevenKwgrant: http://pastebin.ubuntu.com/1453695/00:52
StevenKwgrant: No thoughts at all, I see.01:15
wgrantStevenK: Hmm01:26
wgrantLooks reasonable so far01:26
StevenKwgrant: Hmmm, given IPackageUploadSet.getAll() is the meat inside IDistroSeries.getPackageUploads(), and getAll() does the propertycache dance, I guess the other bug is sorted too?01:30
wgrantStevenK: It probably is, but you need to check that the delegations to SPR's checker work01:31
wgrant(by "work" I mean "don't issue tonnes of queries")02:08
StevenKwgrant: Hmmm, something has broken the upload webservice tests03:31
wgrantOh?03:43
StevenKwgrant: TestPackageUploadWebservice calls factory.makeBuildPackageUpload() (and then creates a BPR, but the factory call does that ...), trying to access upload.builds[0].build leads to an IndexError03:44
wgrantStevenK: Sounds like something's creating a PUB without using the method that knows to invalidate stuff03:45
StevenKBut it uses addBuild, which does the invalidation!03:46
StevenK    def addBuild(self, build):03:46
StevenK        """See `IPackageUpload`."""03:46
StevenK        del get_property_cache(self).builds03:46
wgrantIt's probably clearing the cache too early03:46
StevenKWe should delay clearing the property cache?03:48
wgrantClear the cache once the relevant change has been made03:49
wgrantOtherwise the cache may be recalculated with the old data03:49
StevenKThen all three of the methods are wrong03:49
wgrantLots of code is wrong03:49
wgrantMost code is wrong03:50
StevenKOh, they used to del get_property_cache, return, the searchable_{name,version}s stuff is now in the middle03:50
StevenKwgrant: I moved the del to just before the return, but it still dies. Guess I need to create the PUB, delete the property cache and then return03:55
wgrantStevenK: Right, that's what I meant.03:57
wgrantIt's not necessarily safe to clear the cache before you've made the change03:58
wgrantBecause some operation (eg. accessing a protected attribute) may cause the cache to be recalculated03:58
wgrantAt any time03:58
StevenK    print upload.builds[0].build03:58
StevenKIndexError: list index out of range03:58
StevenK:-(03:58
StevenKDo not get it. We create the upload in the factory, create a BPB and a BPR, add it to the PU, where we destroy the cached property, and then return it, and the test says upload.builds is []04:06
wgrantGive me a branch :)04:09
wgrantOr diff04:09
StevenKwgrant: http://pastebin.ubuntu.com/1453948/04:10
wgrantStevenK: Looking04:18
wgrantHm04:19
wgrantStevenK: I wonder if it's not flushing properly04:19
StevenKwgrant: I was thinking about that -- something that is more aggressive about caching for tests04:22
=== tumbleweed_ is now known as tumbleweed
wgrantAn explicit flush fixes it04:26
wgrantOdd04:26
StevenKwgrant: As in a store flush?04:26
wgrantYes04:27
wgrantIt looks like the SQLMultipleJoin isn't causing a flush04:28
StevenKShall I rewrite them into properties that do a IStore.find() ?04:28
wgrantNo04:28
StevenKSince SQLMultipleJoin annoys me04:28
wgrantWe should work out why it's not working04:28
=== broder__ is now known as broder
wgrantOh04:30
wgrantof course04:30
wgrantcheckPermission is wrapped in @block_implicit_flushes04:30
=== broder is now known as broder___
wgrantI'd explicitly flush before invalidating the cache in each case04:31
=== broder___ is now known as broder
StevenKRight04:31
StevenKAh ha, excellent04:33
StevenKwgrant: Shall I change that print to a assert just to check that this doesn't bite again?04:34
wgrantStevenK: No04:34
wgrantBecause it will crash if it fails04:34
wgrantAlready04:34
wgrantWon't it?04:34
StevenKNo, because I stopped creating a BPR04:34
StevenKAnd then the method just iterates over builds, which won't care if it's empty04:35
wgrantAh04:35
StevenKSo I can revert the change to create another BPR, which I think is silly, but does test that builds is usable, or an assert04:35
StevenKHaha, one test depends on the second BPR04:41
StevenKEh, back it goes04:41
StevenKwgrant: So you'd like another test to check query counts?04:46
wgrantPlease04:49
StevenKwgrant: For IDistroSeries.getPackageUploads() via the Webservice or what?04:49
wgrantThat's what I'd do04:50
wgrantGiven that it's going to be lazr.restful triggering the launchpad.LimitedView checks04:51
StevenKwgrant: http://pastebin.ubuntu.com/1453995/05:04
wgrantStevenK: What are those two adjacent SPPH queries?05:09
StevenKIdentical. Odd.05:10
* StevenK tries to work out the backtrace05:12
StevenKwgrant: Do not get it05:19
StevenKAlso not helped by the backtrace being on one line05:20
StevenKGah05:36
StevenKCan't even convert it to something readable05:36
stubWhen does patch-2209-40-3.sql get applied? I merged db-devel when I shouldn't have08:25
=== almaisan-away is now known as al-maisan
=== yofel_ is now known as yofel
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
=== al-maisan is now known as almaisan-away
=== daker_ is now known as daker
=== mthaddon is now known as frogman
=== teknico_ is now known as teknico
mptWhoa, I'd forgotten Launchpad used to have "mentorships" ... That's a blast from the past16:44
=== gary_poster is now known as gary_poster|away
=== gary_poster|away is now known as gary_poster
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== gary_poster is now known as gary_poster|away
=== gary_poster|away is now known as gary_poster
=== gary_poster is now known as gary_poster|away

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!