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

lifelessbdmurray: 'bugtask-search00:26
lifelessbdmurray: 'bugtask-search|patches-view'00:26
lifelessmmm, possible with brackets, depends on the engine00:26
lifelessit might be nice to give community devs - those that have reached reviewer level, for instance, access to the OOPS summaries01:57
lifelessalso01:58
lifelesswow, 1135 second page request. ouch.01:58
marslifeless, it looks like your patch worked.  The generic everyday "Threads left garbage" message was raising an error, which locked up the entire process stack in os.wait() calls.03:26
marsand that is why it was random - some thread somewhere wasn't shut down before the testrunner proceeded.  Maybe a race condition.03:27
mwhudsonmars: yay for progress on that one03:28
marsmwhudson, yes, I'm happy we finally found the source.  Now we just have to land the fixes for each of the links in the chain of cascading failures.03:30
mwhudsonthe boring bit :-)03:31
marshehe03:31
mwhudsonmars: do you know what's going on with ec2 thinking failing tests runs are successes?03:31
marsthat is a mystery to me.03:31
marsI couldn't reproduce it.  But thanks to this fix I now know where to look in the zope code for errors.03:32
cody-somervillelifeless, That rpm.newrelic.com website crashes my browser :P03:37
lifelessoops :P03:38
lifelessmars: glad to have helped03:39
wgrantlifeless: Why is bug #516709 Soyuz? Isn't it Code? All of the changes seem to be to the branch, not upload rights.07:06
mupBug #516709: revisit official package branch permissions <Soyuz:New> <Ubuntu Distributed Development:New> <https://launchpad.net/bugs/516709>07:06
=== stub1 is now known as stub
=== stub1 is now known as stub
bilalakhtarHi there lp devs, do I need to run lp on my own computer before submitting a patch? I know it would be better to do that, but isn't lp too bulky to download?07:32
beunobilalakhtar, ideally you would, you cacn try submitting the merge proposal and seeing if you can get a developer to run the tests for you07:35
bilalakhtarbeuno: oh ok thanks07:36
beunobilalakhtar, what is this patch about?07:37
bilalakhtarbeuno: I haven't begun work yet, but I want to add the following feature in lp answers: One should be able to assign someone to a question or change its status using an AJAX overlay.07:38
bilalakhtarbeuno: such a feature already exists in malone07:38
beunoah07:39
beunoso, just to give you a tip, you may need to build the API for that, because those are old parts of the code and probably don't have APIs to leverage javascript07:39
beunowhich means you will need to run LP, because it's a significant chunk of work  :)07:40
bilalakhtarahha07:40
bilalakhtarthanksf for the info, beuno07:40
bilalakhtarbeuno: What do you mean by "API" ?07:41
bilalakhtarbeuno: launchpadlib?07:41
beunoa level down, internal API07:41
bilalakhtarbeuno: you mean the RESTful API that lp exposes?07:41
beunoyes07:42
* bilalakhtar understands his task, and still he is determined to work on this feature07:42
beunobilalakhtar, that is awesome07:43
beunoI look forward to it!07:43
bilalakhtarbeuno: Thanks, it will take a week, since I don't get to code very often07:44
bilalakhtarbeuno: Another question: Why are there 4 lp branches? On which one should I work?07:45
spmthe latter Q is easy. devel. the former... lengthy to explain.07:45
wgrantNo Answers stuff is exposed over the API yet. This is not going to be a simple task.07:47
bilalakhtarspm: I think the answer is this: All branches merge into devel, then go into edge soon, where they will be deployed to edge.lp.net . staging branch is the code behind staging.lp.net . the lp:launchpad branch is for running the production part of lp.07:47
beunoI don't say this very often, but what spm said07:47
spmbasically, the 4 branches allow devs to keep developing without DB changes blocking all updates. such that edge keeps getting updates till we do a release. staging, is where db mods are trialed.07:48
wgrantIgnore stable (edge) and db-stable (staging).07:48
spmunless your a losa :-)07:48
wgrantAnd probably read http://dev.launchpad.net/Trunk07:48
wgrantspm: Shh.07:48
bilalakhtarbeuno and wgrant: I will try to copy the code from malone :)07:48
spmheh07:48
wgrantbilalakhtar: It's not that easy.07:49
bilalakhtarlosa?07:49
spm(launchpad, landscape, ubuntu-one and other stuff) operational sys admin07:49
bilalakhtarwgrant: ok, then I will try once, if I fail then will searchi for a bug to patch07:49
pooliebilalakhtar, that's great07:49
wgrantIt's probably best to try some smaller things first.07:49
spmthe l has becomes somewhat overloaded. I prefer the "l == legendary" explanation myself.07:50
pooliegood idea though07:50
bilalakhtarwgrant: good tip, will search for some tiny bugs07:50
wgrantAPI + JS is not the best combination to start with.07:50
wgrantBut Answers could certainly do with lots of AJAX.07:50
spmhey noodles77507:50
noodles775Hiya07:50
bilalakhtarnoodles775: hi there, buildd admin07:50
noodles775ehem07:51
noodles775erm, what's wrong...07:51
* noodles775 starts loading pages :)07:51
bilalakhtarI can't believe that lp was proprietary once! Actually, I joined lp quite late07:51
pooliehttps://bugs.edge.launchpad.net/launchpad-answers/+bug/58670 would probably be easy and useful07:52
mupBug #58670: Highlight comments from the reporter <feature> <ui> <Launchpad Answers:Triaged> <Launchpad Bugs:Triaged> <https://launchpad.net/bugs/58670>07:52
noodles775Yeah, lp has certainly benefited lots from being open :) (IMO)07:52
poolieor https://bugs.edge.launchpad.net/launchpad-answers/+bug/22669007:52
mupBug #226690: Not obvious that expired questions can be reopened <confusing-ui> <Launchpad Answers:Triaged> <https://launchpad.net/bugs/226690>07:52
bilalakhtarpoolie: thanks07:52
beunoI remember when it was closed, wgrant was cranky all the time instead of hyper-productive   :)07:52
poolieand cranky :)07:53
wgrantbeuno: See, I wasn't just complaining for the sake of complaining.07:54
* beuno hugs wgrant 07:55
* poolie hugs you both07:55
beuno:)07:55
* bilalakhtar is amazed to find lp managed by bots :)07:56
pooliei certainly feel better about contributing now it's open07:56
poolieeven though it was possible before, it just feels better now it's properly open not just internally open07:56
poolieand there's more infrastructure and documentation towards helping others07:56
bilalakhtarGod has said: The world will end at a time when non-living things will take control over the jobs of people.07:57
* bilalakhtar agrees with poolie beuno and wgrant 07:57
=== almaisan-away is now known as al-maisan
bilalakhtarA question: How large is the lp devel branch?08:08
noodles775wgrant: just in case you're gone when I try later, is there anything non-obvious that I should watch out for when trying to run a SPRecipeBuild locally (that's not on the runningsoyuzlocally wiki)?08:08
lifelesswgrant: they seemed to be about upload rights to me08:12
lifelesswgrant: besides which, code, soyuz, its all the same08:12
wgrantnoodles775: Barring the bug that you're trying to fix, it's pretty simple. Just 'make run_codehosting' (also starts the appserver), push a branch up, and create a recipe through the UI, request a build, start buildd-manager.08:16
wgrantAlso, recipe builds will crash the buildd due to another bug.08:17
noodles775Thanks.08:17
adeuringgood morning08:17
wgrantBug #58710908:17
mupBug #587109: Needs to cope with not receiving package_name from the master <Launchpad Auto Build System:Incomplete> <https://launchpad.net/bugs/587109>08:17
wgrantnoodles775: Is buildd-manager crashing?08:21
wgrantMaybe it's having recipe fun.08:21
wgrantThe queue is large, and logtails appear to not be updating, at any rate.08:21
pooliebilalakhtar, about 213MB08:22
=== al-maisan is now known as almaisan-away
bilalakhtarpoolie: oops, will take more than 2 hours on my connection08:22
=== almaisan-away is now known as al-maisan
wgrantpoolie, bilalakhtar: Plus 210MB for one set of deps, and another 100MBish for the other set.08:22
wgrantPlus 100-200MB for the apt dependencies.08:23
bilalakhtarwgrant: Should I use rocketfuel?08:23
wgrantbilalakhtar: You should use rocketfuel-setup, yes.08:23
wgrantDoing it manually is possible, but difficult.08:24
bilalakhtarwgrant: ok. so which branch should I work on? I am confused between db-devel and devel, even though I read that runk page08:24
wgrantbilalakhtar: If you need to make database changes, work on db-devel. Otherwise, use devel.08:25
noodles775wgrant: the last synced log looks fine (up to 8:08 UTC).08:25
wgrantnoodles775: Argh. Maybe it's just being slow at processing uploads.08:26
noodles775erm, that's obviously not utc.08:26
wgrantHey, you never know...08:26
wgrantMm, yeah, it's mostly filled up now.08:29
wgrantAlthough something is still wrong.08:29
spmnoodles775: I've not had a chance to chase; but would the irregularity around retry-depwait be a possible issue here?08:34
noodles775spm: possibly - einsteinium's last entry in the log is certainly 2010-06-04 07:42:40+0100 [-] ***** einsteinium is MANUALDEPWAIT *****08:35
spmew. the retry-depwait log is *full* of entries like that. 2010-06-04 07:09:33 INFO    Found 1076 builds in MANUALDEPWAIT state.08:36
noodles775but the others (shipova, rosehip) simply have:2010-06-04 07:40:34+0100 [QueryWithTimeoutProtocol,client] <rosehip:http://rosehip.ppa:8221/> marked as done. [0]08:36
noodles775yep, last mention some of the other idle builders is also MANUALDEPWAIT.08:39
noodles775s/idle/idle 386/08:39
wgrantnoodles775: Um, is that nearly an hour ago?08:39
noodles775Yes.08:40
wgrantThey're the latest?08:40
noodles775Yep... latest mention in the log.08:40
wgrantBut it's still showing regular scans?08:41
noodles775Yep. And starting new builds on other buildds.08:41
noodles775wgrant: sorry...08:41
noodles775wgrant: It's dispatching new builds, but you're right, last mention of starting scanning cycle is at: 2010-06-04 07:40:39+0100 [-] Starting scanning cycle.08:42
wgrantnoodles775: It's dispatching?08:43
noodles7752010-06-04 08:31:56+0100 [-] startBuild(http://dubnium.ppa:8221/, shotwell, 0.5.2-1~karmic1, Release)08:43
wgrantAs in, has been for the last hour?08:43
wgrantThat's pretty special.08:44
wgrantSince the startBuild calls are asynchronous.08:44
wgrantUnless the DB calls are slow?08:44
wgrantWhich they might well be....08:44
wgrantBut not that slow.08:45
wgrantSurely.08:45
wgrantAnd no hints of any recipe builds firing accidentally?08:46
noodles775I'll chekc in a tick.... but checking the frequency of "Starting scanning"... aside from one anomaly, they're all around 2hrs apart :/08:47
wgrantFor whole long?08:48
wgrantEr.08:48
wgrant*how* long.08:48
noodles775It was fine last night (a few times per minute)...08:49
wgrantAh, good. I was hoping the logging wasn't inconsistent.08:50
noodles775Seems to have gotten progressively worse since 2010-06-03 19:15:53+0100 [-] Starting scanning cycle.08:50
wgrantSince that would be... not unheard off in buildd-manager.08:51
wgrantHmm.08:51
wgrantAnd there are startBuild calls spread throughout the intervals?08:51
wgrantThis isn't a failure mode I've seen before.08:52
noodles775yeah, me either... it's very strange.08:52
=== al-maisan is now known as almaisan-away
spmwould it help if I mention that I have the utmost confidence in you guys to figure it out? morale booster? ;-)08:53
wgrantspm: Ah, you EOD in 5 minutes, that's why you're so happy :P08:54
spmmy secret is out :-)08:55
=== almaisan-away is now known as al-maisan
noodles775wgrant: the i386 buildds have filled up a bit (but all without logs).09:03
wgrantnoodles775: Are the startBuilds delayed (implicating the synchronous bit), or are they all within a couple of seconds (implicating the async bit, and ewwww Twisted)?09:09
noodles775wgrant: there are definite breaks between some startBuilds calls... I'm including that on the bug I'm creating so we can collect info there.09:09
wgrantOK, great.09:11
wgrantThis is a really, really odd one.09:11
noodles775wgrant, bigjools : I've created bug 589577 which has a small snippet of the log before I lost my connection to the log server (and can't reestablish)09:16
mupBug #589577: buildd is not scanning regularly <Soyuz:New> <https://launchpad.net/bugs/589577>09:16
noodles775bigjools: it's also got a link to the irc conversation so far.09:16
wgrantUgh.09:16
wgrant13 minutes.09:17
bigjoolsmy immediate thought is that the network has a problem09:19
* noodles775 hopes bigjools is right :)09:20
bigjoolsI am checking with IS09:21
stubnoodles775: So that build page that was timing out. Does this query provide all the information we need for the bits that are timing out? http://paste.ubuntu.com/444495/10:02
noodles775stub: checking10:13
stubnoodles775: Things also run more than twice as fast on a slave node (that particular query takes just over 5 seconds on the master, but 1.4 seconds on a slave). I don't think anyone will care if the stats are maybe a few seconds out of date.10:14
noodles775stub: did you try with the SUM too?10:18
stubThat's what is in the pastebin, isn't it?10:19
noodles775stub: ah, i didn't scroll past the first..10:19
noodles775stub: er, I was looking at the wrong paste... got it.10:19
noodles775stub: great, so I can update the storm code to (1) run on the slave and (2) use the count/sum in the findspec rather than querying once for each. Certainly looks much better.10:21
stubYup.10:22
noodles775Or should I just use the query verbatim (so we know exactly what's being executed)?10:22
noodles775(and thanks!)10:22
stubUsing Storm to generate the query should give you pretty much the same thing10:22
stubYou can check by turning on the storm SQL tracing. Or getting a user requested oops report.10:23
stubI've been looking into indexes - BuildFarmJob.status and Archive.require_virtualized help a little with the existing query, but not much and not at all with the count/sum query10:24
wgrantstub: Why's the master so slow? Load?12:02
wgrantnoodles775: buildd-manager still looks a bit unhappy... any progress?12:04
noodles775wgrant: bigjools is still investigating it (we tried disabling retryDepwait in case it was table locks), but not yet that I'm aware of (I've switched back to the builders index now that stub's provided one query to rule them all :) ).12:05
wgrantAha.12:05
bigjoolswgrant: the findBuildCandidate query is taking 10 minutes instead of 10 milliseconds12:06
bigjoolswe have a missing index12:06
noodles775Which one? (I thought stub added BFJ.status?)12:06
wgrantbigjools: After seeing the location of the break in the logs, I had a suspicion it might be DBish.12:07
bigjoolsnoodles775: don't know, stub is looking at the query for me12:07
noodles775ah, great.12:07
noodles775oh, that's *the* query... ew.12:08
wgrantYes. *That* query.12:08
wgrantI wonder if there is actually a bigger one in LP.12:08
bigjoolsyes, the BUDQ12:08
wgrantMaybe the one to expire PPA files.12:08
bigjoolsadd "F"s to taste in that acronym12:08
wgrantHm.12:09
wgrantI wonder if this is related to the getBuildRecords timeouts that started with 10.05.12:09
=== al-maisan is now known as almaisan-away
stubbigjools: Looking at that query, I'm tempted to say scrap it and start again.12:24
bigjoolsstub: it's necessarily complicated12:25
bigjoolsbecause it's built up from different parts of the code12:26
stubMaybe scrap all the EXISTS, refactoring it to precalculate them into temporary tables.12:26
bigjoolsstub: see lib/lp/buildmaster/model/builder.py: _findBuildCandidate12:26
stubSo that sounds like what needs to be refactored. If the code is generating something that complex and unoptimizable because it has to, there is a problem.12:27
wgrantstub: Oh, you've recovered from the horror-induced coma already?12:28
bigjoolsstub: I think that's a good approach, but how can we fix this critical problem right now?12:29
bigjoolscan you see a missing index?12:29
bigjoolsit was working fine until noodles' model change12:29
stubStrangely enough, I just ran that query = 440ms12:31
stubSo the horrible bits only got executed 115 times because the raw queue isn't that big.12:32
bigjoolsyeah, some of them run fast, some are slow12:32
bigjoolsI think it depends on the architecture12:32
stubSo I need a slow one12:33
bigjoolswe could run the b-m with storm tracing on12:34
stubThe planner will chose different plans depending on table statistics - eg. using a sequential scan instead of an index lookup if it believes a large percentage of the table needs to be retrieved anyway.12:34
stubSo all those exists get executed for each and every row not filtered by the preceding criteria. That means between 0 and 54k times I think.12:36
stubI can try and chose some bad proceeding criteria.12:37
noodles775stub, bigjools: if it's any help, you can see how little changed in that query with bzr diff -c10937 lib/lp/buildmaster/model/builder.py (shown here: http://pastebin.ubuntu.com/444570/)12:38
bigjoolsI suspect the massive buildqueue is not helping12:38
bigjoolsI'm gonna blow away any disabled archive buildqueues12:38
stubDo you have the algorithm for finding the next build candidate in English?12:41
bigjoolsI can try12:43
bigjoolsstub: http://pastebin.ubuntu.com/444576/12:49
stubSo if we have 35k items in the queue (such as we have now for processor=1 and virtualized=true), we order them by lastscore and check them one at a time until all our criteria match. That might be a lot of time.13:21
stubIf an item doesn't match criteria, why do we keep its lastscore high? If we bumped it to the end of the queue (or just increased it by some factor), the queue items with poor scores would bubble to the end.13:22
bigjoolsstub: scores never change unless changed manually13:30
stubbigjools: So for the slow cases I've found, it is the 80% utilization check that is the killer13:30
bigjools:(13:30
bigjoolscrap13:30
stubNot really13:30
bigjoolsare you going to tell me there's a quick fix? :)13:31
stubIf we have 10k items in the queue, all in the same archive, we currently end up issuing that query 10k times (failing each time) to get past them13:31
stubSo we move that out of the SQL. Instead, we do that check when filtering the first real item from the potential candidates, and cache it for subsequent checks in the loop13:32
stubOr alternatively, we calculate the list of banned archives once first and filter that way.13:33
stubDoes the theory sound sane?13:36
bigjoolsI'm not sure13:37
bigjoolsthe utilisation is very dynamic13:38
bigjoolsthe point is that the query is doing what we'd have to do in Python anyway, so caching seems the only option13:38
bigjoolsI'm going to blitz 54k queue items which should speed this up a but13:39
wgrantDo we know that the 80% query is actually doing much useful?13:39
bigjoolsyes, it is13:39
wgrantand why is destroying those items a good idea? Is it not possible to filter out the suspended ones first?13:39
bigjoolsit stops the daily builds from monopolising the farm13:39
wgrantMmm not really. There are several daily PPAs.13:40
wgrantSo it stops a single PPA from monopolising it, and just makes several do it :P13:40
bigjoolswell it depends on when they start building13:40
bigjoolsyes it's still possible given enough PPAs13:40
bigjoolsbut at least they still get a look in13:40
bigjoolshmmm actually it won't help by blitzing them13:41
bigjoolsstub: ok for now I suggest we cowboy out the 80% check until we find a better solution13:43
stubIts a quick way of confirming the theory. I don't know if the slow query I manufactured is the same as the slow queries we are seeing on production.13:43
stubActually, I can confirm since I can see the important bit. Goes slow when virtualized=true and processor=113:44
bigjoolsstub: the first part of the query filters out jobs that are not waiting13:48
bigjoolsso it should not be checking that many rows in that 80% check13:48
stubIf I comment out that chunk, the query stops taking minutes (I give up and cancel), and instead takes 614ms.13:50
bigjoolsok I will run this stuff that blows away the suspended jobs13:51
bigjoolsand see if it makes any difference13:51
stubI've lost the analyze from before that pointed to it... I seem to recall about 56k checks but I'm not sure where they came from since I would have thought only 35k would be checked13:51
bigjools56k is the number of buildqueue rows13:51
bigjoolslike I said, it's not supposed to be checking all those!13:52
bigjools54k of them are suspended13:52
stubSo PG decided to do the check before filtering because it thought it would be faster :-(13:52
bigjools:(13:52
bigjoolsthis was fine before the rollout, I can't work out what's broken it13:52
bigjoolss/rollout/re-roll/13:52
stubStill slow if I force the filtering properly - only a max of 1.8k checks14:02
bigjoolsgah14:02
bigjoolsok it's gotta go14:03
stubWhy is the archive=2 check inside the exists?14:04
bigjoolsit only applies to PPAs14:04
bigjoolspublic PPAs14:05
bigjoolsflacoste: just the man!14:06
bigjoolsflacoste: we've got problems with the buildd-manager being very slow, I need to make a cowboy, can you approve this please:http://pastebin.ubuntu.com/444605/14:07
bigjoolsit removes the slow query part14:07
stubYes, but the Archive table is from the outer scope14:07
flacostebigjools: ???14:08
flacostebigjools: what does the slow part do?14:08
bigjoolsflacoste: something has changed to make the dispatcher query very slow, we don't know what's caused it14:08
flacostebigjools: iow, what functionality/conditions are we disabling?14:09
bigjoolsflacoste: limits builder usage to 80% of an architecture for each archive14:09
flacostebigjools: why do we do that? or what are the consequences of not doing that?14:09
bigjoolsflacoste: the consequences are that a single PPA can hog all the builders of a single architecture14:09
bigjoolsbasically the daily build ppas14:10
bigjoolsbut that's currently less worse than a 2 hour scan cycle14:10
flacostebigjools: i agree, should i worry about stub comment abouit the Archive table being from the outer scope?14:10
bigjoolsflacoste: that's part of what we're removing from the query14:11
stubDon't mind me - I'm just trying to decode this query14:11
bigjoolsI'd like to restore the build farm first, then look at this problem with less pressure14:11
stub+114:11
bigjoolsI can restart retry-depwait as well and see if those indexes worked14:12
wgrantWhile you're considering build-related queries, getBuildRecords timeouts are causing cron to spam me far too frequently since 10.05. It might be related, I guess, so I thought I might point it out.14:14
bigjoolswgrant: api?14:14
wgrantbigjools: That's the one.14:14
bigjoolsok14:14
bigjoolsdid you file a bug?14:14
wgrantNo. I was going to wait to see if it persisted -- it has. I'll file one tomorrow.14:15
flacostebigjools: did you start an incident report?14:15
flacostebigjools: r=me with an incident report :-)14:15
bigjoolsflacoste: I've not had time to fart, let alone write an incident report14:16
bigjoolsbut trust me when I say I've been thinking about it :)14:16
flacostegood14:16
stubI just can't decode how that EXISTS is supposed to work at all (the one we are removing). It is trying to filter out jobs if the archive is utilizing 80% capacity. It counts the number of jobs currently active for the archive, but does not count the total capacity so how does it make that calculation?14:21
bigjoolshmmmm14:24
bigjoolsgood point14:24
wgrantIt divides by %s, which is num_arch_builders, doesn't it?14:25
bigjoolsah yes - can't tell from the raw log :)14:28
sinzuimaxb ping14:28
maxbpong14:28
sinzuimaxb: I think I recall you used suggested a fix for a gpg error we were/are seeing when we import a key14:29
sinzuis/used/once/14:29
maxbUm. Can you show the exact error you are talking about, to try to jog my memory?14:29
sinzuimaxb: I updated bug 56845614:32
mupBug #568456: GpgmeError raised importing public gpg key <oops> <Launchpad Foundations:Triaged> <https://launchpad.net/bugs/568456>14:32
sinzuimaxb I recall someone suggested using str() in a cowboy one or two released to fix a gpg error.14:33
maxbI definitely recall discussing str vs. unicode issues. It's not, however, obvious to me that this is the same or a related issue14:34
maxbI believe we got a more informative message than 'General error' at that time14:34
sinzuiyes. I think the real error is masked. This would be easier to fix if we could reproduce it14:37
=== sinzui changed the topic of #launchpad-dev to: Launchpad Development Channel | Week 4 of 10.05 | PQM is open | https://dev.launchpad.net/ | Get the code: https://dev.launchpad.net/Getting | On-call review in irc://irc.freenode.net/#launchpad-reviews | Use http://paste.ubuntu.com/ for pastes
noodles775sinzui: you might have been thinking of this: https://code.edge.launchpad.net/~michael.nelson/launchpad/ppa-generate-key-failure/+merge/2487114:44
sinzuinoodles775, yes!14:46
sinzuinoodles775, this may help14:46
bigjoolsstub, noodles775: buildd-manager healthy again with that query part ripped out14:53
stubbigjools: How many builders for processorfamily 1 are there?14:53
bigjoolsstub: https://edge.launchpad.net/builders14:56
bigjools1714:56
bigjoolswell, 14 for PPAs14:57
bigjoolsI need food, BBIAB15:00
stubbigjools: http://paste.ubuntu.com/444626/ is the query modified to use NOT IN to filter out archives that are over capacity, and runs reasonably fast. I'm not sure of the rules though - can only PPA archives go over capacity?15:03
bigjoolsstub: yes, that rule only applies to PPAs15:27
stubbigjools: http://paste.ubuntu.com/444637/ then?15:30
bigjoolsstub: one other option is to factor out that query so we have a python list of archives that is evaluated once, and then we plumb that result into the bigger query15:32
bigjoolsthe list is never going to be very big15:36
stubbigjools: The bit in the 'NOT IN' should only be evaluated once inside that query. If you are calling that function multiple times though in a transaction, then factoring it out would be better15:57
bigjoolsstub: no, it gets called once for each polled builder15:57
bigjoolsstub: anyway, that's awesome, thanks15:58
krkhan"bin/test -m bugs" starts running *all* tests. what would be the correct way of running only tests related to bugs16:31
krkhan"bin/test -t bugs" does the same16:32
beuno-v?16:34
beunoI don't remember exactly16:34
bigjools-m bugs should only run the tests in the bugs module16:39
krkhan-m bugs spends an eternity on setting up layers e.g. "Set up canonical.testing.layers.FunctionalLayer". is that normal?16:42
bigjoolsunfortunately yes16:48
krkhanouch :-) okay16:50
EdwinGrubbsUrsinha, do you know if anyone from translations will be available today?18:18
EdwinGrubbsadiroiban, ping18:41
bdmurrayIs it not possible to subscribe to wiki pages on dev.launchpad.net?  I tried subscribe user and got a 'you are not allowed to perform this action' message.19:04
krkhanbin/test fails with the error IOError: [Errno 2] No such file or directory: '/var/tmp/mailman/logs/smtpd'. i'm using karmic. any ideas what's causing it?19:11
bdmurraykrkhan: how are you using bin test? what is the full command?19:52
maxbbdmurray: So, the problem is that whoever wrote the moin skin for dev.lp.net did a somewhat poor job, and removed the 'subscribe' action link20:40
maxbthe 'subscribe user' link you see is, I think, for subscribing other people20:41
maxbbdmurray: Workarounds are to either manually append ?action=subscribe to the page url, or to go to https://dev.launchpad.net/UserPreferences and enter page names in the relevant form field20:42
rockstarsinzui, if I have required=True in my interface field, and use use_template() to copy the field to a form schema, shouldn't the validation check it if it's blank?20:43
lifelessgary_poster: thanks for digging into the oops view thing20:44
lifelessgary_poster: I do enjoy finding turtles-all-the-way-down bugs :)20:44
gary_posterlifeless: sure.  lol, yeah, that's what this was. :-)20:45
sinzuirockstar, I think the answer is true. I have not use use_template, but I have used copy_field, and it does copy the required=* behaviour21:02
* sinzui had to override the complete copy behaviour in fact.21:03
rockstarsinzui, well, it doesn't seem to be grabbing that behavior.21:03
sinzuido you know if copy_template is also using copy_field for build a schema?21:03
rockstarsinzui, no, I don't.  Lemme try something.21:04
bdmurraymaxb: thanks for the work around!21:05
rockstarsinzui, so, it looks like the required=True part is checked AFTER validate, so you have to check the data to see if the key exists in the validate method...21:07
rockstarsinzui, that seems...backward.21:07
sinzuirockstar, that is not right, field validation does happen before form validation in LaunchpadFormView.21:08
rockstarsinzui, This oops says otherwise: https://lp-oops.canonical.com/oops.py/?oopsid=1615EA220321:08
sinzuirockstar, LaunchpadFormVIew_validate() validates the widget input before the view's validate() method. That is why the view's method can check for field errors at the start21:13
rockstarsinzui, hm, so I'm not sure why this bug is occurring then.  If I add the "if data.get('name', None):" it works fine, gives me the validation error, etc.21:14
rockstarsinzui, does it continue on, gathering all field errors from _validate and validate before it gives you all errors?21:15
sinzuirockstar all field errors are created as the widgets are iterated. The the view's method validation() gets the data to do additional rule checking, invariant kinds of checking21:16
sinzuirockstar, does this field also have a default? because that can create a value21:17
rockstarsinzui, no, no default.21:17
sinzuirockstar, is there another oops id, that url will not load21:18
rockstarsinzui, I don't think so:  OOPS-1615EA220321:19
rockstarThat's the one from barry's bug.21:19
sinzuirockstar, looking at that oops, is the error that name has a space in it?21:21
rockstarsinzui, the way I reproduced it, it was entirely empty.21:23
sinzuiISourcePackageRecipe?21:23
rockstarsinzui, yes.21:23
sinzuithat is a bad name21:24
krkhanbdmurray: i was using bin/test -t lp.bugs. but i'm getting a lot of other failures as well. i guess the devel branches aren't supposed to pass each and every test, are they?21:24
sinzuiTextLine(title=_("Name"), required=True, constraint=name_validator,description=_("The name of this recipe."))21:24
sinzuirockstar, what view is this? I want to read the @action21:25
sinzuirockstar, is this it: SourcePackageRecipeAddView(RecipeTextValidatorMixin...)21:26
sinzuirockstar, I have seen this21:28
sinzuirockstar, When the vocabulary field is invalid, it is not in the data. It may also be true for NameFields I think you want to check for field errors at the start of validate()21:30
sinzuirockstar, several views have a guard at the start of validate()21:32
sinzuiif len(self.errors) > 0:21:32
sinzui    return21:32
rockstarsinzui, ah, okay, that makes more sense.21:33
sinzuiI don't see any looking at the errors, they just get the len() and leave it is not zero21:33
rockstarsinzui, okay.  I would think that LaunchpadFormView would be a better place for that check.  What do you think?21:37
sinzuiNo, because validate() is allowed to overwrite those errors. The ones we get from zope field are so arcane that gary has to look them up21:38
gary_posterheh21:38
rockstarhahahahahaha21:38
sinzuiThe bug supervisor message is an example of one that is easy to put into a sentence, but the field validation about vocabularies make no sense to a user21:39
zygagmb, ping22:07
zygagmb, I'd love to use your django-xmlrpc library22:08
adiroibanEdwinGrubbs: hi22:36
EdwinGrubbsadiroiban, I was told you could answer some questions I have about LP Translations. I'm working on caching the sum of the POTemplate.messagecount in the DistributionSourcePackage table in a new column called po_message_count. I'm wondering if the best place in the code to update the cache would be POTemplate.importFromQueue() and POFile.updateStatistics() since they both update POTemplate.messagecount.22:51
adiroibanhm... well, in LP translations can be updated by both an import, or by direct submission via web interface22:53
adiroibanah22:53
adiroibansorry22:53
adiroibanfor the POTemplate22:54
adiroibanso. for messagecount of a POTemplate, importFromQueue() should do it...22:54
adiroibanI am not sure why POFile.updateStatitics() is updating the POTemplate.messagecount ...22:55
adiroibanlooking22:55
adiroibanEdwinGrubbs: I don't know why the code from POFile.updateStatistics() is touching the potemplate.messagecount. It was added to fix bug 371453, but I can not find any clue23:03
mupBug #371453: Broken statistics <message-sharing> <ui> <Launchpad Translations:Fix Released by danilo> <https://launchpad.net/bugs/371453>23:03
EdwinGrubbsadiroiban, do you think it's safe to add extra logic to those two methods?23:05
adiroibanThe code from POFile.updateStatistics() that is updating the POTemplate looks strange, in before adding anything I would talk with Danilo ...23:06
adiroibanbut Danilo is on leave23:06
adiroibanPOTemplate.importFromQueue should be right place for updating POTemplate.messagecount cached value23:07
adiroibanEdwinGrubbs: also, POFile.updateStatistics() is called in POTemplate.importFromQueue() ... after23:09
adiroiban            # Update cached number of msgsets.23:09
adiroiban            self.messagecount = self.getPOTMsgSetsCount()23:09
EdwinGrubbshmmm, that doesn't seem good23:09
adiroibanEdwinGrubbs: also23:10
adiroibanthe code from POFile23:10
adiroibanis using potemplate.getPOTMsgSets().count()23:10
adiroibaninstead of potemplate.getPOTMsgSetsCount()23:10
adiroibanbut this is a minor fact23:12
adiroibanso, to askwer your initial question23:12
adiroibanI would say that POTemplate messagecount cache data should be updated only in importFromQueue23:13
EdwinGrubbsthanks23:14
adiroibanEdwinGrubbs: I could not find the MP for the branch that added those lines in POFile.updateStatistics()23:16
adiroibanif you can find it, maybe you could find some tips regarding those lines23:16
EdwinGrubbsok23:16

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