/srv/irclogs.ubuntu.com/2013/02/06/#launchpad-dev.txt

StevenKwgrant: Would you hate me for using lp.services.webapp.adapter for this request munging?00:13
wgrantStevenK: adapter is more to do with the DB00:17
StevenKwgrant: I can add lp.services.webapp.utils if you wish, I can't see anything close-ish00:18
wgrantStevenK: Or in publisher?00:19
StevenKpublisher works00:21
StevenKwgrant: http://pastebin.ubuntu.com/1614625/00:45
wgrantStevenK: You'll probably only want to refetch when you're called from the API00:46
wgrant(by using eg. @callwith(from_api=True))00:46
wgrantOtherwise adding an attachment or release file from the UI will find a request that lacks what it needs, or the field might have a different meaning00:46
StevenKNo, the field name is different00:46
wgrantRight now, yes00:46
StevenKIt's field.<foo> from the UI00:46
wgrantThen someone changes it and the world breaks00:47
wgrantFar better to be explicit here00:47
wgrantWhen committing evil, you want to be *really* sure that it's not going to have unintended consequences00:47
wgrantAlso, get_raw_form_value_from_current_request or something00:47
wgrantrefetch_file_content does not well convey the magnitude of the evil00:48
StevenKwgrant: omg_it_burns_and_refetch ?00:48
wgrantStevenK: Might even be an idea to assert in the function that it's an API request00:48
wgrantJust in case00:48
wgrantIt might eventually be needed outside API requests, but the added paranoia would feel nice right now00:49
StevenKwgrant: And what do you suggest as a name?00:50
wgrantget_raw_form_value_from_current_request?00:51
wgrantMaybe throw a 'horrid', 'evil', 'vile' or 'unsafe' in there somewhere00:51
StevenKWhich is horribly long00:54
wgrantGood00:56
wgrantLucky it only has two callsites :)00:56
StevenKThe import is 80 characters00:56
StevenKAnd now buildmailman fails?01:14
StevenKwgrant: buildmailman dies due to:01:28
StevenKno lists == nothing to do, exiting01:28
StevenKmake[1]: Leaving directory `/home/steven/launchpad/lp-sourcedeps/sourcecode/mailman'01:28
wgrantStevenK: Is that a problem?01:33
StevenKYes, since make run fails01:33
wgrantFails how?01:33
StevenKmake: *** [compile] Error 101:34
wgrantHave you tried deleting lib/mailman and rerunning?01:34
StevenKThat's the next line01:34
StevenKCompiling /home/steven/launchpad/lp-branches/handle-invalid-unicode-in-query-string-redux/lib/mailman/Mailman/versions.py ...01:34
StevenKNo updates are necessary.01:35
StevenKmake[1]: Leaving directory `/home/steven/launchpad/lp-sourcedeps/sourcecode/mailman'01:35
StevenKmake: *** [compile] Error 101:35
StevenKwgrant: ^ That's after deleting lib/mailman01:43
wgrantStevenK: Perhaps make clean01:44
StevenKwgrant: make clean && make lead to the no lists == nothing to do error01:46
StevenKHandy. Something in my diff causes it02:01
wgrantStevenK: Hm, but lp.services.webapp.publisher is fairly widely imported02:03
wgrantSo there should be minimal circular issues02:03
StevenKI'll binary search through the diff after lunch02:04
StevenKWAT03:06
StevenK% bzr di lib/lp/services/webapp/publisher.py | head -n 37 | tail -n 103:07
StevenK+from lp.services.webapp.servers import WebServiceClientRequest03:07
StevenKThat is what causes buildmailman to lose its mind03:07
StevenKSo I guess it's circular, but eh ....03:08
StevenKAnd now the FieldStorage is empty :-(03:25
* StevenK mutters at IProductRelease._getFileObjectAndSize03:56
StevenKwgrant: It asserts it is passed a file or StringIO03:57
wgrantStevenK: You're not giving it a StringIO?04:34
StevenKFieldStorage returns an object that identifies itself as cStringIO.StringO04:35
StevenKAh, the critical bug didn't get re-opened when you reverted the fix?04:37
wgrantNo, I forgot to04:37
StevenKEh04:37
StevenKI'll just link the High bug then04:37
wgrantNo04:38
wgrantReopen04:38
wgrantI think04:38
StevenKAnd then close the two of them?04:38
wgrantIt fixes both04:38
wgrantSo why not :)04:38
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/handle-invalid-unicode-in-query-string-redux/+merge/14677304:45
StevenKBut I've just realized I don't have an XXX04:45
wgrantStevenK: Reviewing cjwatson's branch atm (finally!), will do that after04:46
StevenKLet me file a bug and add an XXX to both callsites.04:46
StevenKSince you asked me to on the call this morning04:47
wgrantYeah04:47
wgrantIt's clearly a terrible hack, so deserves an XXX or three04:47
StevenKwgrant: Against lazr.restfulclient ?04:48
wgrantStevenK: LP04:50
wgrantThe hack is in LP04:50
lifelessflacoste: o/06:13
StevenKwgrant: Do I get a review now?07:01
wgrantStevenK: You run it through StringIO in one case but not the other?07:04
StevenKwgrant: Yes. IBug.addAttachment just wants to read() from it, whereas IProductRelease.add_file actually cares if it's a StringIO or file.07:05
wgrantStevenK: Ah07:05
wgrantStevenK: If there's a launchpadlib-based test for add_file, can you extend it to verify correct behaviour?07:05
wgrantXXX and bug reference in the Function of Doomâ„¢ too, pls07:06
* StevenK peers at this horrible doctest07:08
wgrantEven if there isn't one already, they're pretty short to write (but long to run), so it's probably worth adding one07:08
StevenKwgrant: There are two sections that add a PRF to firefox, just need to work out how to get the content of the file easily07:09
StevenKChanging the content of one of the strings would be easy07:10
StevenK'\x1f\x0cf\xff' seems good enough07:11
adeuringgood morning08:50
jtvGuten Morgen adeuring08:58
adeuringhi jtv!08:59
czajkowskiello09:31
jtvHi there czajkowski10:08
czajkowskijtv: hey hows things?10:11
jtvczajkowski: nice and busy.10:13
jtvAlso, more expensive than last year.  :)10:13
czajkowskiwhy's that?10:14
jtvJust a general observation.  Things are more expensive  than last year.  Apply to any given year.10:15
jmljtv: deflation has been known to happen.10:22
czajkowskijtv: I just moved out of london, it brought it down a meer fraction of cost10:22
jtvjml: Mostly local though.  For the true pessimist there is always a lead lining _somewhere_ in the world.10:22
jmljtv: :)10:23
jtvPessimism: because if failure is your goal, you really can't lose.10:23
=== slank_away is now known as slank
=== matsubara is now known as matsubara-lunch
=== matsubara-lunch is now known as matsubara
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
=== matsubara is now known as matsubara-afk

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