/srv/irclogs.ubuntu.com/2010/04/24/#launchpad-dev.txt

=== magcius_ is now known as magcius
wgrantOOPS-1575B22702:52
wgrantProbably a DB locking issue.02:52
wgrantCan somebody please tell me the problematic statement?02:52
wgrantAlternatively it could be taking ages to close the several bugs attached.02:56
wgrantIt would be handy to know which.02:56
cody-somervillewgrant,  TimeoutError: 'SELECT PackageUploadSource.id, PackageUploadSource.packageupload, PackageUploadSource.sourcepackagerelease FROM PackageUploadSource WHERE PackageUploadSource.packageupload = %s ORDER BY PackageUploadSource.id', [<storm.variables.IntVariable object at 0x2aaaadddca28>]03:44
wgrantGnargh not that one again.03:45
wgrantcody-somerville: How long did it take?03:45
wgrantThat particular query, that is.03:46
cody-somervilleAs long as what ever the timeout value is I assume03:48
wgrantcody-somerville: Basically I'm wondering if that query was the straw that broke the camel's back, or if it took a long time on its own.03:49
cody-somervillewgrant, It doesn't show up in the long SQL statements list.03:49
cody-somervillewgrant, although it does show up in the repeated SQL statements03:50
cody-somervilleand its a subselect for a lot of repeated queries too03:51
wgrantcody-somerville: Can you see how long the final statement in the query log took?03:51
cody-somerville4ms03:52
wgrantOK. Thanks.03:53
cody-somerville"SELECT BugJob.json_data, BugJob.bug, BugJob.id, BugJob.job, BugJob.job_type FROM BugJob, Job WHERE BugJob.bug = %s AND BugJob.job_type = %s AND BugJob.job = Job.id AND Job.id IN (SELECT Job.id FROM Job WHERE Job.status = %s AND (Job.lease_expires IS NULL OR Job.lease_expires < (CURRENT_TIMESTAMP AT TIME ZONE 'UTC')) AND (Job.scheduled_start IS NULL OR Job.scheduled_start <= (CURRENT_TIMESTAMP AT TIME ZONE 'UTC'))) LIMIT 1" a03:53
cody-somervilleppears very costly. 432.0 and repeated 7 times.03:53
wgrantAhhh.03:53
wgrantso it *is* the bugs.03:53
wgrantBut 432ms each? Seriously?03:54
cody-somervillethats the average03:57
cody-somervillesome take longer03:57
cody-somervilleone took 632ms03:57
cody-somerville'TypeError: Only a read-only field can have a mutator method' <-- I guess sinzui was wrong about bug_supervisor being read only already :P03:58
wgrantcody-somerville: He was right, and I was right.03:58
wgrantThere are two aspects to read-onlyness:03:58
wgrant - the schema in the interface. Currently writable, and what lazr.restful looks at.03:59
wgrant - The attribute security, in configure.zcml. Currently read-only.03:59
cody-somervilleDid I mention I hate zope?03:59
wgrantIt goes without saying.03:59
wgrantAlthough, well, for what LP is it could be worse.04:00
cody-somervillebut clearly in the context I was talking about earlier I was referring to the former and not the attribute security.04:00
cody-somervillebut maybe it doesn't matter and he just assumed I'd understand what he meant.04:01
wgrantHe was clearly misunderstanding and speaking about the ZCML, though.04:01
cody-somervilleoh well, in the end it meant I learnt something new so all good.04:02
cody-somervilleso I assume if I set the attribute to readonly its not going to cause problems since the attribute security already makes it readonly?04:02
cody-somervilledoh, I was afraid I'd run into this: TypeError: A mutator method must take one and only one non-fixed argument. setBugSupervisor takes 204:03
wgrantThat's OK.04:03
wgrantYou just need to use something (operation_parameters()? I forget) to pre-populate the second argument with REQUEST_USER.04:03
wgrantgrep around for REQUEST_USER if you're unsure of details.04:04
* wgrant lunches.04:04
cody-somervillewgrant, I already do04:05
cody-somervillewgrant, @call_with(user=REQUEST_USER)04:05
wgrantcody-somerville: You removed the incorrect self argument?04:06
cody-somervillewgrant, yup04:06
wgrantcody-somerville: paste(bin) all your decorators and the method definition itself?04:07
cody-somervillewgrant, https://pastebin.canonical.com/31276/04:08
wgrantcody-somerville: EPERM04:08
cody-somervilleoops04:08
cody-somervillehttp://pastebin.ubuntu.com/421428/04:09
wgrantcody-somerville: You might need to export_write_operation too, and all the other examples I'm looking at have mutator_for first (ie. executed last)04:10
wgrantAnyway, really lunching now.04:10
cody-somervilletrue true04:11
cody-somervillelooks like that works04:11
cody-somervillewoot. works. Now I just need to write tests.04:14
* wgrant returns.04:25
=== magcius__ is now known as magcius
mwhudsonwoo all tests pass in no-hosted-area08:49
wgrantmwhudson: Nice!08:52
mwhudsonnot sure the very last test fixes will pass review but i guess there's monday for that08:57
thumpermwhudson: congrates08:57
thumper:)08:58
thumperplease ignort that last typo08:58
thumperhad almost a bottle of wine08:58
mwhudsonhaha09:00
magciusWhere exactly in the code is the source for the launchpad.net landing page and project pages on there? What is the "app" name for the "Overview" section of a project page?20:07
adiroibanmagcius: launchpad.net landing page? Can you please add an URL of that page?20:15
adiroibanI don't know exactly about what page are you talking about20:15
magciusadiroiban: something like http://launchpad.net or http://launchpad.net/bzr20:15
adiroibanhttp://launchpad.net/bzr20:15
magciusadiroiban: what subapp is that?20:16
adiroibanis the IProduct +index page20:16
adiroibanit should be registry20:16
magciusah, registry20:16
adiroibanI am not sure about the launchpad.net start page ... let me check20:16
adiroibanI usualy just look at some text on that page20:16
adiroibanand do a full text search on all files20:17
magciusheh20:17
magciuswhat I'm really looking for is the timeline graph JavaScript code20:17
adiroibanmagcius: the one under „Series and milestones” ?20:18
magciusadiroiban: yes20:18
adiroibanregistry/templates/timeline-macros.pt20:21
adiroibanmagcius: that should be the starting point... then look for javascript code in lib/canonical/launchpad/javascript/registry20:23
magciusadiroiban: alright, thank yo20:23
adiroibanor if it was moved... in lib/lp/registry/javascsript20:23

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