/srv/irclogs.ubuntu.com/2015/04/09/#launchpad-dev.txt

cjwatsonwgrant: Thanks, that looks like excellent advice on db-index-bpph-datecreated.  The COUNT(*) did actually come from a real query, but that's because I was using list() on the collection; not totally unreasonable since I wanted the whole collection anyway, but I'd forgotten that it concealed a race.02:56
cjwatson(And yes, I know it's a silly time.  Fell asleep getting the children to bed and in a slightly odd state of sleepiness as a result; I'm going back to bed soon.)02:56
wgrantHeh02:56
wgrantcjwatson: The racy version probably wouldn't be too bad, but the fixes to make it non-racy should be pretty easy I think.02:57
cjwatsonI agree.02:57
cjwatsonPerhaps it makes sense to add a similar ordering parameter to getPublishedSources as well.  We don't need it in this case, but it's easy to imagine, and it's better to keep APIs symmetric where they don't need to be asymmetric.03:02
wgrantcjwatson: I don't know, anyone using the API would probably be upset by such consistency or sense.03:03
wgrantThe LP API just wouldn't feel the same without smatterings of exact_match=False and the like.03:04
cjwatsonWe should be applying PHP design patterns?03:04
wgrantPrecisely.03:04
cjwatsonNoted.03:04
cjwatsonI should probably Stormify getAPB too before my eyes bleed too much.03:06
wgrantIIRC it has very few internal callsites, so it should be easy enough to port.03:07
cjwatsonTwo.03:07
cjwatson(One of which is annoyingly *almost* test-only.)03:07
cjwatsonOh, well, two for _getBinaryPublishingBaseClauses, probably more for getAllPublishedBinaries.03:08
blrpit y            console.log(Y.Node.DOM_EVENTS.key.eventDef.KEY_MAP);03:40
blrerr pity. Only 5 keys in that map03:40
blrkind of loath to use the charCodes in tests, but adding a new KeyEvent map there seems redundant.03:43
blrwgrant: anyhow, have some integration tests for nav, and found a bug in the process which was nice.03:43
blrwgrant: afaict we don't have js unittests?03:44
wgrantblr: There aren't many proper unit tests, no.03:47
blrwgrant: a bit more noise in the diff now, I fixed some js lintiness.03:48
blrwgrant: if we can modernised our js build process, we could consider adopting something like karma.03:50
blrhave used that in the past and it is rather good.03:50
blrdid you have a chance to look at babel?03:53
wgrantIt sounded too good to be true :P03:53
blrhah right03:53
blrwgrant: I have a friend at mozilla, I should ask him about it - they're using it apparently.03:54
blrwgrant: transitioning to something like webpack/babel/gulp seems sensible, but I'm not certain how we do that while also supporting yui3. Suspect it is going to be messy.04:02
wgrantI suspect it would be reasonably possible to use webpack to load YUI3, but it won't be totally trivial.04:08
blrsomething to experiment with a bit later perhaps.04:18
wgrantYep.04:19
wgranttsk05:04
blrwgrant: for some reason lp-land wants to uses a curses browser, but firefox is set as my x-www-browser alternative - have you seen that?05:25
wgrantblr: You're not accidentally running it inside a container?05:25
blrerr... maybe? >.>05:25
blrthanks05:25
wgrantHeh, I do that all the time...05:27
cjwatsonwgrant: Hm, inserting StormRangeFactory here is less than trivial; all the uses to date have been in browser code, not webservice.  I think lazr.restful might need some extensions here - perhaps by adding a range_factory to ICollection?11:57
cjwatsonAnd maybe an optional parameter to export_as_webservice_collection12:06
wgrantcjwatson: Hmm, you may well be right...12:13
wgrantIt's also possible that launchpadlib won't like it.12:14
wgrantI remember we ran into this years ago, but we may not have solved it.12:14
cjwatsonI can start in on the lazr.restful changes, though I have the sense of a rabbit-hole12:14
wgrantQuite.12:15
cjwatsonAll I want is ddebs damnit12:15
wgrantStill, most of the benefit can be gained without SRF12:16
cjwatsonWe can't run it reliably without SRF, can we?12:16
wgrantBecause the traversal will be shallow with the collection sanely ordered.12:16
cjwatsonBecause the memos will be wrong12:16
wgrantOh, yeah.12:16
cjwatsonAlthough the batch is only going to be shuffled backwards12:17
wgrantYeah, in this case it's probably safeish.12:17
wgrantIt can be shuffled the other direction if things get deleted.12:17
cjwatsonThat is, the ordering means that the worst case is that elements 76-150 (say) in the batch were previously elements 75-149 or earlier12:17
wgrant(which they often do, nowdaays)12:17
cjwatsonOh?  Bah, good point.12:17
cjwatsonSo I think I need to at least try to attack this.12:18
wgrantThe alternative, of course, is to let the status filter be omitted.12:18
cjwatsonWe arguably want that anyway12:19
wgrantQuite.12:19
cjwatsonFor more reliable retracing, ddeb-retriever wants to catch up with everything, not just what's Published right now12:19
wgrantWell, that will be achieved eventually with the retracers not using ddebs.u.c at all.12:19
cjwatsonYes, but not for a while.12:19
wgrantBut I've long wanted a getPublishedBinaries that was designed to be used.12:20
cjwatsonHow about I timebox this: I'll spend until end of day today seeing how far I get with inserting SRF12:20
wgrantWorks for me.12:21
cjwatsonIf the madness continues I can give up and go for the stupid and duplicative approach.12:21
=== danilo__ is now known as danilos
cjwatsonwgrant: Could I have PyPI access to lazr.batchnavigator, please, so that I can finish up bug 872086 while I'm buried in all of this anyway?13:34
mupBug #872086: Distribution:+ppas and Distribution:+questions issue unlimited queries when memo=0&direction=backwards <qa-ok> <regression> <timeout> <Launchpad itself:Fix Released by rvb> <lazr.batchnavigator:Fix Committed by rvb> <Storm:Fix Released by rvb> <https://launchpad.net/bugs/872086>13:34
cjwatsonwgrant: Maybe also lazr.restful13:34
wgrantcjwatson: You're cjwatson?13:38
cjwatsonwgrant: Yes.13:43
wgrantcjwatson: Done.13:43
cjwatsonThanks13:43
cjwatsonwgrant: Looking harder, I'm not sure what you mean about the status filter.  It can be omitted already and you get publications with any status.16:36
cjwatsonwgrant: I think I have a first cut at the lazr.restful changes, although I'm sufficiently unfamiliar with the lazr.restful test suite that I won't be especially confident in them until I've tried hooking that up to LP.16:37
wgrantcjwatson: Oh, forgot status was optional.22:23

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