=== magcius_ is now known as magcius [02:52] OOPS-1575B227 [02:52] Probably a DB locking issue. [02:52] Can somebody please tell me the problematic statement? [02:56] Alternatively it could be taking ages to close the several bugs attached. [02:56] It would be handy to know which. [03:44] wgrant, TimeoutError: 'SELECT PackageUploadSource.id, PackageUploadSource.packageupload, PackageUploadSource.sourcepackagerelease FROM PackageUploadSource WHERE PackageUploadSource.packageupload = %s ORDER BY PackageUploadSource.id', [] [03:45] Gnargh not that one again. [03:45] cody-somerville: How long did it take? [03:46] That particular query, that is. [03:48] As long as what ever the timeout value is I assume [03:49] cody-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] wgrant, It doesn't show up in the long SQL statements list. [03:50] wgrant, although it does show up in the repeated SQL statements [03:51] and its a subselect for a lot of repeated queries too [03:51] cody-somerville: Can you see how long the final statement in the query log took? [03:52] 4ms [03:53] OK. Thanks. [03:53] "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" a [03:53] ppears very costly. 432.0 and repeated 7 times. [03:53] Ahhh. [03:53] so it *is* the bugs. [03:54] But 432ms each? Seriously? [03:57] thats the average [03:57] some take longer [03:57] one took 632ms [03:58] 'TypeError: Only a read-only field can have a mutator method' <-- I guess sinzui was wrong about bug_supervisor being read only already :P [03:58] cody-somerville: He was right, and I was right. [03:58] There are two aspects to read-onlyness: [03:59] - the schema in the interface. Currently writable, and what lazr.restful looks at. [03:59] - The attribute security, in configure.zcml. Currently read-only. [03:59] Did I mention I hate zope? [03:59] It goes without saying. [04:00] Although, well, for what LP is it could be worse. [04:00] but clearly in the context I was talking about earlier I was referring to the former and not the attribute security. [04:01] but maybe it doesn't matter and he just assumed I'd understand what he meant. [04:01] He was clearly misunderstanding and speaking about the ZCML, though. [04:02] oh well, in the end it meant I learnt something new so all good. [04:02] so I assume if I set the attribute to readonly its not going to cause problems since the attribute security already makes it readonly? [04:03] doh, I was afraid I'd run into this: TypeError: A mutator method must take one and only one non-fixed argument. setBugSupervisor takes 2 [04:03] That's OK. [04:03] You just need to use something (operation_parameters()? I forget) to pre-populate the second argument with REQUEST_USER. [04:04] grep around for REQUEST_USER if you're unsure of details. [04:04] * wgrant lunches. [04:05] wgrant, I already do [04:05] wgrant, @call_with(user=REQUEST_USER) [04:06] cody-somerville: You removed the incorrect self argument? [04:06] wgrant, yup [04:07] cody-somerville: paste(bin) all your decorators and the method definition itself? [04:08] wgrant, https://pastebin.canonical.com/31276/ [04:08] cody-somerville: EPERM [04:08] oops [04:09] http://pastebin.ubuntu.com/421428/ [04:10] cody-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] Anyway, really lunching now. [04:11] true true [04:11] looks like that works [04:14] woot. works. Now I just need to write tests. [04:25] * wgrant returns. === magcius__ is now known as magcius [08:49] woo all tests pass in no-hosted-area [08:52] mwhudson: Nice! [08:57] not sure the very last test fixes will pass review but i guess there's monday for that [08:57] mwhudson: congrates [08:58] :) [08:58] please ignort that last typo [08:58] had almost a bottle of wine [09:00] haha [20:07] Where 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:15] magcius: launchpad.net landing page? Can you please add an URL of that page? [20:15] I don't know exactly about what page are you talking about [20:15] adiroiban: something like http://launchpad.net or http://launchpad.net/bzr [20:15] http://launchpad.net/bzr [20:16] adiroiban: what subapp is that? [20:16] is the IProduct +index page [20:16] it should be registry [20:16] ah, registry [20:16] I am not sure about the launchpad.net start page ... let me check [20:16] I usualy just look at some text on that page [20:17] and do a full text search on all files [20:17] heh [20:17] what I'm really looking for is the timeline graph JavaScript code [20:18] magcius: the one under „Series and milestones” ? [20:18] adiroiban: yes [20:21] registry/templates/timeline-macros.pt [20:23] magcius: that should be the starting point... then look for javascript code in lib/canonical/launchpad/javascript/registry [20:23] adiroiban: alright, thank yo [20:23] or if it was moved... in lib/lp/registry/javascsript