/srv/irclogs.ubuntu.com/2010/08/30/#launchpad-reviews.txt

jelmerlifeless: Sorry, I got distracted and forgot about the review. :-/00:32
lifelessthats alright00:33
noodles775Thanks for the db-review lifeless, I've just responded and will be around if you want to chat about it.08:19
lifelessI'm hereish, I'll be in and out - its getting late here.08:24
noodles775Yeah, I replied to the MP so you could leave it 'til tomorrow if you wish :)08:25
noodles775stub: I've responded to your review (already approved) with an incremental to use the Message model for comments on DistroSeriesDifference when you've a chance to look over it: https://code.launchpad.net/~michael.nelson/launchpad/distro-series-difference-schema/+merge/3351508:30
lifelessok, I'll need to look closely at the model which I haven't done yet (as I mentioned)08:30
lifelessplease do drop the latest_ prefix; I'll get a more complete review for you tomorrow.08:31
stubnoodles775: Any reason that two DistroSeriesDifference rows can share a Message?08:31
lifelessish.08:31
noodles775stub: Right - my mistake. I think I was originally thinking I'd need extra meta-data per comment (ie. which versions the comment was made with), but ended up removing it. So I'll just remove that second create table?08:33
stubeh? I was wondering why you made (distroseriesdifference, message) UNIQUE. Making just message UNIQUE would make more sense.08:34
stubSo a Message is linked to no more than one distroseriesdifference.08:35
* noodles775 needs coffee.08:36
noodles775Yes.08:36
=== StevenK changed the topic of #launchpad-reviews to: On call: - || reviewing: - || queue: [https://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/34011,StevenK] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: - || queue: [https://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/34011,StevenK] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
StevenKhenninge: O hai! Review my branch? I have cookies ....09:43
henninge... COOKIES ....09:44
henningeStevenK: is it "ifp-use-istore" ?09:45
StevenKhenninge: Indeed09:45
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: StevenK || queue: [https://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/34011] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
henningeStevenK: in progress ...09:46
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: StevenK || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
henningeStevenK: looks good but you are introducing extra new lines in the import section that should not be there.09:51
StevenKhenninge: I like to seperate the canonical and lp sections, I should stop doing that?09:51
henningeRunning "utilities/format-imports <path1> <path2>" will fixt that for you.09:52
henningeStevenK: yes as we'd like to standardize on what the script does.09:52
henningeThe script could, of course, be changed to enforce your way if that was the consensus ... ;)09:53
StevenKhenninge: Script ran, changes pushed09:54
henningeStevenK: r=me ;-) Thanks09:54
StevenKhenninge: Thanks!09:56
henningeStevenK: ah see, the script also found some other glitches.09:56
StevenKhenninge: I did notice, yes :-)09:58
* wgrant looks for more support for putting it in 'make lint' or similar.10:04
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: lunch || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== benji changed the topic of #launchpad-reviews to: On call: henninge || reviewing: - || queue: [benji] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
benjihenninge: I have a small one for you: https://code.edge.launchpad.net/~benji/launchpad/bug-622765/+merge/3407716:03
* henninge looks16:03
henningebenji: sure, I'll do it ;-)16:04
benjiheh :)16:04
=== henninge changed the topic of #launchpad-reviews to: On call: henninge || reviewing: benji || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== matsubara is now known as matsubara-lunch
=== abentley changed the topic of #launchpad-reviews to: On call: henninge, abentley || reviewing: benji, - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
henningebenji: r=me with a few comments ;-)16:46
=== henninge changed the topic of #launchpad-reviews to: On call: abentley || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
benjicool, taking a look16:46
benjihenninge: I don't see comments on the MP; are they somewhere else?16:53
henningehm, should be. Did it by email, let me chek.16:53
henningec16:53
benjimaybe you got cought in the recent edge flappage16:54
henningebenji: it just came in! ;-)16:55
benjiyep, I just got it too; I guess I need to be more patient16:55
noodles775henninge: I'll add one to the queue, but understand that you'll probably not get to it before finishing :)16:56
=== noodles775 changed the topic of #launchpad-reviews to: On call: abentley || reviewing: - || queue: [noodles775] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
noodles775Ah, you've finished :)16:56
henningenoodles775: I have already finished but abentley is here, too. ;-)16:56
henningeHi abentley! ;)16:56
noodles775abentley_: when you've time: https://code.edge.launchpad.net/~michael.nelson/launchpad/distro-series-difference-model/+merge/3408616:57
henningenoodles775: or was this an UI review?16:57
henningeprobably not16:57
noodles775Nope.16:57
henningebenji: hope you can handle my review because I have to go now. ;-)17:02
benjihenninge: I had one minor rebuttle.  Shall I redirect it to abentley?17:03
=== benji is now known as benji-lunch
=== abentley changed the topic of #launchpad-reviews to: On call: abentley || reviewing: noodles775 || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== Ursinha is now known as Ursinha-lunch
=== matsubara-lunch is now known as matsubara
=== deryck is now known as deryck[lunch]
=== abentley_ is now known as abentley
=== benji-lunch is now known as benji
=== benji changed the topic of #launchpad-reviews to: On call: abentley || reviewing: noodles775 || queue: [benji] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
benjiabentley: you get to channel henning: please see my last message at https://code.launchpad.net/~benji/launchpad/bug-622765/+merge/34077/+index thanks18:32
=== deryck[lunch] is now known as deryck
=== Ursinha-lunch is now known as Ursinha
abentleybenji, it sounds like all you care about is the return value-- the parsed_lines value.  Is that right?19:50
=== abentley changed the topic of #launchpad-reviews to: On call: abentley || reviewing: benji || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
benjiabentley: not quite; if parse_file respects logparser_max_parsed_lines then it will return 2 (the maximum in effect during the test run), I want to be sure that it both returns 2 (IOW, it hit the max) and show that it did not parse line 2 of the input file because that shows that it took the passed in value of lines_parsed into account when checking to see if the max has been reached19:53
benjiit strikes me that (a variation) on the above would be a good comment to add just before the asserts to explain them19:53
abentleybenji, then perhaps you should test that the parsed value of 2 is not in downloads.items()19:54
abentleybenji, it's better to not need a comment if you can avoid it.19:54
benjiI attempted to show that it wasn't parsed by asserting tha downloads.items() is empty.19:55
benji(maybe I misunderstood you)19:55
* benji thinks he should have mentioned abentley's name.19:59
abentleybenji, I realize that.19:59
abentleybenji, I'm saying it's not clear what you're trying to demonstrate.19:59
abentleybenji, If you're trying to demonstrate that the parsed value of line 2 isn't in download.items(), you can express that pretty directly in Python.20:00
abentleybenji, self.assertTrue(line_2 not in download.items())20:00
benjiIf you would prefer that, I'll spell it that way.  Me, when I see something like that I think "well, there are lots of values that aren't there, I wonder what is actually there and why that particular value not being there is important"; I don't feel like fighting over it though20:03
benjiabentley: wait, maybe I do feel like fighting ;)  If we assert that it isn't equal to something, then that test is unlikely to catch a bug that would make it parse more (say the test data changes and the negative assertion isn't updated or there is a bug in the negative assertion from the get-go (I typo it or something); therefore the assertion that the parsed data is empty is superior20:08
abentleybenji, whatever you want to test, test that.  Don't test other things.  But if you want to test that that what gets parsed is what you expect, I think it would be much clearer to not have a 404 in the list.20:10
benjiabentley: I can agree with that.  The 404 being the first thing is a mistake.  It should be something that generates a value in downloads.  I'll change the test accordingly.20:13
abentleybenji, works for me.20:15
=== abentley changed the topic of #launchpad-reviews to: On call: abentley || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
benjiabentley: it looks like henning forgot step 2: the Status is still "Needs review"20:40
benji(https://code.launchpad.net/~benji/launchpad/bug-622765/+merge/34077/+index)20:40
abentleybenji, if you're satisfied that it's been approved, feel free to set it yourself.20:40
benjiok; I didn't know if that was kosher or not20:40
benjidone, thanks20:41
=== matsubara is now known as matsubara-afk
leonardrabentley, i think https://code.edge.launchpad.net/~leonardr/launchpad/publish-tokens-2/+merge/34123 is ready for review20:54
=== abentley changed the topic of #launchpad-reviews to: On call: leonardr || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
abentleyleonardr, your doctest looks like a unit test, not documentation.  Could you please rewrite them as unit tests?21:00
leonardrwebservice/oauth.txt?21:00
abentleyI was thinking of lib/canonical/launchpad/doc/oauth.txt and webservice/oauth.txt both look like their main goal is to provide test coverage.21:04
leonardri can turn webservice/oauth.txt into a unit test but i'd rather not have to convert doc/oauth.txt just now--i just made some minor changes to get it to work with the permission system21:06
abentleyleonardr, you don't have to change the existing code, but I'd like to see lines 61-84 of the patch as a unit test.21:09
abentleyleonardr, could you explain why these removeSecurityProxies are needed?21:24
leonardrabentley: sure21:25
leonardrwe use OAuthAccessToken objects two different ways in the tests21:25
leonardrwe use them to demonstrate the server-side behavior when someone tries to touch an OAuthAccessToken21:25
leonardrin that case the security proxy is left in place, and part of its job is to examine the request in which the server-side behavior is taking place21:26
leonardrbut, we also use an OAuthAccessToken object as a convenient repository for OAuth authentication information when we create *client-side* objects like LaunchpadWebServiceCaller and launchpadlib Launchpad objects21:27
leonardrIn those cases, we would like to look at OAuthAccessToken's data members without having the security check run, because the security check assumes there is a current request, and we're trying to _create_ a request21:28
leonardra similar situation occurs when we look at the incoming request and try to determine if it's signed correctly21:28
leonardrwe need to access OauthAccessToken's data members without the security proxy, because the security proxy assumes what we're trying to determine--that the request has been identified with a particular OAuth token21:29
abentleyleonardr, so there's a pretty big difference between the active OathAccessToken, which we must be able to see, and arbitrary OauthAccessTokens which happen to be in the database?21:31
=== abentley changed the topic of #launchpad-reviews to: On call: abentley || reviewing: leonardr || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
leonardrwell, there are situations where you must be able to see access tokens from the database--that's the point of this branch21:32
abentleyleonardr, right.  I meant that for the current one, access is mandatory, but for others, it depends on your permissions.21:33
leonardrsorry, i still don't understand21:34
leonardrthe server gets some string data from the client21:34
leonardrwhich identifies an oauth access token21:34
leonardras part of verifying whether the client is really authorized to use this access token, we need to strip the security proxy and look at its data members21:35
leonardrafter the access token has been identified, all future attempts to look at _any_ access token are subject to the security proxy rules21:35
abentleyleonardr, could we make this verification internal to OauthAccessToken?  Then we wouldn't need external access to its protected members.21:36
leonardrsalgado, is this a good idea? take the code in servers.py, that calls checkNonceAndTimestamp, and everything else up to the end of the method? basically a OAuthAccessToken.getPrincipal method which we can leave unprotected?21:40
abentleyleonardr, sorry to be more anal than usual, but you did ask for a review of the use of removeSecurityProxy, so I'm trying to make sure I understand the issues.21:43
leonardrsure21:43
abentleythe best case is to avoid using it in production code, but I can see that bootstrapping the security foo can be a problem.21:45
abentleyleonardr, I'm noticing that the line wrapping doesn't match our usual style.  Usually when we wrap, we put a newline after the opening parenthesis, then an indent, then the arguments.21:49
leonardrall right, i'll fix it21:49
abentleyleonardr, see "Multiline function calls" in https://dev.launchpad.net/PythonStyleGuide#Whitespace%20and%20Wrapping21:51
abentleyleonardr, LaunchpadWebServiceCaller is not exposed in the API, right?21:56
leonardri don't understand the question. when you say 'api' do you mean the web service or some internal python api?21:57
leonardrLWSC is a test class defined in testing/pages.py. it is not available except when the test suite is running21:59
abentleyleonardr, I mean the web service.22:01
leonardrno, LWSC is a test class that makes HTTP requests _to_ the web service22:01
leonardrit is not available _through_ the web service22:01
abentleyleonardr, so it seems like the risk of assigning the token to LWSC.access_token is minimal.22:06
leonardrright. this is the 'client-side' code that uses an OAuthAccessToken as a data repository. but if you want it's easy to turn the token object into a dict or something to reduce the risk22:07
leonardrof carrying around an unprotected object22:07
abentleyleonardr, that's okay, it looks like test code anyhow.22:13
abentleyleonardr, I've given it a "needs fixing".  I'll be happy to re-review.  https://code.edge.launchpad.net/~leonardr/launchpad/publish-tokens-2/+merge/3412322:13
leonardrok22:14
leonardri'll work on it tomorrow. thanks22:14
=== abentley changed the topic of #launchpad-reviews to: On call: - || reviewing: leonardr || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews
=== abentley changed the topic of #launchpad-reviews to: On call: - || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.launchpad.net/launchpad/+activereviews

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