/srv/irclogs.ubuntu.com/2011/04/22/#launchpad-dev.txt

Ursinhalifeless, hi?01:14
* Ursinha is a sad panda01:14
jpdsmaxb: Investigating.01:17
maxbcody-somerville: ^01:18
jpdsFound the problem.01:21
magciushey jam01:22
magciuswhat do you think of pulling a github and doing: http://i.imgur.com/lhCVP.png01:24
lifelessUrsinha: hi? Its easter here ...01:50
lifelessUrsinha: but I hate the idea of you being sad :)01:50
magciusgah02:12
magciustrying to follow the instruction at https://dev.launchpad.net/Running02:12
magcius$ make scehma02:12
magciusMissing ./download-cache.02:12
magciusDevelopers: please run utilities/link-external-sourcecode.02:12
magciushow am I supposed to run link-external-sourcecode?02:13
magciusoh02:16
magciusI see what happened02:16
Ursinhalol03:00
Ursinhalifeless, sorry to disturb you03:01
lifelessUrsinha: no problem03:02
lifelessUrsinha: whats up ?03:02
Ursinhalifeless, was about a qa-tagger branch to review03:11
Ursinhacan wait until Monday, don't worry03:11
Ursinhahappy easter for you :)03:12
* wgrant curses AWS.03:17
LPCIBotProject windmill build #207: STILL FAILING in 1 hr 5 min: https://lpci.wedontsleep.org/job/windmill/207/03:18
lifelessUrsinha: kk04:02
jtvhi lifeless!04:20
jtvlifeless: I just had another silly thought about offsetless batch navigation.04:21
jtvIt's about presentation issues though, not performance.  Let me know if you're interested.04:22
=== almaisan-away is now known as al-maisan
lifelessjtv1: I'm pretty much always interested ;)05:30
jtv1lifeless: cool!  Okay, here's the thought: the style of batching I propose has some weirdness with the first page.05:31
jtv1It's actually better, not worse, than our current offset-based weirdness, but more noticeable:05:31
jtv1you may not get a full batch on the first page, just like you may not get one on the last page.05:32
jtv1We could fill it out with items that were also on the previous page.05:32
jtv1That means there's overlap, but maybe we could turn that into a virtue.05:33
jtv1Maybe it'd be helpful if every batched page would show a bit of overlap with its adjacent pages, in a visually distinct style.05:33
jtv1Think grey background or something.05:34
jtv1So if you follow a "previous" link to a first page, and it needs to be filled out with overlapping data from the page you just visited, you'd instantly recognize it as overlap — just a bit more of it than usual.05:35
=== jtv1 is now known as jtv
jtvIn principle we could do the same with our existing batching, but there we don't even have a way to display the items that slip through the cracks between batches.05:36
jtv(Plus, come to think of it, we don't even have a notion of item identity across pages)05:37
jtvSo imagine seeing a first page in a batched series: the bottom item has a grey background.05:37
jtvYou follow the "next" link, and get to a page with a grey item from the first page, followed by regular items, and closed off by another grey item from the next page.05:38
jtvIf you then follow "previous" and some items have disappeared off that page, you'd still get a full batch.  But more items at the end would be grey, because they're from page #2 which you just saw.05:38
stubjtv: That is a builtin feature of Zope batching. I forget the term.05:38
jtvAh!05:39
stub(not the greying out, but the overlap between batches)05:39
jtvOh05:39
jtvWell it'd have to be visually distinct in some way, I think.05:39
jtvBut it wouldn't be much use IMO if the batching has no reliable knowledge of the overlap.05:40
stubIt might be nice, but it doesn't have to be as I've seen it work well without it - people instinctively understand the overlap.05:40
stubBut that was with consistent overlap.05:40
jtvYes, and that's not always easy to get.05:41
jtvAnd the converse, disappearing items, is much harder to understand.05:41
jtvHere's a problem we've had:05:41
jtvyou're viewing a translation, filtering to show untranslated messages only.05:41
jtvYou translate all the messages you see, and hit the button that submits and takes you to the next page.05:42
jtvTwo things would happen:05:42
jtvyour offset would be increased by one batch,05:42
jtvand the messages you just translated would drop out of the batch query's "WHERE" clause.05:42
jtvSo you just skipped a full batch!05:42
jtvThe fix for that is ugly and brittle.05:43
jtvThe batching style I outlined in Dallas naturally eliminates this complication.05:43
stubYup.05:45
jtvI've got similar problems with the translations import queue: I filter for items with a given status.  I change their statuses using ajax widgets, or from forms I open in separate browser tabs.  And now the "next" link has become a Mystery Prize button.05:45
stubAlthough I'm not sure why you skip a batch with the existing offset method. Because you are iterating over 'translatable items without translations' or something?05:45
jtvExactly.05:45
stubok05:46
jtvBut the same thing will happen if someone else is translating concurrently.05:46
stubRight. So maybe you need a better set to iterate over. Or the 'translation torrent' idea that I don't think ever happened.05:47
jtvIt gets complicated and my confidence in our compensation offsets is limited.  It's fine for the scenarios it handles, but does it handle them all?05:47
stub'give me a page of strings to translate'05:48
jtvWhat would constitute a better set though?  I think forms that show items in a given state and let you change that state are a useful pattern.05:48
stubWhy create a batch and step through it? Why not just a page that gives me '20 strings to translate'.05:48
jtvWith an "I don't like these, give me some other ones" button?05:49
jtvPick random ones each time?05:49
stubIf you want to do them in some order, you could pin or reserve them using a shared temporary table or even memcache. Or just return an arbitrary set and use the laws of probability and how many remaining strings to determine the likelyhood of collision.05:49
stubIt would be great if 10 people could sit down in a room for a day and translate some app completely.05:50
stubTranslation sprints might happen.05:50
jtvWell there are good reasons to maintain ordering.05:51
jtvContext, basically.05:51
jtvI'm not sure reserving strings is a good idea, because it's hard to tell whether someone's browsing, translating, or somewhere inbetween.05:52
stubUnless they told you.05:53
stubYou don't need one mega form that does everything.05:53
jtvHave a look at the translation teams out there.  Compare them to actual contributions.05:53
lifelessjtv: batchnav 1.2.4 supports contraint based batching05:53
lifelessjtv: I don't understand the suggestion that the first batch is wonky - it isn't05:53
jtvIn id-based batching, it is.05:54
lifelessI'm not sure what you mean by id based batching05:54
jtvThe alternative to offset-based batching.05:54
jtvSo the scheme I suggested in Dallas.05:55
lifelessso I describe what you described in dallas as constraint based batching05:55
jtvAh ok.05:55
lifelessbecause one uses db constraints rather than offsets to find the given batch05:55
lifelessthe 'page number' becomes entirely cosmetic05:55
jtvGood.05:55
lifelessI have a branch that switches us to batchnav1.2.4; it has some [minor] test failures05:56
lifelessonce thats landed (and if you want to pick it up and land it be my guest - I'm on leave till tuesday with easter)05:56
jtvOn urgent feature mission currently.  :/05:57
lifelessthen we can write adapters for a given collection to do the constraint (for db) and nonce (for the web client to hand back to us) generation05:57
jtvIt'd be really cool to see this.05:57
jtvBut I maintain that the first batch is wonky: you have to show either an incomplete batch or overlap.  Which accept as a matter of course with offset-based batching, but could be a bit misleading once overlap is otherwise completely eliminated.05:59
stubSELECT * FROM Foo WHERE id > 0 LIMIT 50;05:59
stubSELECT * FROM Foo WHERE id > 89 LIMIT 50;05:59
jtvNow delete a few rows with id ≤ 89, and then browse backwards.06:00
stubDelete all the rows with id < 89 and browse backwards - iterating over a mutating list always has problems.06:01
jtvThat's the point: constraint-based batching only seems to have this one.06:01
jtvYou have to show either an incomplete batch, or overlap with the page the user came from.06:02
jtvBut overlap and missed items disappear completely otherwise.06:02
stubBrowsing backwards, when something has deleted items that were in the previous batch, will show an incomplete batch.06:03
jtvOr overlap.06:03
stubActually - it will likely show overlap.06:03
jtvWhy are we going in circles?06:03
stubYes.06:03
jtvAnyway, this is all old hat.06:03
stubI don't think anyone thinks the behaviour is a problem.06:04
jtvGlad to hear you haven't run into the same users I have.06:04
stubThe existing OFFSET code has the same problem.06:04
jtvIt has much worse problems.06:05
jtvWhat I'm saying is that given that we can eliminate those (and looking at what Robert's doing, pretty easily!) it'd be a bit misleading to leave one of them in one particular scenario by showing overlap, and it'd be a bit ugly to show an incomplete batch instead.  So showing grey overlap might be a way of dealing with that.06:07
jtvThe easy and consistent thing to do I think is show an incomplete batch.06:07
jtvlifeless: I'd be curious to know how batchnav deals with navigating backwards!  Does it have knowledge of ordering?06:09
stubSure. Just another parameter to pass. I personally am not sure what is less surprising to users. I suspect nobody actually cares, as the existing batching systems have always had this problem and nobody has bothered to fix it.06:09
jtvThere's that.06:10
stublifeless' update to batchnav lets you step through using a key, ordered.06:10
jtvstub: You do get situations where the top page is "latest events," and people click around a lot on the top 2 pages.  But I guess partial batches look pretty natural there.06:11
jtvThe reason I ask about browsing backwards is that AFAICS you need to reverse the query order at that point, for LIMIT, but then restore your "regular" order for display.06:12
stub'latest events' generally don't get deleted until they are not-so-latest-events on latter pages.06:12
jtvNo, but they get added.06:12
jtvWhat happens there is: you go "next" from page 1 to page 2.06:12
jtvYou go "previous" from page 2 to page 1.06:13
jtvWhich now shows a "previous" link that takes you to... page 0.06:13
jtvAs I said, I guess partial batches work out to be pretty natural for that case.06:13
stubIf a batch knows the previous id, it can step back one batch. That batch won't know the previous id, so to step back another batch will require falling back to the OFFSET code path I suspect. Unless we maintain a list of all previous batches traversed.06:15
jtvThat'd give us the worst of both worlds.06:16
stub(which would scale to human sized number of batches, so might be sane. Just don't show 'previous' links if we go into hundreds of batches, as then we are dealing with a bot)06:16
stubOr just skip 'previous' links altogether and let users make use of that 'back' button on their browser ;)06:17
jtvMaintaining a list of previous batches just opens the door to more complexity and weirdness on any page when browsing backwards.06:17
stubThere will always be weirdness browsing back over a mutated list.06:18
stubDoctor, it hurts when I do this...06:18
stubThere will always be the case that all previous items have been removed after a 'previous' link has been rendered, making that link go to an empty page, the same page, or an error page.06:20
jtvYes, but we can have less weirdness with less complexity.06:21
stubWe are primarily interested in speed. If we can reduce weirdness and complexity without sacrificing query speed, great.06:22
jtvAnd yes, we can.06:22
jtvYou can browse backwards by reversing the constraint and the sort order; it's just that then you need to put the rows inside the batch back into displayable order.06:23
jtvAhhhh06:24
jtvMaybe they use cursors for that.06:24
stubThat method of stepping backwards looks good. I don't see why you would end up with partial batches or overlap though, except the first batch would become partial. And I don't think that is a problem.06:25
stubI'm not sure what lifeless implemented in his batchnav update, but I doubt it would be much work to add your logic if he didn't.06:26
stubIt might make indexes more complex if we are iterating by something like 'id DESC, version' (which we are on some pages I've seen)06:27
jtvThe partial batches other than the first or last one only come in when you do what you suggested earlier: keep track of previous batches (which may have grown or shrunk) or fall back on OFFSET.06:27
jtvNot with OFFSET, actually, but there you get overlap again.06:27
jtvBut anyway.06:28
jtvYes, we may have to re-consider a lot of indexes...06:28
stubI suspect the solution is worse than the problem. I don't think the partial batches are a problem warranting the extra complexity or effort. We certainly don't want to fallback to OFFSET if we can avoid it since our nice 1s pages might suddenly spike to OOPS timeouts.06:28
jtvWhich problem and which solution are you talking about now?06:29
jtv(Since we're going through so many)06:30
stubmaintaining a list of previously seen batch starts06:30
jtvOh, right, that's what I've been telling you all along.  :)06:30
jtvHowever I think what you say also applies to what I said originally:06:30
jtvpartial batches at the head aren't a problem worth solving.  My idea wouldn't carry its weight.06:31
stubI don't see how we can allow stepping backwards an arbitrary number of batches without your approach, or without falling back to slow queries.06:32
stub(was that a triple negative?)06:32
jtvI don't know, I'm too confused.06:32
stubStep 1) Land lifeless' code.06:32
stubStep 2) Improve on it if lifeless didn't think of it already.06:33
jtvWell like I said, I'm curious to know how they dealt with the question of how to step backwards.  What I have right now requires an ability to invert the condition.  But I guess that knowledge is needed anyway, because the batcher needs to formulate constraints.06:34
jtvBut with a cursor, I suspect there's no need to invert ordering as I thought previously.06:34
stubMaybe we just dropped previous links :) We certainly are not using a cursor across transactions from the webapps, because we don't have server affinity.06:35
jtvNo, you wouldn't want to do this across transactions.  But they could be used as a way to simulate "LIMIT from the end of the result backwards."06:35
jtvNot sure that's actually better than offset-based batching performance-wise, though.06:36
jtvExample:06:36
jtvif your regular, forwards-facing queries go "SELECT * FROM foo WHERE id > x LIMIT 10"06:36
stubI don't think SQL lets you do "LIMIT -100" :-)06:36
jtvHmmm06:37
jtvMight be nice if it did.06:37
stubswitching that to "SELECT * FROM foo WHERE id < x ORDER BY id DESC LIMIT 10" is certainly the better performing method except on the smallest batch sizes, and then it won't be noticeably slower.06:38
jtvBut I guess you can simulate it with DECLARE cur FOR SELECT * FROM foo WHERE id < x ; MOVE ALL IN cur ; MOVE -10 IN cur ; FETCH ALL IN cur06:38
jtvRight.06:38
jtvThat's going to be the more efficient way, but of course you have to put the rows back into display order afterwards.06:39
jtvHence my interest in how batchnav solves this.06:39
lifelessjtv: stub: so , going 2 batches requires the key + offset06:39
jtvBoth!?06:40
lifelessright06:40
jtvBy the way, when you say "going 2 batches"...06:40
jtvTypo?06:40
lifelesssay we're on  batch N, which has as its upper row key K06:40
lifelessto get batch N+206:40
jtvAh06:40
lifelesswe select where keycols > K OFFSET batchsize LIMIT batchsize+106:41
jtvYes, that's a harder problem — which we haven't even looked at so far.06:41
jtv(Not _that_ much harder of course: this is basically just a shortcut for skipping batches in a result set while it's guaranteed not to change)06:42
lifelesswe may need to do a batchnav 1.2.5 when we start doing contraint based batches for vocabularies (which show N,N+1,N+2..N+M links at the top for some bizaare reason.06:42
lifelessnow, going backwards is easy06:42
jtvHere it comes!06:42
lifelesssay we're on batch N which has as its lower row key K06:42
lifelessand that the normal query is select .. order by keycols desc06:43
lifelessthe prior batch is obtained by06:43
lifelessseleect where <=K order by keycols asc06:43
lifeless(limit batchsize +1)06:43
lifelessnow, in the case of a concurrently edited batch, this *can* give a short batch at the start of the sequence06:44
lifelessso if we get a short read06:44
lifelesswe do a second query to fix it up06:44
lifelessand discard any excess06:44
jtv1What a time for my connection to drop.06:45
lifeless17:42 < jtv> Here it comes!06:45
lifeless17:42 < lifeless> say we're on batch N which has as its lower row key K06:45
lifeless17:43 < lifeless> and that the normal query is select .. order by keycols desc06:45
lifeless17:43 < lifeless> the prior batch is obtained by06:45
lifeless17:43 < lifeless> seleect where <=K order by keycols asc06:45
lifeless17:44 < lifeless> (limit batchsize +1)06:45
lifeless17:44 < lifeless> now, in the case of a concurrently edited batch, this *can* give a short batch at the start of the sequence06:45
lifeless17:44 < lifeless> so if we get a short read06:45
lifeless17:44 < lifeless> we do a second query to fix it up06:45
lifeless17:44 < lifeless> and discard any excess06:45
lifeless17:45 -!- jtv1 [~jtv@58.136.24.13] has joined #launchpad-dev06:45
lifeless17:45 < jtv1> What a time for my connection to drop.06:45
jtv1Thanks.06:45
lifelessde nada06:45
stubjtv1: Skype for me still sucked this morning06:46
lifelesshave a look at lazr.batchnav trunk if you're interested in the gory details06:46
jtv1I'm on True right now; TOT and 3BB have been horrible lately.06:46
stubjtv1: Crap connection for 4 days now?06:46
lifelessI wrote a slice based adapter to generate the existing queries, and tested the interface reasonably comprehensively.06:46
jtv1Longer.  I think I heard something about plans to make the censorship infrastructure more like China's, a few months back.06:46
jtv1lifeless: so far it's pretty much all what one would guess, but it leaves me with a few questions:06:47
jtv11. The reason I asked was that I was curious about batchnavigator's knowledge of your query's ordering.  Where does the natural order get restored?  In SQL, in the batch navigator, in the app..?06:47
lifeless(oh, and the page #'s can be -totally- bogus during this :)06:48
jtv12. Why "id <= x" and batchsize+1?06:48
lifelessjtv1: in the collection slice factory06:48
lifelessbatchsize + 1 is due to an attempt to avoid calling count(*) on the collection06:48
jtv1Oh, to see if there should be a "prev" link?06:48
lifelessand next, yes.06:48
jtv1Right ho.06:49
lifelessits mostly defeated because we show a last link06:49
lifelessif we dropped 'last' and showed 'reverse order' instead, we would be better off.06:49
lifelessthat becomes more of a win once we're not using OFFSET, so I imagine we will get to it eventually.06:50
jtv1Well isn't "last" simply always a reverse batch without constraint?06:50
lifelessright06:50
lifelessbut the url has the *predicted* count offset in it, because batchnav wasn't designed for mutating collections.06:50
lifelessWhich is a bit of an oversight in a webapp :)06:50
jtv1I would've expected a change in parameters there!06:50
jtv1But that's the whole problem of course: most of this is pretty easy, _apart_ from the thicker interfaces.06:51
lifelessthe concept of 'batch N' is deeply embedded.06:51
lifelessI wanted to solve the 'we can avoid OFFSET for expensive cases' problem in this iteration.06:51
lifelesswe have more work to do to eliminate COUNT(*), batch #'s and so forth.06:51
jtv1That'd just blow me away.06:51
jtv1Still curious: when you say that the slice factory does the re-sorting of reverse batches, do you mean it generates some kind of SQL wrapper to reverse the batch, or a python sort, or what?06:53
lifelessfor instance I think we could (say its ordered by heat) identify the 'Nth batch'  (in the UI) as 'now showing bugtasks with less than 40 heat and bug id 45+' or something, and have it make sense to users06:53
lifelessjtv1: best if you read the code at this point06:53
lifelessISliceFactory06:53
jtv1\o/06:53
jtv1I have this feeling there's a fascinating rabbit hole waiting behind the question of how batching should be presented.06:54
jtv1(Freudian slip: my fingers tried to turn that into "how batching should be prevented")06:54
stubjtv1: list.reverse() isn't expensive for a 100 item list.06:55
jtv1I sometimes want "search, but don't filter the set; just take me to the right point in the batch" or "give me a little tree so I can go to 25%-or-so in one click"06:55
jtv1Ah!  Just reversing the list.  How blindingly obvious.06:55
jtv1And here I was thinking of all these complicated things.06:56
jtv1lifeless: we also have some pretty weird behaviours for nonexistent batches past the end of the set (which people can actually reach in good faith because of concurrent changes, but we seem to pretend they must be playing doctor with their URLs or something)06:57
jtv1With constraint-based nav, could we fix that to show the last batch?  I'm sure you see where I'm going with this.06:58
jtv1And then of course, make the "last" links point to the batch starting at inf.06:58
jtv1No new parameter, but no count query either.06:59
jtv1(At least not for the "last" link)06:59
=== jtv1 is now known as jtv-eat
jtv-eatlifeless: on the off chance that this might solve anything ^^^07:10
al-maisanjtv-eat: guten Appetit :)07:14
lifelessjtv-eat: uhm07:19
lifelessjtv-eat: so the counting aspect is the problem for last; the actual data is retrieved by selecting from the end in reverse sort order07:20
lifelessjtv-eat: constraint based batching will handle 'last' better always, but handling ' empty results because past end-of-collection' different would be fine; I think its orthogonal though07:21
lifelessI do see the link you present between that and knowing the page number, but the page number is already weakened with contraint based queries.07:21
LPCIBotProject windmill build #208: STILL FAILING in 1 hr 4 min: https://lpci.wedontsleep.org/job/windmill/208/07:47
jtv1lifeless: I'm not sure I expressed myself as well as I might have.  I mean: AIUI you need a count query just to provide an offset for the "last" link.  If past-end-of-set pages were to show the last n items (whatever the real set size is), then you no longer need to compute anything meaningful for the "last" link.  Just give a very large number and the viewer will end up on the last page.08:31
jtv1[where n is batch size, of course]08:32
lifelessjtv1: the number is cosmetic08:47
lifelessjtv1: page 1 of N08:47
lifelessjtv1: while we show it, folk will be confused by it if it goes to 10000000 when there are 120 results ;)08:47
lifelessjtv1: we show the number of results as well08:48
lifelessjtv1: until we have answers for /all/ the places the collection size is shown, we can't eliminate the count08:48
lifelessat the moment the count is cached on the object, so we only pay it once (but we do pay it)08:49
lifelessI guess I'm saying - yes, that would avoid the mechanical reason for *that* triggering of count, but its not sufficient to eliminate the count, and its also a fairly ugly ui unless we make other changes concurrently  (and if we do that, we don't need to show a high N number at all)08:50
jtv1lifeless: yeah I'm not considering page number _display_ at all here.  Then again, maybe "showing last page of about 256" would be enough for display.08:55
lifelessjtv1: right, the trouble is until we've solved all the causes we haven't solved the issue ;)08:59
jtv1then don't let me keep you :)08:59
jtv1Seriously: great that you jumped on top of this.08:59
jtv1If that expression makes any sense in English.08:59
jtv1And doesn't make it sound lugubrious or salacious.09:00
wgrantrvba: Hi.09:03
rvbawgrant: Hi!09:03
wgrantI'm not here today, and I guess Julian probably isn't either... I think we probably need to discuss this more. ArchiveDependencies are per-archive, not per-series, so I'm not sure exactly what this UI is meant to do.09:04
rvbaI know that the dependencies are for archives ... but since the parent/child relationship is on series, the problem you have with the UI might only be something cosmetic09:05
wgrantWell, what does it mean?09:05
wgrantWhat does the UI do if I have two series for one distro, one checked and one not?09:06
rvbaactually, that was my next question :)09:06
wgrantWe probably need a flag on DSP.09:06
wgrantAnd we need transitive archive deps, I think :(09:06
jtv1wgrant: julian shouldn't be here either, no09:07
jtv1oh, hi rvba!09:07
rvbahi jtv109:07
=== jtv1 is now known as jtv
lifelessjtv: I refer you to my early perf tuesday mails where I said I would be data driven :)09:08
rvbawgrant: by transitive archive you mean that one archive could depend on an archive ... depending on another one?09:08
lifelessjtv: once we started to see slow-offset queries as a high fraction of timeouts, this became important to do :)09:08
jtvlifeless: just saying someone else might have decided it was too hard and we'd have been the poorer for it.09:09
wgrantrvba: Right. It's most obviously important for PPAs.09:09
lifelessjtv: thanks :)09:09
wgrantrvba: Since if they just have a dependency on their distribution's primary archive, they're not going to work well if that's an overlay archive.09:10
rvbawgrant: right09:10
rvbawgrant: I could look at the code but how is this supported today for PPAs?09:10
rvbahardcoded some way?09:11
wgrantrvba: We don't have transitive dependencies. But lib/lp/soyuz/adapter/archivedependencies.py has a _get_default_primary_archive_dependencies function that's used for non-primary archive if they don't have an ArchiveDependency for the primary archive.09:12
wgrantrvba: We want to remove that hardcoding, so PPAs will start with an ArchiveDependency on the primary archive.09:12
wgrantBut... if the primary archive then becomes an overlay archive, we have to add new dependencies to every PPA.09:12
wgrantUnless ArchiveDependencies are transitive.09:12
rvbaUnderstood.09:12
rvbawgrant: since you're not here today, I don't want to bother you too much with this, I think perhaps the best thing to do is to try to summarize the things that we (well, mostly you) think about this and send an email to the 3 of us.09:13
rvbaI'll focus on something else today.09:13
wgrantrvba: That sounds like a good idea.09:14
rvbawgrant: but basically the UI (you should have received a mockup yesterday) is meant to be able to configure the archive dependencies for an archive.09:14
wgrantIt's a thorny issue that we need to talk through a lot.09:14
wgrantJFDI is often good, but it's not going to work here :(09:14
rvbaperhaps the stupid part is listing the *series* instead of the *archives*09:14
wgrantExcept we do need to sometimes set it per-series.09:15
rvba+1 for the not JFDI on this one :)09:15
wgrantSo, the ArchiveDependency could always exist, but DSPs are only used if they have the overlay flag set.09:15
wgrantAnyway, let's discuss this on Tuesday or so.09:19
rvbawgrant: all right.09:19
rvbawgrant: thanks for the chat ;).09:20
=== jtv1 is now known as jtv
magciusok10:38
magciusi'm deving launchpad10:38
magciusis there a way i can either add all the certificate exceptions to firefox in bulk?10:39
magciusor run it in not-https mode?10:39
stubI don't know how to add certificate exceptions in bulk, but there are only half a dozen domains.10:44
magciusOK10:49
magciusSo, let's say I want to make http://bugs.launchpad.net/12345 work10:49
magciusand "do the right thing"10:49
magciusI think I've found the right place -- lib/lp/bugs/browser/malone.py10:50
magciusOK -- how does the subdomain system work?10:57
magciusDo different subdomains get different ZCMLs, and that's it?10:57
stubIIRC everything is actually one big tree, and there is some magic vhosting hacked in to make /bugs (or /+bugs or /malone or whatever) work for bugs.launchpad.net. But long time since I saw that code.11:02
magciusI'm just curious.11:07
magciusIt looks like the vhosts don't do anything different at all.11:07
magciusfor instance, https://blueprints.launchpad.net/ubuntu/+bug/1 works11:08
_mup_Bug #1: Microsoft has a majority market share <iso-testing> <ubuntu> <Clubdistro:Confirmed> <Computer Science Ubuntu:Invalid by compscibuntu-bugs> <EasyPeasy Overview:Invalid by ramvi> <GNOME Screensaver:Won't Fix> <Ichthux:Invalid by raphink> <JAK LINUX:Invalid> <The Linux OS Project:In Progress> <metacity:In Progress> <OpenOffice:In Progress by lh-maviya> <Tabuntu:Invalid by tinarussell> <Tivion:Invalid by shakaran> <Tv-Player:New> <Ubuntu:I11:08
stubyes. Your jumping into some of the oldest and cruftiest code in the codebase :)11:09
magciusYeah, the traversal stuff looks pretty ugly.11:10
stubEverything used to be off  one domain, and the subdomains tacked on later.11:10
magciusYou depend on the MRO of all the classes.11:10
magciusbasically, all of the subclasses of Navigation.11:10
magciusalso, what is "vostok"?11:10
stubOne of the production servers - can't recall what its purpose is. No reason for it to be referenced in the code base.11:11
magciusIt's a whole other codebase.11:12
magciuslp.vostok.publisher.VostokRoot11:12
magciuscomplete with its own root object11:12
stubSounds like an internal service designed to run on a single host.11:12
wgrantvostok was a former production server. lp.vostok is unrelated.11:13
magciusOK.11:13
magciuswhat is lp.vostok then?11:13
wgrantIt was originally to be an alternative UI for a subset of Launchpad, of which many instances would be run.11:14
wgrantThat never eventuated, so its purpose is approximately null.11:14
magciusOK.11:14
magciusSo it's not running at all.11:15
magciusOK.11:15
magciusIs there an open bug about fixing the traversal system with respect to vhosts?11:15
wgrantFixing?11:15
magciusYes.11:15
wgrantThe vhosts will likely vanish soon.11:15
magciusAh.11:15
wgrantBut traversal with respect to them is not broken.11:15
magciusWell, each vhost doesn't get its own RootObject.11:16
wgrantThat's correct, and intended.11:16
wgrantThat doesn't make it broken.11:16
magciusReally?11:16
magciusWell, that means that you can't do something like I described, without some serious hackery.11:16
magciusas I said above, http://bugs.launchpad.net/12345 should *work*, dammit.11:16
wgrantThe intention of the vhosts was not to do things like that.11:16
wgrant=> they are not broken for the purpose for which they were introduced.11:16
magciusI don't care how they were introduced, I'd expect it to be the right behavior.11:17
magciusbut, eh.11:17
wgrantThey were not introduced to change the traversal hierarchy.11:17
magciusWhat was the purpose if not to isolate the services?11:17
wgrantSo having an inflexible traversal hierarchy *is* the right behaviour.11:18
wgrantTo provide different default views, and permit facet-specific views on some vhosts but not others.11:18
magciusI don't see how you can't look at "bugs.launchpad.net" and see "things related to bugs should always go here"11:18
wgrantRight, but that doesn't mean the traversal hierarchy needs to differ.11:19
magciuswell, that means that http://blueprints.launchpad.net/ubuntu/+bug/1 shouldn't work11:19
_mup_Bug #1: Microsoft has a majority market share <iso-testing> <ubuntu> <Clubdistro:Confirmed> <Computer Science Ubuntu:Invalid by compscibuntu-bugs> <EasyPeasy Overview:Invalid by ramvi> <GNOME Screensaver:Won't Fix> <Ichthux:Invalid by raphink> <JAK LINUX:Invalid> <The Linux OS Project:In Progress> <metacity:In Progress> <OpenOffice:In Progress by lh-maviya> <Tabuntu:Invalid by tinarussell> <Tivion:Invalid by shakaran> <Tv-Player:New> <Ubuntu:I11:19
magciushas the goal of faceted views been realized?11:19
wgrantThat would be achieved by renaming Bug:+index to Bug:+bugs-index, and setting it as a view for just the bugs facet.11:20
lifelesswe're currentlt reviewing the separate domains with an eye to removing them11:20
wgrantRight.11:20
lifelessbecause11:20
lifeless - slow (more ssl handshakes)11:20
lifeless - confusing11:20
lifelessjml keeps asking me when / how hard :)11:20
lifelessgnight11:21
magciusright -- it's stupid, ugly and confusing when you can have a large number of URLs for the same bugs11:21
jammagcius: honestly, I like it quite a bit, except you have to be able to combine adjacent regions so you don't overflow the text regions so much.11:33
jamSo if your sections 1-4 were one big box11:33
jamthen you could fit lots of text on the left11:33
jamwithout causing it to overflow in weird ways11:34
jamit also lets you shrink it a bit, because wrapping text on the left won't break the code lines on the right, etc.11:34
magciusjam, sections 1-4?11:55
deryckMorning, all.11:56
=== al-maisan is now known as almaisan-away
magciusjam, http://i.imgur.com/9o0g5.png12:01
LPCIBotProject windmill build #209: STILL FAILING in 1 hr 4 min: https://lpci.wedontsleep.org/job/windmill/209/12:02
magciusjam, I forgot to re-set the border styles... I was debugging.12:03
jammagcius: so I think if the contents is left justified the header should be for Revision. And I think it is using a bit too much space, but yes, I like that style12:27
magciusOh, right, that.12:28
jamI also notice that you didn't actually allow the contents for the first revision to move into line 212:28
magciusI didn't even notice the right-aligned revision.12:28
jamline 1 is still wider than normal12:28
jam(taller)12:28
magciusYeah, that's because of how the table system works.12:28
jamsame for line 712:28
magciusI should probably use rowspan.12:28
jammagcius: Isn't there some sort of "span" ability?12:28
magciusWe don't use it currently.12:28
jamor do you have to nest the tables to get it12:28
magciusNah, there's rowspan.12:28
jammagcius: right, so *with* rowspan, I like it, quite a bit12:29
jamI don't think it is going to be particularly more costly to pull out the revision comments than it is to compute the annotation12:29
jamso as long as you have to explicitly ask for annotation12:29
jamI'm not as worried about performance of this12:29
magciusyeah, it's "change.comment.splitlines[0]"12:30
magciusThe problem with rowspan is that I need to calculate the number of rows 'til the next change12:30
magciusWhich means that I need to refactor the annotation generator.12:30
jammagcius: how is it being computed now?12:30
magciusOne at a time.12:30
magciusIn a Python generator.12:30
jam(given that it is already knowing how many lines before it needs to output the same info)12:30
magciusWhat do you mean?12:31
magciusWe just set a flag "new_rev"12:31
magciusright now12:31
jammagcius: it already omits lines if they are the same as the previous entry12:31
magciusRight, there's a "new_rev"12:31
jamI don't think there is much gained by using a generator here12:31
jamtbh12:31
magciusRight.12:31
jamI think just returning lists would be fine, and let you do the work we actually want12:31
magciusRight.12:31
jamwe already loaded *tons* of file content to do the annotation12:31
magciusOK12:47
magciusI'm confused about TAL12:47
magciusI have a dict of lineno => Container12:51
magciusand I want to access it from TAL12:51
magciusI thought12:51
magciuspython:annotated[path(repeat/line/number)]12:51
magciuswould work12:51
magciusWARNING:simpleTALES.Context:Exception occurred evaluating python path, exception: unsupported operand type(s) for /: 'dict' and 'unicode'12:52
=== bac changed the topic of #launchpad-dev to: We have a 9s timeout!!! (2 months early!) | https://dev.launchpad.net/ | On call reviewer: bac | https://code.launchpad.net/launchpad-project/+activereviews
danilosbac, when we are done with the call: https://code.launchpad.net/~danilo/launchpad/bug-761257/+merge/58801 :)13:44
bacdanilos: ok13:52
magciusjam, http://i.imgur.com/eHfVJ.png13:52
jammagcius: I really like the left border, but the width seems way too wide.13:53
magciusjam, I don't understand tables at all.13:53
magciusO13:53
magciusI'm not sure how to say "use the minimum size possible with the least amount of wrapping"13:53
jcsackettbac: i humbly request a review for https://code.launchpad.net/~jcsackett/launchpad/comment-display-rules/+merge/58760.13:55
bacjcsackett: ok.  you're next.13:55
jcsackettthanks, bac.13:55
danilosbac, thanks13:56
magciusjam, I'm getting closer.14:21
jammagcius: I don't know it either. but even just saying "25 ex" or something might be reasonable14:22
danilosmagcius, there is min-width, max-width CSS properties in recent browsers (and CSS2 I think) that can help you with some of the stuff, but tables are generally pretty smart14:23
magciuswhite-space: nowrap;14:24
magciushttp://i.imgur.com/6qBAO.png14:24
magciusI did some other tweaks as well.14:24
danilosmagcius, I think you'd get the best result for a table itself if you didn't have width:100% on it, then it'd take the minimum space necessary14:25
danilosmagcius, (or equivalent of width: 100%)14:25
magciusBut then the width wouldn't be fixed.14:26
danilosmagcius, right14:26
magciusThat'd be even uglier :(14:26
danilosmagcius, how come?14:26
magciusThe files would be all over the place/.14:26
magciusAn empty file would be small14:26
magciusvs. a file with a lot of big history14:26
danilosmagcius, oh, you have multiple tables?14:26
magciusOf course. One per file.14:27
danilosmagcius, heh, sorry then, the screenshot seems to be one-table-per-web-page :)14:28
magciusThat's what I meant.14:28
danilosmagcius, then I don't understand what did you mean with 'the width wouldn't be fixed'?14:30
danilosmagcius, across different web pages?14:30
magciusYes.14:30
magciusGoing between tabs and pages, the files would be inconsistent.14:31
magciusOr at least more inconsistent than width: 100%;14:31
danilosmagcius, well, I'd prefer that over the too-wide first column, but it's just a personal preference :) cheers14:33
=== almaisan-away is now known as al-maisan
danilosbac, hi, do you happen to have any questions regarding a review?15:00
bacdanilos: i just got to watch your screencast for the bug.  thanks for doing it!  nice dance track.15:00
bacdanilos: no questions yet15:00
danilosbac, heh :)15:00
danilosthanks15:01
bacdanilos: the old method named 'unsubscribe_current_user' is misnamed now, no?15:13
bacyou are using it to unsubscribe a team15:13
danilosbac, yes, there is a bunch of things like that in the code15:14
danilosbac, I was thinking of tackling that in the follow-up branch15:14
bacdanilos: ok, i think that's a good idea15:14
bacthanks15:14
danilosbac, many of the methods have not even been renamed when mute functionality was introduced, so they sometimes do things related to that as well :/15:15
bacdanilos: also, to get around the team names clashing with other actions, perhaps we could prefix the team names with something that is not allowed and then strip it when we process the submission15:15
danilosbac, yeah, that's an option as well (and we could even prepend the '/~' making them actual API paths that need no processing)15:16
bacdanilos: +115:16
danilosbac, it's still a separate bug that gary_poster said we should look into later15:16
bacdanilos: i agree15:16
baci think this branch is fine.  let me add some comments15:16
danilosbac, it's a nice idea though!15:16
danilosbac, great, thanks15:16
danilosbac, thanks again for the review, off to land this15:27
bacnp danilos.  have a nice weekend15:27
daniloscheers15:27
=== al-maisan is now known as almaisan-away
=== deryck is now known as deryck[lunch]
LPCIBotProject windmill build #210: STILL FAILING in 1 hr 6 min: https://lpci.wedontsleep.org/job/windmill/210/16:34
sinzuibac: do you have time to review https://code.launchpad.net/~sinzui/launchpad/bugtask-create-question-1/+merge/58826 today16:53
bacsinzui: of course17:04
sinzuithanks17:04
bacsinzui: are you in a rush?  mind if i eat lunch first?17:05
sinzuithats good. I want to have lunch now too17:05
baccool17:05
=== deryck[lunch] is now known as deryck
=== beuno is now known as beuno-lunch
benjibac: I've been waiting on the diff for https://code.edge.launchpad.net/~benji/launchpad/bug-768336/+merge/58830 to update before asking you to look at it, but it hasn't so...18:21
sinzuijcsackett: are you about to mumble?18:21
benjibac: the diff's up now18:23
=== beuno-lunch is now known as beuno
bacbenji: ok. i've got to do sinzui's branch first18:32
benjinp18:32
jcsackettsinzui: i am available for mumble.18:40
jcsackettsinzui: feel free to ping me or just say hello if/when you are available again.18:41
=== almaisan-away is now known as al-maisan
bacsinzui: done.18:57
sinzuithank you bax18:59
sinzuibac18:59
=== al-maisan is now known as almaisan-away
benjibax: (noun, plural) one or more bac19:18
magciusUsing default stacking branch /+branch-id/10062 at lp-81385104:///~jstpierre/loggerhead19:19
magciusCreated new stacked branch referring to /+branch-id/10062.19:19
magciusyay, completely useless information!19:19
maxbhmm, that's not entirely optimal19:31
maxbon the other hand, yay for stacking that doesn't break when branches get renamed19:31
magciusI have no idea what that's supposed to mean.20:06
magciusBut yeah, branches renaming is dumb too20:07
magciusmaxb, https://bugs.launchpad.net/bzr/+bug/56936120:09
_mup_Bug #569361: Remembering an URL different from the one the user entered is surprising <Bazaar:Confirmed> < https://launchpad.net/bugs/569361 >20:09
maxbmagcius: as it happens, that bug is actually fixed20:12
maxbish, at least where launchpad is concerned20:13
magciusOK20:31
magciusWhat's the standard thing that implements IPerson?20:31
magciusI've looked all through the .zcml and .py files20:31
magciusI can't find a single implements(IPerson)20:32
magciusaha, lp.registry.model.person20:34
magciusshould have looked harder20:34
magciusLocationError: (<lazr.restful.tales.WebLayerAPI object at 0xce6ee10>, 'json')21:21
jcsackettmagcius: what's the context for that?21:26
magciuswow that's a terrible error message for what I did :P21:26
magciusI accidentally changed something on Person, and it spit out that21:27
magciusI'll try to get a full traceback.21:27
jcsackettbased on the error, i'm assuming you're working with the API?21:27
magciusNo, I'm working with the LP code.21:27
magciusweb code21:28
magciusI assume something ate the error.21:28
jcsackettmagcius: ah, dig.21:28
magciushttp://paste.pocoo.org/show/376548/21:29
magciusIt's working now, I assume.21:30
magciusI had typo'd the "mugshot" property as "mugsoht" and got a terrible message.21:30
jcsackettyeah, you scared zope's traversal, i think.21:31
magciusI assume something ate the traversal message, and then the traversal was all fudged up.21:32
magciusHow do you guys usually dev the server?21:33
magciusDo you "make run" and then ^C and run it again when you make changes?21:33
magciusForbiddenAttribute21:33
magciusWTF?21:34
jcsackettmagcius: yes, "make run" and then either ctrl+c or if you're running it in the background "make stop"21:34
magciuscan I tell zope.security to shut up?21:35
jcsackettmagcius: ForbiddenAttribute happens when you're accessing something that a) does not exist (e.g. attribute error), b) something that doesn't exist in the associated interface, or c) something you don't have permission.21:35
magciusjcsackett, OK, I didn't know if you had some magic to make it restart on code changes.21:35
magciusjcsackett, what if I don't have an interface?21:35
jcsackettmagcius: can you show me the traceback?21:35
magciushttp://paste.pocoo.org/show/376548/21:36
magciusthere's a simple diff right there21:36
magciusand http://paste.pocoo.org/show/376555/21:36
magciusis the traceback21:36
jcsackettmagcius: this is pulling in a lot of browser behavior into the model.21:37
magciusIs there somewhere else I should change it?21:38
magciustales.py perhaps?21:38
jcsackettmagcius: you might have more luck adding an attribute like "has_gravatar" to the model, and then using that to inform the views that use mugshot that they should render the gravatar stuff instead of pulling a mugshot from the librarian.21:39
magciusrealistically, I don't want it to be an option, I'd rather that we remove the user-configured setup entirely and switch over to gravatar globally21:39
magciusbut the flag-inistas are never going to fall for it21:39
jcsackettmagcius: not everyone has gravatar accounts, nor should we likely require them.21:40
magciusthere can be a link: change your gravatar by clicking here21:40
magciuseverybody else has adapted to a gravatar21:41
jcsackettwhich requires people to sign up for a service they may not be interested in.21:41
jcsacketti don't think all services use gravatar, magcius. :-)21:41
jcsacketti agree that providing users the option of using gravatar would be cool.21:41
magciusjcsackett, I don't know any service that doesn't at this point.21:42
magciusand if you are one of the three people that hasn't signed up for gravatar, well, i doubt you're going to be inclined to upload a custom image with a widget either21:42
magciusso you can be content with /@@/person-mugshot21:43
magciussorry, sorry, i just really hate the "A or B? Option for either!" mantra21:43
jcsackettmagcius: i understand. frequently, i agree.21:44
jcsackettin this instance, i don't. :-)21:44
magciusi don't see what the loss is, though21:44
magciusis there anybody who would use a different mugshot/logo than they would use for gravatar?21:44
magciusjcsackett, OK, what about: gravatar by default, with the default being the librarian image?21:45
magciusthat way it's a graceful fallback21:45
jcsackettmagcius: quite probably. mugshots on launchpad are usually actual pictures of the user.21:45
magciusif you don't have a gravatar image, you fall back to the librarian21:45
magciusSo, why does it give me a ForbiddenAttribute here?21:46
magciusTechnically.21:46
benjiIt makes more sense to have it the other way around: we use your general purpose gravatar image unless you go to the trouble of uploading a launchpad-only image.21:47
magciuseither way is fine with me21:47
magciusI'm just playing around with the Launchpad code for now21:47
jcsackettmagcius: i think it's probably b/c the mugshot attribute is getting proxied, and there's no interface or security definitions for the gravatar objects.21:49
jcsackettbut i'm not 100% certain of that.21:49
magciusHow is it getting proxied?21:49
jcsackettmugshot is part of person, persons are enclosed in zope security voodoo.21:49
magciusRight, notice that I took the Storm field out and replaced it with a property.21:50
magciusBut ouch, zope voodo.21:50
magciuso.21:50
magciusis there some decorator I can add?21:50
magciusEventually, I want to hack up LP bugs so I can go from this: http://i.imgur.com/awyVF.png21:50
magciusto this: http://i.imgur.com/2by4O.png21:51
magcius(there's also a WIP here: http://i.imgur.com/Y0MiW.png)21:51
jcsackettmagcius: responding to your question about a decorator. i don't know of one per se, but you can (temporarily) get rid of proxies by using removeSecurityProxy from zope.security.proxy21:57
jcsackettyou might hack up tales.py where the error is raised for right now to do that, see if what your'e doing is at least on the right path, and then you can hunt down what you have to do to make zope security happy.21:57
=== bac changed the topic of #launchpad-dev to: We have a 9s timeout!!! (2 months early!) | https://dev.launchpad.net/ | On call reviewer: - | https://code.launchpad.net/launchpad-project/+activereviews
magciusok22:01
magciusI have a feeling it's something to do with the mugshot/mugshotID in interfaces/person.py22:02
jcsackettmagcius: very possibly.22:03
magciusIs there someone who knows that code better?22:04
magciusOK, I'm still getting that ForbiddenAttribute error23:47
magciushttp://paste.pocoo.org/show/376624/ is my latest patch23:48
lifelessmagcius: hi23:51
lifelessmagcius: uhm, just to let you know, I am strongly against anything like avatars causing per-person lookups inside a webapp23:52
lifelessmagcius: we show thousands of persons at once on some pages, and the overhead is simply intolerable.23:52
lifelessmagcius: I can't tell if you need to do that for gravatar or not, but if you do its a problem23:53
lifelessmagcius: the second thing is that we must not disclose email addresses on anonymous views of pages (and urls with email addresses in them will disclose it)23:53
lifelessmagcius: finally we have many many users that have selected 'do not show at all' for their email, and the same issue will apply.23:54
magciuslifeless, gravatar uses an md5 hash of the email23:54
lifelessmagcius: the reason you are having trouble is you are replacing DB columns with properties.23:54
magciusForbiddenAttribute: ('getURL', <lp.registry.model.person.GravatarLogo object at 0xb351fd0>)23:55
magciusThere's nothing forbidden about that!23:55
lifelesswell, that too23:55
magciusI explicitly allowed it in the ZCML!23:55
lifelessI can see that23:55
magciushttp://en.gravatar.com/site/implement/hash/23:56
magciusSo no, there's no email leakage.23:56
magciusUnless you consider MD5 to be too unsafe23:56
lifelessits not reversible23:56
lifelessso that concern is addressed23:56
lifelessthere is another23:56
magciusWhich is?23:56
magciusWhat we're doing is replacing http://launchpadlibrarian.net with http://gravatar.com/23:57
lifelesswe need to make sure we generate size info so the page can render if gravatar is blocked/down/ or just slow23:57
magcius"size info"?23:57
lifelessimg href width height23:57
magciusYou request a size from gravatar.23:57
lifelessok23:58
magciusIn the case of a mugshot, it's 196x19623:58
magciusSo, I'd send along https://www.gravatar.com/gravatar/md5?s=19623:58
magciusif we want to fall back to /@@/person-mugshot23:58
magciusyou specify 'd'23:58
lifelessjcsackett's question around making this optional etc is something I think needs discussion with jml23:59
magciusSee http://en.gravatar.com/site/implement/images/23:59
magciusSure, I'm just using this as an example of hacking LP's code.23:59
magciusAnd I'm not having much success.23:59
magciusI don't expect this to land tomorrow or anything.23:59
lifelessI'm not sure why you are getting forbidden attribute there23:59
magciusI'm not either.23:59

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