/srv/irclogs.ubuntu.com/2012/04/30/#launchpad-dev.txt

lifelesswho is around01:22
StevenKYou want a roll call?01:23
lifelesshmm, wgrant  - hey, so - do we track enough detail to determine how often contact-this-team is used; by admins, by members, by non-members ?01:23
lifelessStevenK: no, I wanted a victim01:23
wgrantlifeless: Yes.01:30
wgrantlifeless: The abuse:realuse ratio is roughly infinity, I believe.01:31
lifelessif we can get a little data on that01:33
lifelessI will happily drive a sharp scope reduction on it01:34
spmmy personal view is that it often shows up high in the UI, so if you're looking for help, then it's THE most obvious place folks see and hence "it's up here, must be important". I'd suggest just dropping it down the UI below lists or something and see what happens.01:38
wgrantHm01:38
wgrantAJAX batchnaving probably shouldn't calculate the total every time.01:38
lifelesswgrant: why not?01:43
wgrantBecause it's pointless?01:44
lifelessbatch lengths are dynamic01:44
lifelesssome collections more so than others01:44
wgrantAnd their accuracy is probably not particularly critical. I'm not sure the client even respects it if it changes.01:45
lifelessmmm, if a collection zeros out, it will get a bug report if we don't update it01:46
lifelessI'm fairly sure gmail updates theirs, for instance.01:46
lifelessLets not paint ourselves into a corner either way.01:46
StevenKlifeless: Oh sure, because gmail does it is a reason we should?01:46
lifelessalso, how to stop users reporting bugs01:46
lifelessStevenK: gmail is a paginated ajax app with years of experience dealing with users and user expectations.01:46
lifelessStevenK: observing what it does is merely one data source we should use. Not using it would be foolish.01:47
StevenKlifeless: You hit a nerve.01:47
lifelessStevenK: tl;dr - yes, because gmail does it *is* /a/ reason we should do it, transitively, because they also are trying to keep support costs down and user satisfaction up01:48
lifelessStevenK: Did I now? I didn't mean to. Whats the nerve?01:48
StevenKwallyworld_: O HAI01:50
wallyworld_hello01:50
lifelessanyhow, we know that few people click next anyhow01:51
lifelessso optimising next() to be faster than first-load is less interesting than making first load faster01:51
StevenKwallyworld_: I know Friday was a long time ago, but: http://pastebin.ubuntu.com/956524/01:51
wgrantlifeless: It's more the sorting that I'm hitting it on.01:51
lifelesswgrant: count() doesn't sort though, does it ?01:51
wgrantlifeless: No, but changing the sort order of a bug listing does an AJAX request for the new batch, which also returns the count.01:52
wgrantSo rather than 10ms of DB queries there's lotsams.01:52
lifelessbuglistings are a bit weird anyhow, not being an API call and all01:52
wgrantAJAX batchnavs aren't API calls in general, are they?01:52
wgrantOnly the pickers are.01:53
lifelessFIIK01:53
lifelessI would like them to be01:53
* lifeless dreams01:53
wgrantBut ++model++ is awesome layering-violation goodness :)01:53
lifelessanyhow, the bugs batchnav currently caches too much anyhow, so if the count isn't updating, thats something we can poke deryck to fix at the same time ;)01:54
wgrantDammit mawson, vacuum faster01:55
wallyworld_StevenK: looks good. i would use with FeatureFixture to avoid the separate cleaup call01:55
lifelessyou can also use self.useFixture(..) to avoid cleanup calls.01:56
StevenKNot in a doctest I can't.01:57
wgrantALso 'with FeatureFixture'01:57
lifelessspelt as f = self.useFixture(MyFixture())01:57
StevenKI knew what he meant, so meh.01:57
lifelesshmm, i thought I or someone else had added cleanups support to doctests.01:57
StevenKwallyworld_: Right, changed to 'with', commiting and pushing01:57
wallyworld_StevenK: awesome thanks. happy landing01:57
StevenKwgrant: Finally got around to loading up AA last night. Looks like I have to wait, since 1080p causes my 9500GT to melt.01:59
wallyworld_lifeless: perhaps. most/all other doctests seem to still use 'with ...'01:59
wgrantKill all doctests :)01:59
StevenKAgreed.02:00
StevenKI should kill bug-change.txt and merge it into test_bugchanges.py02:00
wallyworld_some doc tests are good though02:01
StevenKwallyworld_: LIES02:02
wallyworld_the ones which are, you know, api documentation are ok02:02
wgrantThat's a slippery slope.02:03
StevenKSome would argue so was adding doctests.02:04
wgrantlifeless: You might want to rephrase that self-notification thing to not be stupid02:19
wgrantlifeless: Currently it complains that the feature to disable bug self-notifications doesn't disable answer notifications, which is clearly an invalid complaint.02:20
wgrantPerhaps it wants the feature to be extended to all notifications.02:20
lifelessperhaps; arguably though, a comment on a bug with that option set should not result in a notification02:30
lifelessthe fact we have naive pub-sub based notifications isn't their problem02:31
StevenKwgrant: Is there anything stopping us jumping to rabbit 2.7.1?02:38
wgrantNo.02:39
lifelesshippity hop02:39
StevenKMy precise laptop has rabbit held at 2.6.1, and apt keeps yelling at me.02:39
wgrantAh, yeah, I should fix that. Might just drop -management for now, since we're not using it yet02:40
StevenKwgrant: Did you want my help, or you need to sit down and JFDI?02:50
wgrantI'll hopefully get to it today.02:51
* StevenK tries to figure out how to package auditor up as an egg02:52
lifelesswoo auditor woo02:52
StevenKYeah, I know it's been a few weeks02:52
StevenKSigh02:53
StevenKThis web page talks about the 3 python files with django projects and then skips straight into setup.py?02:54
wgrantlifeless: Do you happen to know if the row length quoted by VACUUM FULL VERBOSE includes the tuple header?03:53
lifelessno04:01
lifelessalso more freaking init discussions on d-d. Sob.04:01
wgrantOh yeah04:01
wgrantGlanced over that this morning and decided I didn't care any more :)04:01
* StevenK stabs apt on his laptop more.04:15
StevenKThe Partial Upgrade message from upgrade-manager is getting tiresome.04:16
wgrantStevenK: https://code.launchpad.net/~wgrant/meta-lp-deps/no-rabbitmq-management/+merge/10405504:42
spmhttp://somethingofthatilk.com/index.php?id=407 <== wgrant04:42
spm1 guess for where I see you in that panel04:43
wgrantHeh04:43
wgrantThat tends to work well for Launchpad, though :)04:43
spmwhy do you think I posted it in *this* channel :-D04:43
StevenKwgrant: r=me04:44
wgrantlifeless: Can we upgrade to postgres 9.1 tonight? :)04:44
StevenKHaha04:44
wgrantStevenK: Thanks.04:44
StevenKwgrant: Does that fix the 2.6.1 madness or is there another step?04:45
wgrantThat should be that.04:45
lifelessspm: also hah - http://i.imgur.com/VC9Ye.png04:45
StevenKThat's terrible04:45
lifelesswgrant: up to stub really; oops report looks decent enough04:45
spmheh04:46
lifelessI'd have no concerns about pulling the trigger if mthaddon is happy04:46
StevenKWhat about DF?04:46
lifelesswhat about tit?04:46
StevenKOr do we just blow up the DB, get GSA to fiddle packages and then wait 48 hours for an import?04:46
lifelessyou can up grade whenever you like04:46
bigjoolsmm tit04:46
wgrantStevenK: I intend to refresh DF this weekend anyway04:47
bigjoolsStevenK: combine with restore from prod04:47
wgrantSo I plan to upgrade to postgres 9.1 at the same time04:47
wgrantHopefully part of prod is done before then.04:47
bigjoolsI usually refresh when ubuntu is released04:47
wgrantI considered doing it on Saturday, but we basically need to do it for 9.1 anyway, so might as well wait04:48
stubIn place upgrade is fine too, which will take maybe 30 mins on that hardware plus fiddling time getting postgresql.conf, pg_hba.conf etc. sorted05:08
wgrantStevenK: r-d-b should have sotred out rabbitmq for you05:54
StevenKwgrant: I fixed it about 30 seconds after the meta package was published. :-)05:55
wgrantHeh05:55
=== jtv1 is now known as jtv
StevenKwallyworld: Your headers branch has hit qas.06:47
StevenKwallyworld: If you start syncing the staging mailbox right now you should be able to QA the branch on Wednesday morning? :-)06:48
wallyworldStevenK: :-P07:04
alexhwgrant: the API is supposed to return a 401 when it requires authorization. strikes me as fairly buggy returning an empty set but a non-zero count07:46
wgrantalexh: For collections it simply omits the inaccessible items, like a normal search. In this case it's probably a bug that the activity of a public bug requires authentication, but the non-zero count is not a bug.07:48
wgrantCounting is very expensive; it is not necessarily correct.07:48
alexhwgrant: also not sure why that requires authentication, attachments, etc, do show up07:49
wgrantAs I said, probably a bug.07:49
alexhoh, ok07:49
wgrantBut in general, inaccessible items in collections are just hidden.07:49
alexhwgrant: thanks, I'll give it a try after authenticating07:49
wgrantOterhwise pretty much everything would 401 :)07:49
czajkowskialoha08:14
alexhhm, also struggling with the auth,08:21
alexh"The information provided by the remote application was incorrect or incomplete. Because of that we were unable to identify the application which would access Launchpad on your behalf. "08:21
alexhwhen visiting the authorize-token page08:21
alexhI'm sending oauth_consumer_key and oauth_signature{,_method}08:22
alexh(and I do get an oauth_token back)08:22
wgrantalexh: Which oauth library are you using?08:23
alexhnone so far, just a regular HTTP post to get the token in the first place08:24
alexhfollowing https://help.launchpad.net/API/SigningRequests08:24
wgrantalexh: Any reason not to use launchpadlib?08:24
wgrantWhich does all this for you?08:25
alexhI'm using ruby, not python08:25
wgrantAh08:25
wgrantWhat is the URL you're using for authorize-token?08:25
alexhhttps://launchpad.net/+authorize-token?oauth_token=MVlGSWMKbZ6GhsBQwV5H08:26
alexhMVl... being the oauth_token I get back from POSTing to https://launchpad.net/+request-token08:26
=== almaisan-away is now known as al-maisan
alexhmeh, pebkac08:32
wgrantheh, what was the issue?08:32
wgrantJust tried it manually, works for me.08:33
alexhdoing GET instead of POST08:33
alexhsorry08:33
alexhyea, now that works08:33
wgrantGreat.08:33
=== al-maisan is now known as almaisan-away
alexhwgrant: you were right, it was indeed missing authentication10:06
jmlrvba: just checking, is your testtools "ContainsAll" equivalent to a (probably hypothetical) "IsSubset"?10:41
rvbajml: it is indeed.10:43
jmlrvba: ta, will get to the review shortly.10:43
rvbaCool.10:43
jmloh wait, it's not11:14
rvbajml: why?  We're using it on strings so IsSubSet would sounds strange but conceptually it is rather similar.11:18
jmlI'm typing it out in the MP, but I would have guessed from the name & the docstring that self.assertThat(X, ContainsAll(Y)) would mean that Y is a subset of X.11:20
jmlHowever, it apparently means: for x in X, for all y in Y, y in x11:20
lifelessmeep11:21
lifelessthat is indeed surprising11:21
lifelessisn't that MatchesAll(Contains(Y)) ?11:22
lifelesshmm, MatchesListwise(Contains(Y))11:22
jmlMatchesAll(*map(Contains, Y))11:22
lifelessjml: All? *blink*, well you've read the code.11:24
jmlmatchers could probably use a little more algebra11:24
jmlhttps://code.launchpad.net/~rvb/testtools/testtools-contains-all/+merge/10406511:24
lifelessI'll read tomorrow, if I should11:25
lifelessfor now, -> sleep11:25
jml:D11:25
jmlMatchesAll should really be called And or something :\11:27
jmlrvba: http://pastebin.ubuntu.com/957278/ in case you missed it.11:27
rvbajml: thanks.  I was disconnected indeed.11:28
rvbajml: now it's my turn to be confused by your review.  "self.assertThat([1, 2, 3], ContainsAll([3, 1]))" is exactly what this matcher does.11:46
rvbajml: and the tests prove that.11:46
jmlrvba: hmm.11:50
rvbaMaybe the fact that I've written the tests with strings (instead of lists of ints) is confusing.11:50
jmlrvba: hmm, yeah, that and the way the matcher interface tests work11:55
jmlrvba: the problem was that I read this:11:55
jml+    matches_matches = ['foobar', 'foozbar', 'bar foo']11:55
jmlas this:11:55
jml+    matches_matches = [['foobar', 'foozbar', 'bar foo']]11:55
rvbaI see.11:55
jmlrvba: ok. sorry for the confusion.11:56
rvbajml: That's funny because I see testtools as a (really nice) was to have nice tests… and the way testtools tests itself is not really clear ;).  I was myself confused by this matcher interface thingy.11:57
rvbaMaybe that's a chicken and egg problem :)11:57
jmlrvba: yeah. sorry about that.11:58
jmlrvba: in this case, no.11:58
rvbajml: that's all right.  As the creator/maintainer of testtools, you've earned my gratitude ;).  I'm a happy user.11:59
jmlrvba: I think the matcher interface tests are one of the things that make perfect sense once you've figured them out. could probably be made a bit more approachable.11:59
rvbaRight.11:59
rvbaThere is quite a bit of code which uses it so it's easy enough to understand how it works though.12:00
jmlcrap crap crap12:01
jmllate for something.12:01
jmlbrb12:01
jmlrvba: back. and have replied.14:11
rvbajml: ta.  I'll fix the code as you suggest.14:13
jmlrvba: thanks.14:13
sinzuijcsackett, Do you have time to review https://code.launchpad.net/~sinzui/launchpad/progressive-enhancement-ftw-2/+merge/10397014:34
sinzuijcsackett, I am waiting for allergy medication to work. I do feel very useful at the moment14:35
czajkowskijcsackett: ello ello14:43
czajkowskisinzui: oh hope you feel better14:43
sinzuiczajkowski, I am going to write something for the blog today. Danhg and yourself and ensure it makes sense14:44
czajkowskidanhg is off but I can look over it14:44
jcsackettczajkowski: hello. :-)15:12
jcsackettsinzui: sure, i can review.15:12
jcsackett...and he signs off just before that makes it through.15:12
jcsackettsinzui: r=me on that branch.15:34
sinzuithank you15:35
cjwatsonI'm working on bug 990219 and could use some advice on security.  I think it would be reasonable for build scores to be editable only by launchpad-buildd-admins (an existing celebrity), rather than allowing the owner of a packageset to give themselves arbitrary bonuses (since build scores arbitrate access to a global resource, while packagesets are more local than that).  Is the right way to do this to create a new ...16:24
_mup_Bug #990219: Reprioritize package build scores based on packageset <feature> <packagesets> <soyuz-build> <Launchpad itself:Triaged by cjwatson> < https://launchpad.net/bugs/990219 >16:24
cjwatson... interface that just has the score setter in it, and add a new class for that in security.py?16:24
cjwatsonIPackagesetBuild or something16:25
=== deryck is now known as deryck[lunch]
cjwatsonOr should I be using some specialised permission like launchpad.Moderate or something for that instead?16:54
=== matsubara is now known as matsubara-lunch
sinzuicjwatson, We want to normalise the check to a permission like launchpad.Moderate or launchpad.Admin where we check for membership/identity of the celebrity17:13
sinzuicjwatson, We have had trouble with this in the past when the object/interface has many users working with it. I do not think that is the case here17:14
cjwatsonThe thing I'm unsure about is that this is a permission applied to only one member of Packageset; most of the other members want to work with the packageset owner17:15
cjwatsonI'm not clear on how best to express this17:15
sinzuiyes, this does get tricky17:15
cjwatsonI suppose it could be launchpad.Admin since that's currently unused for Packageset, but it seems like a hack17:15
sinzuicjwatson, maybe not. Does this celebrity have more knowledge and and skill than a member of Launchpad Admin?17:17
cjwatsonYes, this celebrity consists of people at the coal-face of running buildds17:18
sinzuiThere are several permission in security.py where membership in one of several teams suffices, and we might think of ~registry as equivalent as ~admin for example?17:18
cjwatsonOh, that wasn't what I meant17:18
cjwatsonAdminByBuilddAdmin already exists, that much is fine17:19
cjwatsonWhat I meant was is that it seems like a hack to use launchpad.Admin on IPackageset to control access to setting score, because at some point somebody might want to use launchpad.Admin on IPackageset for something more central to its functionality17:19
cjwatsonOr at least something with different requirements17:19
sinzuiI see17:20
cjwatsonSo I was wondering if I ought to break out a separate interface for this, and if there are any similar patterns elsewhere I could look to17:20
cjwatsonMaybe I'm just borrowing trouble and should apply YAGNI?17:21
sinzuicjwatson, I do not see .Moderate used and I think that is appropriate if the celeb has limited control of some properties17:22
cjwatsonOK, thanks, I'm happy with that17:22
=== deryck[lunch] is now known as deryck
=== matsubara-lunch is now known as matsubara
rick_h_abentley: ping, can I borrow some eyeballs for a sec?18:35
abentleyrick_h_: sure.18:35
rick_h_abentley: http://paste.mitechie.com/show/653/18:35
rick_h_abentley: so trying to move tests from doctest to unit tests and moving this exception to assertRaises, but it's still blwoing up the test and I can't see why here18:36
abentleyrick_h_: That's surprising.18:37
rick_h_ok, just wondering if I've got a case of the Monday's and I'm blind to something18:37
abentleyrick_h_: An alternative way to express this is testtools.testcase.ExpectedException.  It's a ContextManager, so you can write the code a bit more naturally.18:38
rick_h_ah ok, I tried to use the unittest context mgr but it's py2.7 only18:38
rick_h_I'll check that out, thanks18:38
abentleyrick_h_: e.g. http://pastebin.ubuntu.com/958176/18:39
rick_h_abentley: awesome, that passed18:41
abentleyrick_h_: So the thing is that Unauthorized is generated by attempts to *access* transitionToStatus, not by attempts to *execute* it.18:41
rick_h_ic, so maybe the unittest assertion is wired a bit wrongly to catch that case18:42
abentleyrick_h_: Yes.18:42
rick_h_abentley: very cool, thanks again. Headache averted wahoo!18:42
abentleyrick_h_: Or you can pass in getattr as the callee.  E.g. assertRaises(Unauthorized, getattr, upstream_task, "transitionToStatus")18:43
rick_h_ah, gotcha. That shows it a bit better. Makes more sense.18:44
abentleyrick_h_: Although I think it would be far more intuitive, zope.security doesn't provide a way to defend against execution, which is why the restrictions on methods are actually permissions on accessing the methods.18:47
=== matsubara is now known as matsubara-afk
lifelesssinzui: hey, got a few minutes to chat about contact this user ?22:21
StevenKlifeless: We are on our stand up, feel free to join.22:22
lifelessok, though I don't want to chew up all your times22:23
lifelessbah, plurals hard22:23
sinzuiwallyworld_, I cannot think, but I recall the examples in this page was not good enough: maybe You can make this work for staging inbox for date range: http://stackoverflow.com/questions/3180891/imap-deleting-messages22:25
wallyworld_thanks, will look22:26
sinzuipause@!22:43
sinzuiI have no mumble22:43
* StevenK stabs buildout22:58
StevenKIt's been running for eight minutes with no output.22:58
StevenKwgrant: The privacy portlet contains the code for changing the background colour of ... well, any privacy portlet.23:01
StevenKSigh, privacy javascript23:01
wgrantStevenK: That should all die.23:02
wgrantIt's not used any more.23:02
StevenKwgrant: Do you think it's worth writing a test for, or just rip it out and see that nothing breaks?23:04
StevenKOh, look at that. buildout now takes twelve minutes. :-(23:04
* StevenK attempts to get wgrant's attention again.23:24
wgrantStevenK: Writing a test for the absence of some code is silly.23:25
wgrantYOu must have a nice CPU, if a fresh buildout only takes 12 minutes23:25
StevenKwgrant: I upgraded to Precise yesterday afternoon, still watching for issues. That could be one.23:26
StevenKThe only on-going issue is that gnome-do has broken into tiny pieces.23:27
wgrantStevenK: Oh, that'll probably mean you're building with 2.7 now, if you weren't already.23:29
StevenKAh ha23:29
lifelessyay 429 is official23:30
StevenKlifeless: Hm?23:30
lifelesshttp://www.rfc-editor.org/rfc/rfc6585.txt23:30
StevenKThe loss of gnome-do is affecting my muscle memory :-(23:31
wgrantlifeless: Ah, finally.23:32
StevenKwallyworld_: Due to wgrant being a little preoccupied, do you want to quickly review https://code.launchpad.net/~stevenk/launchpad/privacy-portlet-colour-change/+merge/104188 ?23:44
wallyworld_StevenK: sure.23:44
=== wgrant changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: wgrant | Firefighting: - | Critical bugs: 3.47*10^2
wgrantwallyworld_: Thanks23:44
wallyworld_StevenK: do you recall, on qas the bug notification scripts are now run via cron right?23:44
StevenKwallyworld_: I don't, I'm afraid.23:45
wallyworld_StevenK: do we know why the recent privacy portlet changes triggered this bug? were we not calling hide_privacy_notification() before?23:46
StevenKwallyworld_: It does call it.23:48
wallyworld_StevenK: so why is the issue showing up now and not before the info type ui changes?23:49
StevenKI seem to recall jcsackett being involved in turning that off, but I'm not certain what he did.23:49
wallyworld_StevenK: np. i just wanted to be extra cautious deleting code we were not 100% sure of23:51
StevenKwallyworld_: wgrant is certain it should die, at least.23:52
wgrantwallyworld_, StevenK: That code dates from back when the privacy banner was hideable.23:53
wgrantYou could click X on it and it would hide, and turn the privacy portlet red instead.23:53
wgrantThat went away when hiding was disabled, but the code was never removed.23:53
wgrantHowever.23:53
wgrantWe should track down why this is only showing up now.23:53
StevenKwgrant: Ah ha.23:56
wgrantThe old privacy switching code doesn't have that bug.23:56
StevenKwgrant: The hide JS looks for .portlet.private, and the legacy code changes the portlet class to public before calling that hide code.23:56
wallyworld_StevenK:  ok. r=me23:56
wgrantAh23:56
wgrantErm.23:56
wgrantWut?23:56
StevenKwgrant: var privacy_portlet = Y.one('.portlet.private');23:57
StevenKwgrant: That's in the privacy JS23:57
wgrantI was wuting at the message from wallyworld followed less than a second later by a 180s timeout23:57
StevenKAh23:57
wgrantStevenK: That's what I suspected, except I was expecting body.private instead of .portlet.private23:58
StevenKYes, that is somewhat interesting.23:58
wallyworld_wgrant: i docked the laptop and that hickups the network for some reason23:58
StevenKwallyworld_: I'm not sure if you saw my explanation as to why this code is being hit now.23:58
wallyworld_StevenK: no, missed it23:59
StevenK[09:56] < StevenK> wgrant: The hide JS looks for .portlet.private, and the legacy code changes the portlet class to public before calling that hide code.23:59

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