[00:03] Project devel build #1,014: STILL FAILING in 3 hr 58 min: https://lpci.wedontsleep.org/job/devel/1014/ [01:35] jelmer: maybe we don't need new code import mails now? [01:37] Heh. [01:39] not that i really mind, it's not like they take long to dispatch [02:26] mwhudson, they're probably going to give me Carpal Tunnel Syndrome though from all the clicking needed to delete them :P [02:36] Good morning! [02:36] Evening nigelb. [02:36] cody-somerville: heh, automate with selenium! [02:36] wgrant: I'm taking a shot at TDD today. Writing tests first. I hope that doesn't mean more headdesking :) [02:37] nigelb: It gets better :) [02:37] nigelb: Particularly when they aren't doctests. [02:38] Yeah, I'm wondering why StevenK's deletion spree doesn't delete doctests yet :D [02:39] He spent a week deleting lots of doctests a while ago. [02:40] So there is hope. [02:40] btw, lifeless is proud daddy yet? :) [02:42] How was about last night, so I suspect not, but have not heard either way. [02:43] Ah, ok. === jtv changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: jtv | Critical bugs: 244 - 0:[#######=]:256 [02:53] And I've picked up bug 684548 [02:53] <_mup_> Bug #684548: Display Edit Patch Flag More Prominently < https://launchpad.net/bugs/684548 > [02:53] Morning jtv! I shall be troubling you in a bit. [02:53] * jtv rushes to change the topic :) [02:54] heh === pjdc_ is now known as pjdc [02:58] Should. Stop. Looking. At. Ivanka's. Pictures. [04:01] Project devel build #1,015: STILL FAILING in 3 hr 58 min: https://lpci.wedontsleep.org/job/devel/1015/ [04:18] Text conflict in test_notification between stable and db-devel. Orsum. [04:40] good morning [04:44] wgrant: could you help me with qa for r13826? It's too early in the morning for me to even understand the related bug... problem is: I am a bit desperate to deploy a revision >= 13822 [04:57] adeuring: It's been broken for nearly 18 months; is it really urgent? [04:57] wgrant: yes, unfortunately [04:57] Intriguing. [04:57] Looking. [04:58] Ah, need to resolve the conflict first, since DF runs db-devel... [05:07] jtv: Are you still using dogfood? [05:08] wgrant: no, I use a piece of cloth now. It doesn't absorb as well but it muffles more effectively. [05:09] Hah. [05:10] So no. [05:10] Meanwhile, I see we have a wonderful merge conflict. [05:10] I'm pushing a branch for that. [05:11] Cool [05:11] But db-devel hasn't been merged in a while, so my 256kbps upstream is being painful... [05:19] adeuring: Hmm, this revision may be bad. We'll see shortly. [05:19] ok... [05:22] Well, maybe not so shortly, since mawson is mawson. [05:24] jtv: http://librarian.dogfood.launchpad.net/71107310/bRhzSbgpU9MP0WU1BbgvqBNgitQ.txt is worrying. [05:24] jtv: The DSDJ runner can't check packageset membership... [05:25] I wouldn't think that would be a new thing. [05:25] That sounds familiar somehow. [05:26] I would suspect that a cowboyed privilege dropped out of the db without the permanent privilege making it in. [05:26] Either because security.py wasn't run, or it failed, or it did not contain that required permission. [05:27] There is no permanent privilege. [05:27] I just reran security.py and checked security.conf :( [05:27] granted select on flatpackagesetinclusion and packagesetsources, and it works. [05:29] And packagesetgroup, it seems. [05:41] Does anybody know how to use Thunderbird's account creation wizard? [05:41] They've removed manual setup, and I can't work out how to use an account on a provider that they don't know about. [05:45] Spend 5 minutes why launchpad.dev wasn't working. Sigh. [05:45] *debugging [05:46] Was it running? [05:46] Yeah, https [05:47] I can do a create_initilized_view for all the portlets too? [05:47] In general that should work. [05:47] tdd is weird, at last at first. [05:47] For some it won't. [05:47] *least [05:53] adeuring: I think that rev is good. [05:53] Which means we can deploy. [05:53] wgrant: great, thanks for your checks! [05:53] Sorry it took so long. High startup time and lots of checks to do. [06:06] so, I create a bug. [06:06] I add an attachment [06:06] now, how do I get the comment of that attachment? [06:08] (I feel more lost writing tests first) [06:13] nigelb: BugAttachment.message [06:13] ah [06:13] need to look at models deeper. [06:14] nigelb: I often find it's clearer to check the DB structure. [06:14] \d bugattachment [06:15] I'm not well versed with postgres enough.' [06:15] yet. [06:15] psql launchpad_dev [06:15] \d bugattachment [06:15] Done :) [06:15] wow [06:16] I did not know about psql. [06:16] This, is neat. [06:28] nigelb: I told you that exact same trick! === jtv is now known as jtv-eat [06:31] jtv-eat: well, I didn't know how to use it correctly :) [06:35] psql is love [06:37] hehe, so with tests first, I can head desk first [06:37] and then when I fix it, there's more joy [06:37] Gah, I can't do this apparently. [06:38] html = create_initialized_view( self.bugattachment.message, name='+index', )() [06:40] nigelb: Why not? [06:40] nigelb: It's odd syntax, but it should work. [06:40] Oh, hmm. [06:40] There's no +index for Message itself. [06:41] ah. [06:41] You'll need to get the BugMessage. [06:41] (Message just represents an email in LP. May be on a bug, merge proposal, answer, mailing list...) [06:42] oh. [06:46] ForbiddenAttribute: ('BugMessage', ) [06:48] getUtility(IBugMessageSet).getByBugAndMessage(some_bug, some_message) [07:09] hehe [07:09] awesome traceback [07:09] Oh? [07:09] http://dpaste.com/605694/ [07:17] wgrant: Thoughts? :) [07:17] nigelb: Hm, that's pretty nice. [07:18] Haha [07:18] nigelb: It looks like you're calling it with a bugattachment, not bugattachment.message. [07:18] aaah. [07:22] Sigh. [07:22] http://dpaste.com/605703/ [07:24] Why do I end up wasting more time than finding a fix in tests :| [07:25] Ah, it looks like you actually want BugComment:+index, not BugMessage:+index. And BugComment creation is not for the faint of heart :/ [07:25] You're possibly better just rendering BugTask:+index. [07:26] Well, the problem is the edit shows up in a portlet as wwell. [07:26] I don't watch to get that. [07:27] OR, I'll have to count the number of appearances. [07:27] Or add a class to the find and use soupmacheers [07:27] Or you can use BeautifulSoup/soupmatcher to look only in the comment list. [07:27] There should be an existing class/ID you can use. [07:27] Ah. [07:29] Ah, we deployed. [07:29] * nigelb checks his fix. [07:29] We did. [07:29] It looks good. [07:29] \o/ [07:57] Project devel build #1,016: STILL FAILING in 3 hr 55 min: https://lpci.wedontsleep.org/job/devel/1016/ [08:06] I have to agree with bigjools, soupmatches is quite rad. [08:11] Hello [08:13] Hello mrevell! Good morning :) [08:14] Hey nigelb! [08:15] nigelb: I'm sure you will come to love soupmatchers ;) [08:15] rvba: Heh, already loving it! [08:15] nigelb: ;) === almaisan-away is now known as al-maisan [08:16] heh, I summoned bigjools? :P [08:16] I was rubbed [08:17] xkcd ruined that reference for me. [08:19] Anyway, I was mentioning how I like soupmatchers :) [09:28] jtv: Could you please have a look at this (tiny) MP when you get a chance: https://code.launchpad.net/~rvb/launchpad/masscreate-bug-835040/+merge/73495 ? [09:54] wgrant: GAH. [09:54] I'm doing something wrong, I'm getting hideous tracebacks. [09:55] wgrant: while you're being distracted, can I interest you in reviewing my DB privilege fix? https://code.launchpad.net/~jtv/launchpad/bug-837893/+merge/73502 === jtv changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: - | Critical bugs: 244 - 0:[#######=]:256 [09:55] My nightmares with tests continue. Sigh. [09:56] Or I could ask danilos, who is OCR'ing today. [09:56] jtv, oh, he is? :) [09:56] Apparently. [09:56] At least on Gregorian Wednesday. === danilos changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: danilos | Critical bugs: 244 - 0:[#######=]:256 [09:56] :-) [09:57] jtv: You're marked under Europe? HA [09:58] I'm sort of inbetween. [09:58] jtv, r=me [09:58] thanks danilos! [09:58] jtv, which one of us? [09:58] wgrant: it's done—you go help nigel or something. :) [09:58] for danilo in danilos: danilo.thank() [09:58] heh [09:59] if I create a bug with factory, I can call its +index right? [09:59] * nigelb checks zcml [10:00] oh, I need to call the +index of the bugtask? [10:00] nigelb: Bug has no +index, right. [10:00] It redirects to default_bugtask's +index. [10:01] so, create_initialized_view(self.bug.default_bugtask, name='+index', )() [10:01] I got a scary traceback for that one. [10:02] http://dpaste.com/605821/ [10:02] I wonder if this has something do with layer = LaunchpadFunctionalLayer [10:03] I think I've mostly used DatabaseFunctionalLayer before. [10:04] danilos: you'll notice I left one review on the queue. It looks like nobody's worked on it but it's got other reviewers' names on it. [10:04] jtv: thanks for the review mon cher. [10:04] rvba: ton /quoi/? [10:04] Très cher jtv ;) [10:04] le horreur [10:04] I thought I was doing this work at quite a reasonable rate. [10:05] jtv is actually cheap [10:05] Oh now that's rich. [10:05] And is it le horreur or l'horreur? [10:05] hehe [10:05] "l'horreur" indeed. [10:05] FTR this "cher" was "dear". [10:06] Funnily enough, "dear" can have both meanings in English. [10:06] I was enunciating all the syllables [10:06] (although "expensive" is somewhat archaic) [10:06] bigjools: I see. Maybe you should enunciate them twice in succession: le horreur, le horreur [10:07] Wasn't until that bit in the book that I realized that the film was based on it. [10:09] “le horreur, sans blague”? [10:10] nigelb: I /think/ the problem you have is due to the fact that you don't pass any 'principal' to create_initialized_view. [10:11] rvba: principal being a person? [10:11] nigelb: yes. [10:11] rvba, nigelb: It defaults to anonymous. [10:11] This is possibly another view that doesn't like being instantiated directly :/ [10:11] It's a fairly horrific view. [10:12] I tend to pick the fun ones, yeah. [10:12] I'm pretty sure I had this exact same problem. [10:12] Someday I'll learn how to do this right :| [10:12] Ha, solution? [10:13] nigelb: please try principal=factory.makePerson() [10:15] mmm [10:15] NoCanonicalUrl: No url for None because None broke the chain. [10:19] nigelb: Looks like something is trying to redirect to None. [10:20] rvba: Oh. [10:20] That's wweird :| [10:21] I should have started with fixing the bug isntead of tests [10:21] jtv, on line 84 of the diff on https://code.launchpad.net/~jtv/launchpad/bug-834388/+merge/73483, "removables" is not a ResultSet, right? [10:21] I've spend 8 hours and I've nothing to show for it, except a broken test :) [10:22] danilos: no, it's a set that's first painstakingly constructed by hand. :/ [10:22] Sorry, list! [10:22] Not set. [10:23] jtv, ok, fair enough (btw, I am surprised you didn't know about resultset.set() :P) [10:23] Well, now I do! [10:23] nigelb: It's a good habit to start with the tests. And its absolutely normal to have trouble to write tests at first. [10:23] I have to leave very very soon btw [10:24] jtv, sure, I am almost done with this second review [10:24] Great, thanks [10:24] jtv, just one more non-critical question, why the changes to logger statements? [10:24] They annoyed me. [10:24] Why have special provision for debug [10:24] but none for the other log levels? [10:25] Someone's going to do a logger.info or a self.warn and find it doesn't exist. [10:25] Or do you mean the string interpolation? [10:25] Apparently the "proper" way to do it is logger.info("format %s string", variable) [10:25] Not logger.info("format %s string" % variable) [10:26] Hrm, I wonder what I do next. [10:26] I can't get the view to get a test. My test is supposed to just check the existence of a URL. [10:26] btw guys, what is the best way to find out what handles/generates a particular page? [10:27] configure.zcml [10:27] it will be inside browser folder [10:29] jtv, I meant both, the fact that logger.info considers the first string a format string doesn't make it proper in my book, but I don't care either way :) [10:29] nigelb: ah ha, thanks! :) [10:29] G: :) [10:29] jtv, it'd make sense if it was something like structured() or sqlvalues() where stuff needs to be interpolated some how [10:29] s/ // [10:29] danilos: I never bothered to ask really, it just allows for slightly better formatting. :) [10:30] jtv, heh, sure, formatting is a good argument [10:30] jtv, anyway, r=me already, but I assume you know what will this do for performance :) [10:30] thanks! [10:30] It'll improve the normal case, make the weird case worse. [10:31] And it shows future engineers how to fix the weird case. === jtv is now known as jtv-afk [10:34] wgrant / rvba: Anything more I could try? [10:34] nigelb: please paste your diff. [10:36] http://dpaste.com/605832/ [10:39] hmmm took a look at bug 61428 and I think I've identified a 3 line fix [10:39] <_mup_> Bug #61428: Want a "subscribed to teams" portlet... < https://launchpad.net/bugs/61428 > [10:40] The 'proper' way of interpolation with the logger API saves interpolation time, but has a habit of hiding interpolation bugs as we end up with untested code paths. [10:42] ahhh actually, not that simple [10:49] danilos: if you've got a moment, question about the above mentioned bug, the portlet while nearly identical for a subscribed bugs page, is nearly the same as the current assigned bugs (person-portlet-team-assignedbugs.pt) is the attitude to create a seperate portlet, or try and introduce logic to the current portlet [10:50] gmb: Bug comment lazy loading - what will search engines see if we turned this on for everybody? [10:51] stub: Uhm... Well, at the moment it's just JS on top of what's currently there. But fair point; if we did it automatically then it would be not good for our Googlejuice. [10:51] G: I am looking at it [10:52] gmb: Or using text-only browsers :) [10:52] nigelb: also true. [10:52] gmb: Yer. We might need to be more intelligent. Default batched comments with a sane batchsize, and js magic to improve on that if you have js. [10:52] Thankfully, we're talking about something I haven't done yet :). [10:52] heh [10:52] stub: Agreed. It wouldn't be too hard to do that, actually. [10:53] danilos: a second portlet, would basically be :%s/assigned/subscribed/g w/ a little bit of extra CSS for the new div class id's [10:53] For insane people who want to scroll through the entirety of Bug #1 [10:53] <_mup_> Bug #1: Microsoft has a majority market share (at least my intpretation) [10:53] argh! [10:54] But there are probably Ubuntu bugs worse than that. [10:54] rvba: Were able to spare a minute to look into that diff? [10:54] G: right, I think you are better off reusing it, and just introducing a few variables like CSS class and target view to decide what to do in the template [10:54] G: though, that entire portlet looks like a very bad UI, but if you find it useful, it's better than no UI :) [10:55] nigelb: Yes, nothing seems bad with your diff but this "NoCanonicalUrl: No url for None because None broke the chain." is a tricky error. [10:55] nigelb: hang on. [10:55] okay, so I'm not going completely crazy :) [10:56] danilos: so just cp it, and change where it's needed [10:57] G: nope, with "reusing" I meant use the same template (perhaps rename it), but modify it so you can pass in the bits like the div ID and "+assignedbugs" part of URL from the view [10:57] ahh yep, I get you [10:57] so basically the second option (introduce logic/pass variables) [10:58] G: btw, would it not be better if there was a page listing all the actual bugs any of your teams is assigned to/subscribed to? [10:58] G: yes [10:59] danilos: you mean something like +subscribedbugs as is, and then something like +subscribedbugs/+all ? [10:59] G: yeah, something like that [10:59] actually, +indirectsubscribedbugs [11:00] danilos: couldn't that be quite 'expensive' if someone did that against say Mark Shuttleworth who I'm guessing is a member of a lot of teams? [11:01] G: it could be nontrivial, sure, but if that's the question you really want answered with this page, it should be doable, imho [11:01] (expensive as in time to generate & amount of data that could be retrieved from the DB for some people) [11:02] G: of course, I am not suggesting you should block on this, but just wondering if that's what you really want? [11:02] G: also, as far as data being transferred from the DB, we do batch most of the big requests [11:03] nigelb: Why are you rendering a view on bugTask in test_bugattachment_edit_view? [11:03] rvba: I should move it to another file, but I wanted to write it some place where attachment bits existed. [11:03] Is there a better place already existing? [11:04] danilos: actually seems +bugs does that already [11:04] nigelb: I don't know that code (bugs) very well but I /think/ the bug is not properly setup for you to render bugTask:+index [11:04] hmm. [11:05] I should perhaps tell you what I'm testing so you can suggest a better, working alternative. [11:05] nigelb: My advice would be to find in the code a properly setup bug (one that ressembles what you want to test). [11:06] When you attach a patch on LP, it shows up in the comments, but the edit link is a portlet on the left. I'm adding that edit link to the link in the patch as well. [11:06] Ah, perhaps I should try that. [11:06] G: yeah, though I'd never claim to know what exactly "related" means there [11:06] nigelb: I see. [11:06] G: at least not before reading the code carefully :) [11:07] danilos: I think 'related' is something all could easily be lost in translation [11:07] G: I also dislike the concept of me being related to a bug ;) [11:07] G, danilos: "Related" is a combination of all the filters. [11:07] s/combination/union/ [11:07] danilos: but the way I see it is: all bugs (x) has had something to do with [11:07] Stuff you're subscribed to, or assigned to, or reported, or commented on. [11:08] hrm, I could do a browser test I guess. [11:08] wgrant, that simple? no team subscriptions considered? [11:08] danilos: Correct. [11:08] wgrant, right, thanks [11:08] ahhh so it doesn't consider via teams [11:08] nigelb: that's already what you tried to do. [11:08] G: Good to see you tackling more issues. :-) [11:09] StevenK: seems a bit of a waste to sign a document to contribute and stop after one issue :) [11:09] rvba: No, the from lp.testing.BrowserTestCase [11:09] StevenK: Isn't it fun that there are two new people contributing and both of us have the same first name ;) [11:09] G: so, my gut feel is that we should be able to generate a single pages with all related bugs for any of the filters which includes your team subscriptions: basically, the "only" difference would be a join through TeamParticipation table :) [11:10] nigelb: That isn't confusing *at all* [11:10] heh [11:10] G: s/single pages/self-contained pages/ [11:10] StevenK: that and, I really like Launchpad, and the code is much better than another unnamed set of tools are :) [11:11] wgrant: Can I hope for mildly better success with BrowserTestCase? :) === henninge is now known as henninge-lunch [11:12] danilos: actually, what I was wondering is if the best way is to create an AJAXy portlet that uses the team list, to basically: "Also show bugs assigned to: " [11:13] or even a "Showing directly (assigned|subscribed) bugs, [link: include indirectly (assigned|subscribed) bugs] [11:14] G: yeah, though choosing through a bunch of checkboxes is a nightmare imho :) [11:15] danilos: yeah, I agree [11:15] but with an on/off type thing, it'd also be possible to still list the user's teams that implements the existing behaviour as well [11:17] G: yeah, though user's teams are listed elsewhere as well (I'd even argue that it's misplaced on +assignedbugs now) [11:18] danilos: well for someone with a lot of team memberships, it allows drilling down to individual teams easily, but I agree to that view as well [11:18] G: true, true [11:18] G: well, I think providing the list won't be bad or wrong, so I suggest you just go for it :) [11:19] (I just realised as well, that it'd likely have to be a non-AJAXy because the searching is also non-AJAXy [11:20] nigelb: I think the only place where this (adding a comment with a attachement) is tested is bugtarget-filebug-views.txt === al-maisan is now known as almaisan-away [11:21] doctest :( [11:21] Indeed. [11:22] Maybe just a portlet that basically has: http://dev.nigelj.com:81/bugportlet.txt [11:23] nigelb: my advice would be to see what your fix does to that test. If you only need to add a couple of lines in there, it's fine. [11:23] or is that getting a little too complex? [11:23] anyone else seeing update-sourcecode breaking when run from rf-get? [11:23] bigjools: the cache file? [11:23] yes [11:23] yeah, I saw that yesterday [11:23] I was told to just use the merged version in devel [11:24] there's a conflict [11:24] Someone probably updated it on an i386 machine. [11:24] So the order is different. [11:24] nigelb: I'm sorry but I'll have to leave you to it now. Maybe danilos can give you a hand if you need more help. [11:24] rvba: Sure, no problem, I'll dig deeper. [11:25] bzr resolve --take-other FTW [11:25] yeah, that's what I did [11:25] *too [11:25] danilos: does that look semi-sane, or a bit too long? [11:25] This may come off as exceedingly stupid. How do I run a doctest? [11:26] G: I think it'd be fine [11:26] nigelb: bin/test -t [11:26] G: and definitely an improvement over what we have now [11:26] bigjools: ah, thanks! [11:27] danilos: and basically the idea is for it be no-AJAX, and just add a includeindirect=1 to the request to +subscribedbugs [11:27] nigelb: remember that doctests are loaded by unit tests [11:27] nigelb: ./bin/test -cvv -t xx-doctest.txt [11:27] (or assignedbugs for that matter) [11:27] G: I'd also do it in two steps (branches) to make it easier: generalize what we have in one branch and make it work for the subscribed bugs case, and then another one to provide the indirect bug searches [11:28] G: yeah, that sounds good, though that may conflict with the search parameters [11:28] danilos: so basically 1 branch to include it for subscribedbugs, and then a second branch to implement show indirect [11:28] hmm, is something up with loggerhead on staging? [11:28] bigjools: oh. that's why everyone tells me doctests having a slightly weird loading. [11:28] G: yep, that also ensures you solve at least one problem [11:28] danilos: ahhh a good point === matsubara-afk is now known as matsubara [11:29] G: (if the "include indirect" turns out to really be too expensive) [11:29] jelmer: Probably. asuka has been in swapdeath twice in the last 24 hours. [11:29] jelmer: Stuff may need restarting. [11:29] jelmer: although codebrowse is tellurium, so I am stupid. [11:29] Gah, I fixed it and I don't see a text breakage. [11:29] *test [11:29] The one time I'm unhappy a test didn't break. [11:29] nigelb: this is an example of one: lib/lp/archivepublisher/tests/test_publisher_documentation.py [11:29] wgrant: ah, ok [11:29] danilos: alright I'll type it up in launchpad [11:29] wgrant: either way, I guess should ask a losa [11:30] wgrant: what was up with asuka? [11:30] G: cool, I'll be switching locations soon, but if you want me to comment on the bug as well, just let me know :) [11:30] jelmer: I'm not sure that was ever determined. [11:30] bigjools: Ooooh. thanks! [11:30] danilos: thanks! [11:32] wgrant: hmm, that makes me feel a bit uneasy about the stuff that is currently on staging.. [11:33] jelmer: You could obtain process listings. [11:33] jelmer: I believe they are taken every minute or 5. [11:33] danilos: does person-portlet-team-bugs.pt should better than ...-team-assignedbugs.pt for a generic version? [11:34] G: it does, yeah [11:35] it's quite amazing when DF manges to load a page that [qa]staging is timing out on [11:35] bigjools: You used TRUNCATE, didn't you? [11:35] hmm? [11:36] The only explanation for that is that you TRUNCATEd the table. [11:36] nope [11:36] Lies. [11:37] heh [11:38] Is asking for a review of a branch I couldn't successfuly write a test cheating? [11:39] :) [11:43] wgrant: Is this fix released? bug 833743 [11:43] <_mup_> Bug #833743: test_versioninfo fails when system has bzr 2.4 < https://launchpad.net/bugs/833743 > [11:44] nigelb: Indeed. [11:45] woah, too fast. [11:48] what are the runes to make bin/test pick up the failing tests in a testr repo? [11:49] testr init ; zcat ~/Downloads/4595-upgrade-bug-linking-r13582.subunit.gz | testr load; testr run --failing [11:49] where the ~/Downloads path is the subunit file. [11:50] bigjools: is ^ that what you meant? [11:50] nigelb: perfect, thanks [11:50] :) [11:50] how does it know to use bin/test? [11:50] bigjools: the .testr.conf file [11:51] I just assumed StevenK's magic would work. [11:51] which begs another question ... :) [11:51] how did I have that config already [11:51] bigjools: it's part of the launchpad tree [11:51] :) [11:52] ah! [11:52] heh [11:52] that would make some sense, yes [11:55] danilos: Could I add https://code.launchpad.net/~nigelbabu/launchpad/patch-edit-684548 to your list? :) [11:55] I've been unsucessful in getting tests for it sadly. Any help appreciated :) [11:57] Is there a helper to make non-blocking reads on a Python file object, or am I stuck with select() boilerplate? [11:59] Twisted? :) [12:00] are you in a loop that keeps checking? [12:07] excellent, TDD dream works [12:09] danilos: hey quick question, I can seem to find any other pages that does the whole pass variables to a portlet thing, do you know of any so I can have a look at one [12:11] GAH, qastating. Y U NO let me file bug. === almaisan-away is now known as al-maisan [12:28] bigjools: is bug 284707 still trivial? [12:28] <_mup_> Bug #284707: When Launchpad Janitor closes a bug due to a package upload, the message should link to that upload page < https://launchpad.net/bugs/284707 > [12:29] nigelb: Yes. Should just need the template changed to insert a link -- which can be easily generated using canonical_url. [12:29] nigelb: mostly, you just need to get the DSPR and use canonical_url() on it [12:29] But how do I test... [12:29] find the existing test [12:29] I mean, not programmatically [12:30] do an upload locally [12:30] and run process-upload.py [12:30] hm, this is going to be fun. [12:30] nigelb: Nah, it was fun 2 years ago. [12:30] Now it's well-documented and partially scripted :) [12:30] https://dev.launchpad.net/Soyuz/HowToUseSoyuzLocally [12:31] wgrant: I'm still stuck on the test for that bug. The "fix" turned out to be 2 lines. Once again haunted by tests. [12:31] nigelb: Is your TDD experiment working? [12:32] StevenK: I failed spectacularly. [12:32] do it for this one, really [12:32] The second bug I picked up turns out to have been fixed by wgrant a few months back. [12:33] Also, what kind of box does qastaging run on? netbook? [12:33] My local instance seems fast than that. [12:33] Hahaha [12:33] staging is timing out today [12:33] nigelb: qastaging *and* staging both run on asuka. The poor thing is running *two* Launchpads [12:34] hmmmm I don't get how I can pass data to a template portlet === danilo_ is now known as danilos [12:34] G: "view" and "context" contain what you think. So you can do view/property or context/property [12:35] mrevell: "The Great Dismal Swamp" isn't some part of Launchpad? ;) [12:35] * nigelb runs [12:35] I read "The Great Dismal Swamp" but said "Soyuz" [12:36] heh [12:36] I was thinking of blueprints though [12:36] nigelb: What did I fix? [12:37] bug 667413 [12:37] <_mup_> Bug #667413: "HowToTriage" URL in "thankyou for reporting this ubuntu bug" box should be a link < https://launchpad.net/bugs/667413 > [12:38] bigjools: basically I'm trying to generic-ize the person-portlet-team-assignedbugs.pt portlet, (/+assignedbugs) but I can't see any way to pass "+assignedbugs" etc to the portlet [12:38] unless I'm lost somewhere [12:38] nigelb: qastaging and staging share an appserver (asuka) and a DB server (sourcherry). I don't know asuka's specs, but a fair bit of the bottleneck is the DB. sourcherry has 32GiB of RAM and has two LP DBs. The production DB servers have 132GiB of RAM (I believe), a single DB, and there are three of them. [12:38] nigelb: So I did. Thanks for finding that. [12:38] wgrant: 32 GiB of RAM? [12:39] 132GiB of RAM? nice :) [12:39] Oh, right. It has the eentire prodcution data [12:39] nigelb: The production database is like 240GiB [12:39] nigelb: Yes. The LP DB is hundreds of gigabytes, so... [12:39] G: that's a traversal, you need to define that in zcml. [12:39] and there be dragons [12:39] oh look, it's lunchtime! [12:39] tea time! [12:40] Wow. I reviewed that when I was still being mentored. [12:40] StevenK: wgrant's branch? [12:40] nigelb: Yup [12:40] Neat :) [12:40] bigjools: so is traversals for this a good thing, or a bad thing (i.e. if it's a bad thing, something that should not be generic-ized) [12:40] I didn't know you were a full reviewer only recently. [12:40] nigelb: Commit message for that revision you linked in the bug starts with [r=stevenk, thumper] [12:41] nigelb: Graduated 15/03 [12:42] G: I don't know what you're trying to do exactly, but normally if you want a generic portlet you need to attach the template to a view in zcml, and then you can use /@@ in the other template that needs the portlet [12:42] StevenK: 2003? [12:42] Or March of 2011 [12:42] but I am vastly simplifying [12:42] nigelb: No, March. === henninge-lunch is now known as henninge [12:42] Fairly recent :) [12:42] I remember wgrant being a full reviewer. [12:42] err, getting full review [12:43] GRAR [12:43] *reviewer [12:43] Almost six months [12:43] I now know I've learned quite a bit in the last 9 MPs. [12:43] Especially when I see G go through what I as going through branches 2 to 5 ;) [12:44] haha [12:44] And what I went through for branches 2 until 30 [12:44] danilos: Hi! Can you please review my branch? [12:44] https://code.launchpad.net/~henninge/launchpad/bug-824435-failure-reporting-4/+merge/73507 [12:44] ohhhhh I think I get what I'm trying to do :) [12:44] (I was working on Soyuz, give me a break. :-) [12:44] heh [12:44] (as crazy as that sounds) [12:45] G: I think most of us know exactly what you mean :D [12:45] nigelb: yeah, I'm a bit of a zope newbie [12:45] StevenK: I still don't know lots. I'm frequently getting stuck at tests as evidenced today. [12:45] G: Join the club! :) [12:45] nigelb: but I think I just worked out the solution to my question, even though I'm still not 100% sure I've been asking the right question (or at least the question the right way) [12:46] That sounds /very/ familiar. [12:46] nigelb, Heh :) [12:48] * nigelb heads for tea. [12:59] Morning, all. [12:59] Hi deryck! ;) [13:00] henninge, sure [13:00] I am getting this error from the LibrarianLayer. It seems that something is wrong with my local python2.6 installation, specifically setuptools. [13:00] http://paste.ubuntu.com/678866/ [13:01] danilos: cool, thanks [13:02] What can to to fix that? [13:24] henninge: https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/834698 [13:24] <_mup_> Bug #834698: setuptools.egg-info can end up as a directory when it is meant to be a symlink < https://launchpad.net/bugs/834698 > [13:24] henninge: rm -rf /usr/lib/python2.6/dist-packages/setuptools.egg-info, and apt-get install --reinstall python-setuptools if it is installed. [13:25] wgrant: ah thanks. I alread tried re-installing but did not remove first. [13:27] yes, now it is a symlink [13:28] and the LibrianLayer works, too .. :-D [13:29] This broke buildbot a bit, and is causing delights in the staging mailbox. [13:29] A dozen emails a minute or so. [13:29] And launchpad-error-reports is getting similar, although not quite so frequent. [13:41] hmmm so I think StevenK was right, I can't do this the way I was thinking [13:42] adeuring, don't worry about marking bugs fix released. looks like wgrant got them all. [13:42] ah, thanks wgrant and deryck! [13:47] danilos: Hi, can you please have a look at https://code.launchpad.net/~rvb/launchpad/dsd-api-bug-833080/+merge/73532 ? [13:47] although it does seem to me a bit odd that I can't access variables from view/foo from a portlet that is included via tal:content === al-maisan is now known as almaisan-away [14:07] \o/ [14:07] lifeless: I can only assume that means one thing [14:07] :) [14:07] congrats :) [14:07] sleep now. details later [14:07] details? [14:07] gah! [14:07] lifeless: congrats [14:08] lifeless: Congrats! [14:11] hey, congrats Daddy Lifeless :) [14:13] lifeless: félicitations ! [14:13] henninge, r=me, sorry for taking this long [14:13] congratulations lifeless [14:14] rvba, looking at yours now [14:14] danilos: Great! [14:14] This calls for a party at next sprint/summit lifeless attends? ;) === danilos changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: - | Critical bugs: 244 - 0:[#######=]:256 [14:17] rvba, is this how we generally export SPNs? [14:18] danilos: ouch, I had a small branch I needed a review :) [14:18] danilos: yes, I took the code from somewhere. [14:18] nigelb, if it's really small, I might be convinced :) [14:18] rvba, cool, just wondering [14:18] https://code.launchpad.net/~nigelbabu/launchpad/patch-edit-684548 [14:19] I really tried my best to write tests for that, but failed. [14:19] rvba, I also assume all of these are public, and no concern should be for privileges? [14:19] danilos: that's right. [14:19] Gah, I mean - https://code.launchpad.net/~nigelbabu/launchpad/patch-edit-684548/+merge/73514 [14:20] rvba, cool, everything else is nice and simple, r=me [14:20] danilos: Thanks a lot! [14:22] nigelb, have you looked at lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt for testing? [14:22] nigelb, (I wouldn't be surprised if that starts failing with your change) [14:22] danilos: It didn't fail :( [14:23] wait. [14:23] that's not the one I tried. [14:23] *checks* [14:25] nigelb, you might still be right, but it shouldn't be hard to extend it to test for this as well [14:25] danilos: I'll do that. I never thought I'd be writing doctests :) [14:25] Yup, I broke that. [14:26] nigelb, heh, well, if you really want, you can start a new view test if you want :) [14:26] danilos: Tried for about 4 to 5 hours :) [14:26] failed. [14:28] nigelb, anyway, please extend the test to assert that the link is right as well [14:28] nigelb, oh, I've noticed you've been discussing that with a few people, fair enough [14:28] danilos: Just fix what I broken right? [I've been at this for 12 hours now :P] [14:28] nigelb, you should try to at least extend the pagetest to make sure it works [14:28] pagetest? [14:28] nigelb, well, not really, I think that is only using extract_text which strips all the tags [14:29] danilos: thank you very much! ;) [14:29] nigelb, yeah, all the doctests in stories/* subdirectories are what we used to call "page tests" [14:29] so, I added an (edit) in the doctest now, it passes. [14:29] do I need to add another new test? [14:30] nigelb, well, you can at least check the actual link tag in there as well [14:30] ah, right. [14:30] let me look at other tests and figure out how [14:31] nigelb, in that same spot there is a getLink call, you should be able to emulate that [14:32] nigelb, something like browser.getLink('(edit)') [14:32] nigelb, or well, just "edit" since that's what the link is [14:33] yeah, got that bit. [14:33] gary_poster: Good morning! ;) [14:33] Now I'm looking around to figure out the pattern to the dit link [14:33] *edit link [14:33] hey henninge, good afternoon. :-) [14:33] ;) [14:34] nigelb, "sprite edit" on the containing might be enough [14:34] gary_poster: I am not sure if you are aware but that ZConfig change I made a few weeks ago actually helped. [14:34] gary_poster: Now I think it is time to submit it upstream. [14:34] nigelb, or itself (i.e. ) [14:34] gary_poster: can you help me with that? [14:35] henninge, I am most definitely aware! It is great! I made sure you were recognized on a team lead call :-) [14:35] danilos: Oh, I didn't add that class. [14:35] gary_poster: thanks ;-) [14:35] nigelb, that adds the edit icon on the link [14:35] nigelb, also, considering you've got parentheses following the edit link now, the layout is not very pretty :) [14:36] danilos: Ah. I just copied the format of the edit in the right portlet as well [14:36] I'll add the class so I can grab it. [14:37] henninge, help with upstream: /me cringes, but yes, can do. I would suggest that one of us email Fred Drake. He knows me, so I might be a better choice, but I'd be very happy to let you do it. He is the ZConfig author, and the author of that particular machinery. I'd ask him for a review and a merge if he's willing; or if he doesn't have the time, he can toss it back to me, and I'll do it. [14:38] henninge, you want me to write that? [14:38] * gary_poster starts email ;-) [14:39] nigelb, do you think you can finish these changes quickly? (I need to leave soon and have a few other things I need to finish, so if you can't do it quickly, we can perhaps come back to it tomorrow morning) [14:40] danilos: Please don't block on me, if I can't get finish it, I can start again tomorrow, no issues :) [14:40] *get it [14:40] *finished [14:40] nigelb, cool, thanks [14:43] nigelb, feel free to ping me tomorrow morning then :) [14:43] gary_poster: sorry, phone call [14:43] * henninge reads [14:43] danilos: sure :) [14:43] danilos: thanks for your help btw [14:43] henninge, I'm three paras in by now ;-) [14:44] gary_poster: no, was reading your explanation. that's only one para [14:44] gary_poster: what are you reading? ;) [14:44] henninge, I mean I'm three paras in to the email that I'm writing to Fred Drake [14:44] ha! [14:44] :-D [14:44] gary_poster: can you please write the email ... ;) [14:44] :-) [14:45] gary_poster: thanks ;) [14:45] welcome, henninge. thanks for the great fix [14:49] bigjools: how do i add an ArchivePermission for a user to a private PPA? can it be done via the UI? [14:50] bac: only on the API [14:50] bigjools: ok then, i'll stop looking [14:51] bac: good idea :) === abentley changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: abentley | Critical bugs: 244 - 0:[#######=]:256 === salgado_ is now known as salgado [15:00] I did wonder why a test wasn't failing. [15:00] I wasn running it in the WRONG branch! [15:02] nigelb: whoops [15:03] I think my understanding of the zope templating methods must be completely off [15:07] bac, ping [15:07] hey deryck [15:11] lifeless: congratulations! [15:11] have we heard anything new regarding bug 809123? [15:11] <_mup_> Bug #809123: we cannot deploy DB schema changes live < https://launchpad.net/bugs/809123 > [15:16] G: the ZPT reference is pretty good: http://docs.zope.org/zope2/zope2book/AppendixC.html or I might be bribed into answering a question or two [15:18] benji: I think part of it is that I'm used to how other templating methods work, and just getting a tad confused about the boundries in ZPT [15:20] benji: essentially in bug 61428 it'd be nice to make person-portlet-team-assignedbugs.pt reusable for both assigned and subscribed methods, but that portlet isn't the one that is the first template loaded (buglisting-embedded-advanced-search.pt) [15:20] <_mup_> Bug #61428: Want a "subscribed to teams" portlet... < https://launchpad.net/bugs/61428 > [15:21] G: I'm looking at the templates in question to see if I can get up to speed with you. === jpds_ is now known as jpds [15:22] Is this lint error okay? " narrative uses a moin header." [15:22] the idea is, in person.py, I was thinking it should be possible to tell the template that the backlink should be "+subscribedbugs" or "+assignedbugs" or "+somethinginthefuture", and I can certainly tell the buglisting-embedded-advanced-search.pt about it (by setting a variable in the python class) [15:22] cjwatson: Still blocked on RT #47040 [15:22] <_mup_> Bug #47040: while booting initial kernel, progress bar looks like Win98 < https://launchpad.net/bugs/47040 > [15:23] cjwatson: (Which had its one month birthday and nobody noticed! Happy Birthday!) [15:23] but the portlet just seems to have no access to it [15:23] nigelb: it's not bad, or hard to fix (instead of "== Title ==" replace it with "Title\n=====" [15:23] benji: cool, thanks [15:24] (I even tried: tal:define="link_back view/link_back" tal:content="existing loading of portlet-team-assignedbugs", without any luck [15:24] (which reading the ZPT documentation, sounded like it should work [15:25] benji: BTW, Your quickstart guide helped me understand a lot of how things work :) [15:25] G: define "without any luck" and "work" :) [15:25] nigelb: I'm glad [15:26] without any luck = "Expression: with a list of variables excluding link_back [15:26] benji: work as in
displays what I had set in the view [15:28] G: the first error makes no sense to me, so I will ignore it ;) the second should have worked with something like "
" [15:28] (assuming that the view really has an attribute or method named "link_back" that holds/returns a string) [15:29] that just makes it "Expression: [15:29] benji: hold on, just pastebin'ing now [15:29] benji: http://paste.ubuntu.com/678981/ [15:29] * benji looks [15:31] G: the first change in person-portlet-team-assignedbugs.pt looks like a typo; why the space and then "view/name"? [15:31] (btw, I've had it with the same issue, with and without the nocall: (thought it might fix it) and with/without the seperate [15:31] benji: oh you can ignore that [15:32] benji: you are right in pointing that out, but I thought the way I was joining the two variables together was the issue, it isn't actually trying to render view/name though [15:33] flacoste: btw, thanks for sorting out the Contributor Agreement [15:33] G: thanks for you contribution! [15:34] flacoste: no problem, I was originally confused about the agreement and the Code of Conduct thing, so it didn't click until late that I hadn't done it [15:34] G: if I apply that patch, what URL could I visit to trigger the error? [15:35] on my system: https://launchpad.dev/~name16/+assignedbugs [15:36] so really launchpaddomain/~user/+assignedbugs where ~user belongs to one or more teams [15:36] bigjools, ping. [15:36] * bigjools is in demand today [15:37] abentley: Can I bring https://code.launchpad.net/~nigelbabu/launchpad/patch-edit-684548/+merge/73514 to your attention? [15:37] nigelb: sure. Be with you in a moment. [15:37] thanks! [15:38] G: if I apply your patch but leave out the broken changes to person-portlet-team-assignedbugs.pt, I don't get any errors when rendering that page [15:39] benji: yep, and if you add in the
the oops will occur [15:39] (ignore the rest) [15:39] and variants such as view/link_back also didn't work [15:40] G: each template has its own namespace, so that name isn't defined there, you can put "view/" on the front of "link_back" and it should work (assuming both templates have the same view object) [15:40] ah, so it may have a different view [15:42] benji: thats the 'class="lp...."' bit in the .zcml file? [15:42] G: indeed, if you look to see where that template is wired up (lib/lp/bugs/browser/configure.zcml) it has a view class of lp.registry.browser.person.PersonView [15:42] hmmmm I just changed it to the same as the handler for +assignedbugs [15:42] and no oops [15:43] and it looks correct [15:43] cool [15:43] benji: thank you very much! [15:43] glad to help [15:46] can't believe I was so close, but so far away at the same time [15:49] benji: oh except it won't be generic still, because +assignedbugs and +subscribedbugs use different classes [15:49] benji: I think you've got me in the right direction though [15:50] G: good luck, if you get in another bind feel free to ask for help [15:53] nigelb: it looks like danilos is your reviewer on that one. [15:54] Yeah, I thought I'd finish it off. [15:54] You'd rather defer to him, I can put it off for tomorrow :) [15:54] nigelb: I'd prefer that. [15:54] Cool, np [15:54] Onto next bug :) === beuno is now known as beuno-lunch === salgado_ is now known as salgado === deryck is now known as deryck[lunch] [16:11] abentley, deryck[lunch]: could one of you review a small fix for a larger part of the HWDB hassles? https://code.launchpad.net/~adeuring/launchpad/fix-broken-comment-nodes-in-hwdb-reports/+merge/73552 [16:11] adeuring: sure. [16:11] abentley: thanks! [16:15] adeuring: ISTM that your re would match "" [16:15] abentley: no, the '?' after '.*' prevents this [16:16] adeuring, doesn't ? make the '.*' optional? [16:17] abentley: no, that means "non-greedy searching" [16:17] like "stop at the first match" [16:17] adeuring: okay. I didn't realize that *? was a single entity. [16:18] adeuring: could you add a test for that, please? Showing that "" => "" ? [16:19] abentley: not today.... I am really tired. I see the need but... [16:20] adeuring: _fix_frequent_errors doesn't match our naming guidelines. [16:21] abentley: ouch, yes fixFrequentErrors, sure [16:22] adeuring: with a test and the name change, this is okay to land. [16:22] abentley: thanks === salgado_ is now known as salgado [16:30] mrevell: I requested your mince pies on a text change MP if you would be so kind [16:30] Haha, I'd be delighted to. [16:32] mrevell: Excellent email. [16:32] mrevell: splendid old bean [16:33] I'd be glad to be part of it as a contributor :) [16:33] Ah, thanks nigelb; you red fast! [16:33] heh [16:33] Very glad to have you on board :) [16:33] Wouldn't the blueprint bugs merge conflict with stakeholders? [16:34] Especially since Ubuntu uses it extensively. [16:34] nigelb, We won't throw away functionality that's important to stakeholders ... nor the distinction between a "blueprint" face and a "bugs" face, probably. It's more an under the hood thing that'll give us benefits such as bug dependencies. [16:35] Ah. === deryck[lunch] is now known as deryck [16:35] And it'd bring some much needed love to blueprints. [16:35] heh [16:35] YEah [16:35] jml and mpt started that work at our Dallas sprint. [16:36] Yeah, jml told me about the merge at UDS [17:13] good night everyone === matsubara is now known as matsubara-lunch === beuno-lunch is now known as beuno [17:22] Project devel build #1,017: STILL FAILING in 4 hr 45 min: https://lpci.wedontsleep.org/job/devel/1017/ [17:28] deryck: your squad is on maintenance rotation this week? [17:28] flacoste, yes. on interrupt duties, you mean? [17:29] yes [17:29] flacoste, yeah, indeed we are. what's up? [17:29] did any of you guys picked up the email to Registry asking for https://launchpad.net/libreoffice/ and https://launchpad.net/df-libreoffice/ to be merged? [17:29] (in the latter) [17:31] Hi, what's the ideal way to test a validation change? [17:31] (I'm trying to fix bug 59301) [17:31] <_mup_> Bug #59301: Don't give me a vague "URL is already registered by another blueprint" error < https://launchpad.net/bugs/59301 > [17:31] flacoste, I don't think so. I can pick it up, though. I'm the only one left today. [17:32] deryck: ideally, this should come through a question [17:33] nigelb: where are you implementing the validation change? [17:33] flacoste, should I ping back and ask for them to open a question? is that the normal way? [17:33] nigelb: iow, in the view, or the field validator [17:33] flacoste: In the interface [17:34] nigelb: field validator? or as an interface invariant? [17:34] er, I probably don't know what's the difference. [17:34] There's already validation [17:34] deryck: i'd suggest opening a question for it and pointing the user to the question for follow-up [17:34] I'm only changing the validation error [17:34] flacoste, ack. thanks. [17:34] deryck: one aspect that needs follow-up is that we don't support project merging per se [17:34] deryck: we can make one inactive [17:35] right. [17:35] deryck: but it would be their responsibility that all contents is moved across [17:35] so bugs / translations / code / whatever [17:35] gotcha [17:35] nigelb: what file are you changing? [17:35] blueprints/interfaces/specification.py [17:36] specifically L136 [17:36] I'll be adding the specification title as well. [17:36] and if I can manage it, the URL. [17:41] nigelb: ok, looking for a decent suggestion [17:41] flacoste: :) [17:42] Is interface the Right Place™ for validation? [17:42] (Also, drat bigjools isn't here. Really wanted to poke him to look at cricket :P) [17:42] nigelb: yes, it's the right place [17:43] Ok, so theoretically, I should be able to look at other validation tests, if any. [17:43] nigelb: there is no interfaces/tests directory [17:43] nigelb: well, there is probably more bad examples of those than good ones [17:43] oh :( [17:43] especially in blueprints [17:43] heh [17:43] blueprints is especially unloved :) [17:43] so my suggestion is to add a unit test in blueprints/model/test_specification.py [17:44] ideally, i would go in interfaces/tests [17:44] but since that doesn't exists, might be more complicated to set-up [17:44] more cookie points to you if you go that extra miles [17:44] but the test should simply be something like [17:44] test_url_validation(self): [17:45] spec = self.factory.makeSpecification() [17:46] field = ISpecification['url'] [17:46] with ExpectedException(LaunchpadValidationError, regex_to_match): === almaisan-away is now known as al-maisan [17:46] field.validate(the_value) [17:46] and that's it [17:46] s/url/specurl/g I think? [17:46] right [17:46] the above is a sketch :-) [17:47] you probably want one test per error condition you need [17:47] heh, ok. let me play with this [17:47] and you might want to validate a good one for completeness [17:47] that's how validation tests should be written [17:47] we probably have one example of those in the tree [17:47] but the more common cases was to test it through all the stack [17:47] which is bad practice [17:47] oh [17:47] you might want to use: [17:48] field = ISpecification['specurl'].bind(spec) [17:48] Also, another thing. [17:48] that above test will probably pass. [17:48] since that allow the field to look at the object itself [17:48] nigelb: regex_to_match is matched against the exception message [17:48] so probably not if that's what needs to change [17:49] because the test failure is when you try to create a new spec with apiurl which exists. [17:49] so I'll just do an empty makeSpecification before that. [17:49] indeed [17:49] good point [17:49] existing_spec = self.factory.makeSpecification(specurl='...') [17:50] ISpecification['specurl'].validate('...') [17:50] should trigger your error [17:50] yeah :) [17:50] validate() works for both new object and existing ones [17:51] so you probably want a test that shows that validate('a_url') when the current value is 'a_url' pass [17:51] you'll need to call .bind() with an existing instance for that test [17:52] (as outlined in my first example) [17:52] right! === al-maisan is now known as almaisan-away [17:52] or correction to it :-) [17:52] that should get you started [17:52] so I get to do a success and failure. [17:52] let us know if you hit any snags [17:52] sure! :) === abentley changed the topic of #launchpad-dev to: https://dev.launchpad.net/ | On call reviewer: - | Critical bugs: 244 - 0:[#######=]:256 [18:15] Excellent. Finally got TDD working. [18:16] My tests fail successfully. === matsubara-lunch is now known as matsubara [18:27] flacoste: Almost a success. All I'm missing is that validation is automatically escaped. [18:28] nigelb: you could simply check that the exception message is a structured() instance [18:28] flacoste: No, I mean, not just in the test. also in the output [18:29] so, I get nigelb: i don't understand? [18:29] one sec [18:30] flacoste: http://people.ubuntu.com/~nigelbabu/validation.png [18:31] nigelb: i see [18:31] that's more tricky [18:31] Ouch. [18:31] as we don't want to become another XSS vector [18:32] Can I use one of the formatters instead? [18:32] i think we now have a way to have HTML in error message [18:32] but i don't know how off the top of my head [18:34] Could I use the FormattersAPI? [18:46] nigelb: you need to pass use structured() to wrap the message creation [18:48] so structured('%s is already registered by %s', value, canonical_url(spec), spec.title) [18:48] that will do the right thing [18:49] okay! [18:51] bonus points if you can figure out how to use the the link formatter from there [18:51] note though that in some way this is a violation of our layering [18:51] we are introducing display logic at a very low level [18:51] Oh. [18:51] Wait, link formatter? Here? [18:52] putting a link in the error message is [18:52] more so if we going to reuse the implementing behind fmt:link [18:52] But is there a better way to do this? [18:52] but this seems to be the pattern we follow [18:53] the better way would just be more work [18:53] and indirection [18:53] for no real benefit [18:53] heh :) [18:53] you would make a subclass of LaunchpadValidation specific to this error [18:53] and then in the view look for that error [18:53] and replace the better error message there [18:53] that would preserve the layering of concerns [18:54] one drawback here is that there "HTML-formatted" error message will appear on the API as well [18:54] ah [18:54] but not sure if that's arguably a bug :-) [18:54] heh [18:55] anyway, using structured() wiht LaunchpadValidationError has precents [18:55] as its ErrorView supports it [18:55] and grepping should find prior art [18:55] so that should work for you :-) [18:55] ntrtam [18:55] -> need to run to a meeting :-) [18:55] ciao :) [18:55] Thanks! === salgado_ is now known as salgado [20:16] benji: could i bother you for a review? [20:16] bac: my pleasure [20:17] benji: thx: https://code.launchpad.net/~bac/launchpad/bug-828914-test/+merge/73585 [20:19] bac: looks good! [20:19] tahnks [20:44] vim protip: if you have ever lost some important edits down an undo/redo blind alley, look up the :earlier command [20:55] bac: do you have time for a very small review? [20:55] yep [20:55] here you go https://code.launchpad.net/~benji/launchpad/bug-810113/+merge/73591 === matsubara is now known as matsubara-afk [21:02] * benji probably should have mentioned bac's name. [21:03] i saw it. [21:03] benji: done [21:03] ah!, thanks [21:04] flacoste: that's a good idea. i'll look at a sweep tomorrow [21:04] benji: Awesome review music. [21:05] soren: :) [21:05] bac: thanks for fixing this! [21:06] bac: "Your review would've been much faster if it weren't for the insane music." I LOLled [21:13] benji: Just bought the whole album. :) [21:15] soren: cool, he definately has some skill at what he does [21:17] er [21:18] would anyone like to talk about the lp javascript with me? [21:19] ah [21:19] Project devel build #1,018: STILL FAILING in 3 hr 57 min: https://lpci.wedontsleep.org/job/devel/1018/ [21:48] "These installation instructions apply to the new PostgreSQL database infrastructure as found in Ubuntu Breezy and later, and Debian Etch and later. " [21:48] * mwhudson thinks this line of prose has probably outlived it's usefulness [21:48] nuke from orbit === micahg_ is now known as micahg [23:37] mwhudson: did you find someone to talk about lp javascript? [23:37] wallyworld: no [23:37] did you have a question? not sure if i can help or not [23:37] wallyworld: well, i dunno [23:37] wallyworld: i sort of answered my own question [23:38] ok [23:38] wallyworld: do you know much about the ChoiceSource & related widgets? [23:38] i know what i need to to use them [23:38] there is code knocking around in there to replace icons with loading icons and so on [23:39] but _most_ usages in lp now use sprites [23:39] & so have to do different things [23:39] yeah [23:39] i was sort of vaguely wondering whether it makes sense to change the widget to assume sprites [23:39] when you say loading icons, you mean display a spinner while loading takes place? [23:39] wallyworld: yes [23:40] wallyworld: the context for all this is that i've write a greasemonkey script for editing work items [23:40] http://people.linaro.org/~mwh/work_item_editor.png [23:40] the other pattern i've seen is to add "spinner" to the class of an item [23:40] * wallyworld looks [23:40] i had to copy paste hack the source of ChoiceSource to get this to work [23:41] and you want to show a spinner when you clock the yellow edit icon? [23:41] and i'd like to get my changes into lp [23:41] no [23:41] i want to understand the code a bit to know if my changes will do damage :) [23:42] ah right. ChoiceSource is used in only a few places from memory eg blueprints [23:42] i can look at your branch and see if anything jumps out if you like [23:42] bugtask this affects me uses it too [23:42] but yeah, it's fairly isolated [23:43] wallyworld: https://code.launchpad.net/~mwhudson/launchpad/ChoiceSource-flexibility [23:43] * wallyworld looks [23:43] i should check if my greasemonkey script works with my changes too, or this is a bit pointless :) [23:44] :-) [23:48] hm [23:48] wallyworld: why would LPS.WidgetPositionAlign be undefined on a blueprints.launchpad.dev page but there on production or staging? [23:49] i guess the js is built differently? [23:50] mwhudson: good question. i've recently noticed that too. the same source files are used in both dev and prod, but prod is minified, that's the only difference afaik [23:51] mwhudson: we recently made a change to the build prcess so that yui is incuded as a tarball in downloadcahce and unpacked as part of the build [23:51] so we can easily use a different version by modifying versions.cfg [23:51] but i can't see offhand how that would account for the difference [23:52] i can't really see how that would matter [23:52] i think i can make it work by wrapping all my script in a LPS.use( '...', function (Y) { ... }); [23:52] yeah, so something else is happening [23:53] which is probably a better idea anyway [23:53] (it may be an undeployed change) [23:54] ah uh, could it be a race condition? [23:54] your branch looks ok to me. you could run all the yui tests but i don;t think we have coverage for what you've changed [23:54] i don't know when greasemonkey scripts run [23:55] could be [23:55] i can't recall the exact error i've seen in the firebug console wrt an undefined symbol [23:55] no, that doesn't make sense [23:58] mwhudson: just checked lp.dev and lp.net. both give this error: yui: NOT loaded: widget-position-ext. so i misremembered what i saw. not related to your issue perhaps [23:59] ah yeah i see that too [23:59] but there's no apparent problems [23:59] i don't see that on devel though... [23:59] i do