[00:00] lifeless: On #712894 you mentioned some helpers to preload user's avatars. Are there any docs on how to use that or can you explain where I might start? [00:00] <_mup_> Bug #712894: Display avatars next to usernames instead of icons < https://launchpad.net/bugs/712894 > [00:01] getUtility(IPersonSet).cacheBrandingForPeople(participants) [00:01] see model/person.py for the gory details [00:01] lifeless: Thanks mate [00:04] is there any plan on setting up LP to be translated? [00:05] lifeless: Do I need to use that once on all the users that need an avatar on the page, or can I call it whenever I want (note, this is an exercise in me learning the codebase, so I might be asking dumb questions)? [00:06] cjohnston: there was discussion @ UDS, met favourably, to do so. But its not scheduled. [00:06] huwshimi: that should (I haven't checked that its correct :P) be called once on a page, because doing one person at a time would be terribly slow. [00:06] im guessing alot of work involved? [00:07] lifeless: Ok thanks, I'll look into it a bit more... might not be feasible to do that then. [00:08] huwshimi: it is going to need to be called once, for *every page* that starts showing avatars [00:08] huwshimi: or performance will go to the toilet. [00:08] lifeless: Yeah, that is going to be a big issue [00:09] how is https://login.ubuntu.com/ connected to https://login.launchpad.net/ [00:09] Ronnie: They are just alternative skins for the same service. [00:10] Same DB. [00:10] same servers even [00:10] The latter will hopefully go away eventually. [00:10] huwshimi: its going to need extreme care [00:10] Ubuntu services should prefer the forer. [00:10] +m [00:10] cjohnston: a moderate amount of work [00:11] If you create a login.u.c you dont have an LP account though correct? [00:11] wgrant: so when you register on ubuntu.com you can login to LP? [00:11] Ronnie, cjohnston: You don't automatically have an LP account if you create an account on either. [00:12] But if you try to log into Launchpad, it will redirect you to login.launchpad.net. You can then log in using your login.ubuntu.com account, and Launchpad will create an account for you. [00:12] LP is an OpenID consumer, just like LD. [00:12] (except that login.ubuntu.com and login.launchpad.net use a private interface to return data from the linked LP account, if it exists) [00:12] wgrant: the reason for the questions is that people are wanting to move away from the LP requirement for LP.. but the devs dont really see it as possible [00:13] cjohnston: the which requirement for LP ? [00:13] lifeless: you must have an LP account to be a part of a team, and to register for an event/meeting [00:13] cjohnston: you said 'LP requirement for LP' [00:13] cjohnston: this confused me [00:14] People don't like sorry [00:14] LP requirement for LD [00:14] ok [00:14] right, with that cleared up [00:14] why do I often feel like I'm the first person to do something :-( [00:14] LP maintains the team database [00:14] writing lazr-js tests [00:14] correct [00:15] so I don't think you're going to get away from that at all easily; and there are no plans to make SSO maintain teams [00:15] People 1) dont like the fact that they have to sign up somewhere other than LD... and 2) that LP isnt translated [00:15] right [00:15] (SSO teams are mirrored from LP) [00:15] lifeless: thats what the couple devs have a hard time explaining to people [00:15] we'd take patches for I18N of LP [00:15] I bet [00:15] heh [00:16] at one point we wouldn't have. [00:16] but I think that that bridge has been successfully fixed. [00:16] Excellent. [00:17] cjohnston: can we set login.ubuntu.com as openid provider? [00:17] i tested locally and worked fine with login [00:18] For a while it wasn't open to arbitrary consumers, but I think that changed a few months ago. [00:18] hmm, but for joining a team, we still need to login to LP [00:18] users still need lp accounts to make LD useful... [00:18] Ronnie: login.ubuntu.com is fine. [00:19] cjohnston: they need to login only once to LP to join the team, but for other parts the l.u.c. should be fine (altough the mugshot is also in LP) [00:20] correct.. so why not just leave it the way it is since they still have to go into lp? [00:21] lifeless, wgrant: is there an alternative way to join a lp team, than the webpage? [00:21] Ronnie: apis, but the user still has to accept the membership [00:21] lifeless: No, they don't :( [00:21] and you can't talk about a user until they sign into LP once. [00:21] Right. [00:22] The LD can add people to teams. [00:22] wgrant: as part of the disclosure work that should be fixed [00:22] But they need to have an LP account first. [00:22] And there's no way to create one of those unless the user logs in. [00:22] Or you are the Software Center Agent (ugh) [00:23] wgrant: is it possible to do one login to LP in the background, so the user is not aware (or manually restyle the page somehow?) [00:24] lifeless: and how should the user accept the membershit trough api? [00:24] That would be very bad. [00:25] making programms userfriendly, is sometimes choosing between 'the bad stuff' of the 'hard stuff' ;) [00:25] of = or [00:26] Ronnie: they would get an email with a link to click on [00:26] os [00:26] so [00:26] what teams does LD care about? [00:26] all the team which are subteams of the main loco team (cant remember the name) [00:27] ubuntu-locoteams iirc [00:27] https://launchpad.net/~locoteams [00:27] anyhow, I don't see - in principle - a problem with designing and building a facility for LD and other closely affiliated sites to have impersonation facilities for users. [00:27] whether that looks like LP APIs or something radically different is an open question. [00:27] but we also have a plan of adding a "sister" to LD being a global directory which will provide the meeting feature (and upcoming team reports) to all teams that want it [00:28] the SCA approach seems rather unscalable from a risk perspective to me. [00:28] SCA? [00:28] software centre agent [00:29] lifeless: so having an API for 'trusted affilated' sites is an option? [00:30] yes [00:30] I've spent approx 0 time thinking about the necessary requirements and constraints for it though. [00:30] cjohnston: i think thats a very good solution [00:31] Except for what lifeless just siad [00:31] said [00:31] indeed [00:32] lifeless: and the 'one time lp login' can that be solved by the same API (in your first toughts) [00:32] Ronnie: if LD was able to act as an LP frontend [00:32] Ronnie: then it could create accounts given an sso signed in user, add them to teams etc [00:33] but is haveing LD as a frontend not very dangerous without limiting the features? [00:34] Ronnie: thats right, thus - 13:30 < lifeless> I've spent approx 0 time thinking about the necessary requirements and constraints for it though. [00:34] we'd be separating the business logic from presentation [00:34] and we'd need an impersonation api for the glue [00:35] so you could say 'on behalf of create a LP account' [00:35] but the integrity of the system would be maintained by the LP middleware [00:38] i have to sleep and think about it for a while. i added this channel for auto join [00:38] cool [00:38] till soon [00:38] huwshimi: ping [00:39] thumper: Hello [00:39] huwshimi: do you know how to get some javascript to drop into the firebug debugger? [00:39] huwshimi: I think it is something like " Y.debug() " [00:39] Ronnie: But we cannot sacrifice security like that for user friendliness. [00:39] Except perhaps as lifeless suggests. [00:40] thumper: console.log(); [00:40] In a very restricted context. [00:40] thumper: That will work on Chrome debugger too [00:40] huwshimi: I don't want to log stuff out, I want to debug some javascript [00:41] thumper: What kind of info do you want? [00:41] I want to interrogate the DOM state mid function call [00:41] I'm not sure if my test is wrong, or the code isn't doing what it says it should [00:41] I'm trying to add a test for the multi line lazr-js editor [00:42] thumper: There is console.debug, but I can't remember what it does [00:42] huwshimi: ok, ta [00:43] thumper: Check out this page: http://getfirebug.com/logging [00:43] thumper: It has info about stack traces etc. [00:43] thumper: From memory if you log a reference to a function you can get a whole pile of info from it [00:46] thumper: So if you do a console.log(YAHOO.util.Dom) or whatever it should give you an object with a bunch of properties [00:49] thumper: Just ducking out for a minute. Let me know if that doesn't help you and I'll get to it when I'm back [00:49] wallyworld_: can I have a review please of https://code.launchpad.net/~lifeless/launchpad/bug-661988/+merge/48740 ? [00:49] * wallyworld_ looks [00:50] huwshimi: ack [01:02] lifeless: is this an r-c for 11.02? [01:03] wallyworld_: no [01:03] wallyworld_: it will halve the time taken to do distribution bug searches [01:03] wallyworld_: which is a nice improvement, and will drop a top 10 timeout out of the list [01:04] lifeless: sure. a question - why is product_ids.discard(None) needed? [01:04] wallyworld_: that should be obvious :) [01:04] wallyworld_: there are multiple different contexts a task can be target to. [01:05] ah, ok. [01:05] and we were using a left join [01:05] previously [01:05] the left join was crack and is unrelated [01:05] osrry for the dumb question [01:05] bug:bugtask is 1:M [01:06] bugtask.bug is never NULL [01:06] and bugs always have one or more bugtasks. [01:07] wallyworld_: the linked bugs in the mp explain it all [01:07] and the list(store.find(..)) inside the pre_iter_hook causes the results of the find to be cached for use by the main result set when it iterates? [01:08] yes [01:08] they sit in the storm cache [01:08] then by-id lookups will succeed [01:08] cool. that wasn't obvious to me :-) storn noob ;-) [01:09] reasonably common idiom in lp [01:09] should there be a one line comment to that effect then in case anyone else reading the code is not sure - just to make it explicit? [01:09] or if it's well known, no need [01:10] its in a function called eager_load [01:10] I think a comment would be adding neon lights [01:11] it might be nice to have a function on StormResultSet that will completely iterate the set [01:11] just for this [01:11] suppose, but in general calling list() without assigning the result to anything may not always be "obvious" what it does. but that may just be me. [01:17] I think it would be sad to have identical comments all over the code base saying this [01:18] \o/ [01:18] stupid js tests now working [01:18] debugging the tests sucks badly [01:18] but they are working [01:22] * thumper wonders how to commit to lp:lazr-js [01:22] thumper: did you find out how to get access to the DOM then? [01:22] thumper: bzr lp-land [01:22] wallyworld_: no [01:22] wallyworld_: but I found the bug in my code [01:22] thumper: after its reviewed :) [01:22] lifeless: it is reviewed [01:22] thumper: it just uses the normal lp pqm [01:23] thumper: that sucks. there has to be a better way to debug that sort of stuff [01:23] wallyworld_: agreed [01:23] wallyworld_: it was a real PITA [01:23] thumper: can you mentor ian's review of https://code.launchpad.net/~lifeless/launchpad/bug-661988/+merge/48740 ? [01:23] thumper: maybe my IDE can do it :-) [01:23] wallyworld_: btw, why do you say 1000 items in an IN clause is an issue ? [01:25] lifeless: that's when databases start to get inefficient. oracle actually has a hard 1000 item limit - it throws an exception. postgres i believe has a soft limit - it doesn't complain but performance goes south [01:25] wallyworld_: I think its an overly naice heuristic [01:26] wallyworld_: I've seen fine performance up at 15K items in IN clauses [01:26] * wallyworld_ wonders what naice means [01:26] wallyworld_: *naïve* [01:26] lifeless: wow. 15K items!!!!! that suggests to me that the query could be reconstructed [01:26] /scould/should perhaps [01:27] wallyworld_: that application had two different dbs; the output from the query on one db went into the query on the other. [01:27] wallyworld_: but the point is, performance was fine [01:28] sounds like a job for a temp table then [01:28] wallyworld_: at 15 times the point of the 1000 limit you've seen before [01:28] hmmm. i'll have to read mor eon what postgres can do. maybe i've been brainwshed by working with oracle [01:28] wallyworld_: temp table would help if they were doing more than one query in the second db [01:28] wallyworld_: this is one of those 'unless its been measured its irrelevant' cases [01:32] sure. i've tended to use exists when the in list is large. but again, that may be my oracle bias coming out [01:34] that seems bonkers [01:34] the exists subsquery would have to have the IN list as well [01:34] cjohnston: yup [01:34] or you would have to write a temporary table, and select from that [01:34] which is equivalent with any sensible implementation of IN [01:37] i don't think oracle has a sensible implementation :-) it's always been a pita actually [01:39] \o/ buildbot finished building db-devel rev 10180 [01:53] thumper: O hai? [01:54] wallyworld_: ORA had some good ideas. They counter this with some *shocking* ones. [01:54] StevenK: like what community means? :) [01:54] lifeless: you took the words right out of my keyboard [01:54] lifeless: The Launchpad definition of community sucks too :P [01:55] wgrant: less [01:55] wallyworld_: btw [01:55] wallyworld_: for the bind variables patch [01:55] lifeless: I was talking just in terms of the Oracle database product -- which has a vibrant community [01:55] lifeless: The MP definition of community, that is. [01:55] wallyworld_: test_bugtask_search has at least several patches that trigger the failure [01:55] wgrant: even that fails less [01:56] wgrant: In terms of what? Military Police? :-P [01:56] s/patches/tests/ [01:56] lifeless: yeah, and also nascentupload tests too [01:56] * wallyworld_ is impatient for staging to get rev 10180 deployed [01:57] Are we going to unfreeze as soon as we are QA'd past the merge? [01:57] wallyworld_: while you wait, get that bind variables thing underway :) [01:57] wgrant: yes [01:57] Yay. [01:57] wgrant: yeah [01:57] lifeless: i have some recipe stuff to do first [01:57] * wallyworld_ has too many concurrent tasks [01:58] bad idea ;) [01:58] yes [01:58] lifeless: So, in leiu of thumper -- I have fixed 683321 -- but I'm not happy with my fix [01:58] * wgrant throws fire at checkwatches. [01:58] StevenK: shoot [01:58] wgrant: so fix it [01:59] wgrant: btw I did some analysis of the perf bugs you had in progress; hope it helped. [01:59] lifeless: http://pastebin.ubuntu.com/563642/ is my diff [01:59] Those statement counts of 10000 are a bit suspicious. [01:59] wgrant: what was the end result of qa on rev 12321? did you come to the conclusion it is ok? [01:59] wgrant: its not establising a new request context on each watch [01:59] wgrant: very shallow fix [02:00] wallyworld_: It seems to work, and hasn't broken anything that I can see. But I don't know Translations in depth. [02:00] StevenK: whats unsatisfying about that ? [02:00] lifeless: If you look at lib/lp/code/browser/sourcepackagerecipe.py, lines 528-545 and lines 631-650 (but my line count is off due to said diff) [02:01] wallyworld_: I'm happy to qa-ok it, given how harmless the fix seems. [02:01] * wgrant qa-ok's it. [02:01] wgrant: hennige is going to qa it as his SOD but that's a few hours away yet. we'll have to wait [02:01] lifeless: Compare and contrast those two code blocks [02:01] wgrant: ok. i'll make sure it's followed up. thanks [02:01] StevenK: yes [02:01] They're effectively indentical [02:02] right [02:02] needs to be pulled out sideways [02:02] lifeless: Which is what is my question is -- how? [02:02] looks like a method on RecipeRelatedBranchesMixin would come close to trivial [02:04] lifeless: I was going to suggest RecipeTextValidatorMixin [02:04] StevenK: even better [02:05] lifeless: I might need a little more of a hint :_) [02:06] StevenK: do you have the book 'refactoring' ? [02:06] Nope [02:06] I suggest you grab it; you should be able to expense it bu tcheck with your mgr first. [02:07] the martin fowler one [02:07] anyway [02:07] what you need to do is: [02:07] identify the common code [02:07] if it surrounds some different code, you're going to need a callable or some such [02:08] rearrange both locations until they are truely identical [02:08] then move one of them to the mixin, turning local variables into parameters [02:08] the other copy becomes just a call. [02:18] StevenK: http://martinfowler.com/books.html#refactoring [02:21] * thumper is back now [02:24] lifeless: Examples using Java and UML? [02:24] yes [02:24] And this is a *good* thing? [02:24] the basic structures are the same [02:24] there are some things that don't translate well to python [02:25] e.g. accessors [02:25] and balancing it with performance is a bit of an art [02:25] but there is a tonne of good shit well presented [03:11] thumper: Just saw your post to the mailing list about lazr-js. When we were in Dallas he/we started to do the upgrade but hit failing tests with the new version of YUI. I'm not sure of the status of those problems though. [03:11] huwshimi: I recall that there was something going on [03:11] I didn't want to duplicate effort in fixing the tests [03:14] thumper: I don't remember the specifics of what was breaking, but I think it might have been something that Deryck couldn't fix directly [03:14] * thumper nods [03:14] I'll catch up with deryck in the morning [03:20] is this change to using courier as the fixed width font intentional? [03:23] I've not heard anything about font changes recently. [03:23] in chromium, launchpad today started using a fairly ugly monospace font [03:23] You didn't install msttcorefonts yesterday? [03:23] Hmm. [03:24] Chromium 9 was pushed out to Ubuntu yesterdayish. [03:24] it seems to want [03:24] font-family: "UbuntuBeta Mono","Ubuntu Mono",monospace; [03:24] poolie: It looks like if you don't have the Ubuntu Mono font it will default to whatever your browser/os default mono font is [03:25] I have "Ubuntu Beta Mono 17" [03:25] from "Walled Garden of Temptation" [03:26] is there a font "UbuntuBeta Mono"? [03:26] poolie: I don't think that would cut it [03:26] poolie: That was the name we were given months ago, before a mono variant existed. [03:26] Apparently they did not follow their scheme. [03:26] apparently not [03:27] do either of you have "Ubuntu Mono" or "UbuntuBeta Mono"? [03:27] poolie: nope [03:27] I should though [03:27] poolie: I can tell you how to rename the font [03:28] i guess that chromium's change may have it no longer interpreting "monospace" as meaning the system monospace font [03:28] which is probably a bug there too, but lp has a bug if it's asking for ubuntu fonts that don't/won't exist [03:32] huwshimi, how? [03:32] istr you can make aliases in fontconfig [03:32] poolie: The way I would do it would be to modify the font itself (or a copy of the font) [03:33] poolie: but you might be right about using aliases [03:35] well [03:35] we shouldn't have poolie rename the font [03:35] we should update lp to use the name actually used by the font [03:36] well, I doubt the number will be in the final name [03:36] lifeless: I suspect that poolie has a pre-release version with a version number in the name [03:36] right [03:37] i think _everyone_ has a version number in the font [03:37] if they have it at all [03:38] poolie: I guess people will have different version numbers though [03:38] https://bugs.launchpad.net/launchpad/+bug/714381 [03:38] <_mup_> Bug #714381: launchpad css asks for "UbuntuBeta Mono" font that doesn't exist < https://launchpad.net/bugs/714381 > [03:38] huwshimi, yeah [03:38] i find that a bit weird, but i guess that's their decision [03:39] we could ask for 17 [03:39] or prefer 20, 19, 18, 17, ... [04:00] poolie: neither Chrome or Firefox respect the os's default font it seems. [04:19] * thumper EODs [04:31] * wallyworld_ wonders why staging seems to be taking so long to come up again [04:32] wallyworld_: we'll find out when spm returns [04:32] lifeless: is he the one who also needs to then do the merge into devel etc [04:57] lifeless: i'm off to pickup the kid from school. will check back in 30 minutes or so to see the status of staging [04:58] wallyworld_: see -ops [04:58] wallyworld_: will need stubs input to recover [05:32] wgrant: view-source:https://qastaging.launchpad.net/ubuntu/+archive/asuka-wants-to-get-rocked/+index [05:32] At least 80 queries/external actions issued in 9.28 seconds [05:32] wgrant: I'm just impressed its rendering on qastaging [05:35] lifeless: Oh wow. [05:35] That's nice. [05:36] At least 4 queries/external actions issued in 0.08 seconds [05:36] ?! [05:36] Ah, I can't see it. [05:36] That's fewer queries than I would have expected for an Unauthorized, though. [05:36] oh, needs to be enabled ? [05:36] I guess it reinitialises the view. [05:36] Yeah. [05:36] yeah, it does [05:37] https://qastaging.launchpad.net/ubuntu/+archive/asuka-wants-to-get-rocked should work for you now [05:38] I wish we had a discrete menu at the top like gmail does [05:40] Hm? [05:45] lifeless: You mean like a global navigation/user specific options sort of thing? [05:46] yes [05:46] huwshimi: oh excellent, you are here [05:46] is span still appropriate to wrap something inline in a paragraph ? [05:46] silly tal wants hierarchical containers :( [05:47] lifeless: Yes, a span is good. [05:50] lifeless: If you don't actually want the element to be there, you can just use a [05:51] lifeless: I was thinking the exact same thing about the global nav earlier today. I came to the conclusion that it depends what launchpad wants to be. At the moment, once you get to a project you're pretty much stuck there (except by using the links in the footer or clicking your name at the top right). This makes Launchpad good if you want Launchpad to be quite invisible. If Launchpad wants to be more collaborative [05:51] and feel like a destination itself (rather than the project being the destination) then I think some global navigation would go a long way to making Launchpad more whole. [05:52] I think. [05:52] AFAICT the point of LP 3.0 was to make LP disappear. [05:52] The project was made the prominent entity. [05:52] wgrant: Right. So it depends what Launchpad wants to be. [05:53] Exactly. [05:54] I get the feeling that Launchpad may move back away from that [05:56] FWIW I'd be looking at a balancing act [05:56] I think lp is terribly hard to navigate at the moment [05:56] but its easy to jump around within a project on lp. [05:58] lifeless: I guess it's something we should talk to jml about? [05:59] wgrant: ah yesm cool. thanks. [06:00] huwshimi: I think that would be a good start; OTOH this is arguably small fry right now given the massive lack web2.anything ;) [06:00] lifeless: It might be small fry, but I think it's these little steps that quickly add up to creating a lot of impact. [06:01] lifeless: I'll shoot jml an email about it [06:01] huwshimi: cool [06:02] lifeless: Do you have a minute to talk about another navigation issue? [06:03] sure [06:04] huwshimi: trade you for a little dom glue [06:04] lifeless: Deal. [06:04] so, what can I help you with ;) [06:05] draft post about web_link: http://blog.launchpad.net/?p=1916&preview=true [06:06] lifeless: I was wondering if you knew what technical advantages we gain by having our "apps" (bugs, code etc.) on different sub-domains, if any. [06:06] :) [06:06] huwshimi: it costs us [06:07] lifeless: Oh, in what way? [06:07] huwshimi: its complex to do, to maintain, has a performance cost on domain switches. [06:07] lifeless: Right. [06:07] clicking on code, for instance, -> 6 second delay to do SSL handshake (for you or I [06:07] huwshimi, i think it's a bit of an artifact of there once being a plan to make them more separated [06:08] its a solution to one ui problem, which is 'what url to give a different rendering of a single object' [06:08] poolie: yeah, I read Mark's blog post about it. [06:08] huwshimi: url for that? [06:08] lifeless: http://www.markshuttleworth.com/archives/30 [06:09] :) [06:09] keeping people in the zone is good, but i don't know that splitting the url is the most useful thing to get there [06:09] but that's 5 years ago now [06:10] lifeless: I'm just speculating now, and really just doing research, but would would be the cost of migrating off subdomains? [06:10] huwshimi: I dislike estimating for other people.... but I think a feature squad could do the heavy lifting in a week. [06:11] huwshimi: there are several steps needed: [06:11] - we need to map the existing content into the main url hierarchy. E.g. we could put +blueprint at the end of a url to mean what currently blueprints....../thing/ means [06:12] - we need to decide on a forwarding strategy for the old urls (e.g. do it in apache, or in the appserver indefinitely or ...) [06:12] - we need to assess the usability impact - and benefits [this is a LEP level thing I think] [06:12] - and we need to execute [06:13] I *think* some clever code in the publisher could do the initial translation for us, but we'd want a way to be really clean internally going forward. [06:14] Moving the pages off subdomains is very easy. [06:14] There may be some slight issues getting the facet breadcrumbs to work properly. [06:14] But that's about it. [06:15] wgrant: right; and we have to retain urls to show all the facets [06:15] We already have those. [06:15] But we might want to rename them. [06:15] (+code-index, +bugs-index, ettc.) [06:16] ah, I hadn't actually read that bit of glue; ok, so yes, what I thought could be written has been. [06:16] There are some views (mostly Code and Translations) that exist only on the relevant domain. [06:16] Our bzr-git is still oldformat bzr repo [06:17] But they are very much the exception. [06:17] also a source of user complaints [06:17] Yes. [06:18] notwithstanding the issue with sending api calls to the right place, I'd like to fix that. [06:18] Particularly the lack of Branch:+index. [06:18] It vanished a couple of months back :( [06:18] success [06:18] 15 queries/external actions issued in 0.18 seconds • lifeless • [06:18] huwshimi: ok, so [06:18] huwshimi: I've got this little bit of text I want to show up beside my login [06:19] huwshimi: the problem is that it has to be rendered *after* all the rest of the page. [06:19] lifeless: Yeah thanks for that. It was very helpful. [06:19] huwshimi: its only going to show for developers [06:19] whats the best way to make it show up where the login name is, but have it evaluated at the end of the page. [06:19] e.g. is a