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

=== Ursinha-afk is now known as Ursinha
=== Ursinha is now known as Ursinha-afk
lifelessanyone around ?08:04
lifelesshttps://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/3401108:04
StevenKlifeless: Are you that busy that you need to work on a Sunday?08:46
lifelessStevenK: I had a very fragmented week last week08:54
lifelessthe first few days of caffeine detox were a bitch08:55
lifeless+ moved house08:55
lifeless+ this has been annoying me since the epic08:55
lifelessStevenK: are you a reviewer yet ?08:56
lifelessjelmer: hai08:57
StevenKlifeless: Mentored by thumper, and I'm about to go out08:57
lifelesshave fun09:01
=== lifeless changed the topic of #launchpad-reviews to: On call: - || reviewing: - || 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
jelmerlifeless, hi13:04
=== Ursinha-afk is now known as Ursinha
lifelessjelmer: hi18:39
jelmerlifeless, 'morning18:39
lifelessjelmer: are you a full reviewer now ?18:42
jelmerlifeless: yep, have been for some time18:42
lifelesscare to do a small review ? https://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/3401118:42
jelmerlifeless: Sure18:43
jelmerI need to get some groceries before the shops close, but I'll have a look when I get back.18:43
lifelessthanks!18:44
lifelessthumper: can I get a review ?22:24
thumperlifeless: I'm sprinting with wallyworld_ this week, so my time to response may be a little lower than normal22:25
thumperso almost glacial22:25
lifelessah22:26
lifelesssee, I have this patch22:26
lifelessthat removes an O(N^2) behaviour in the bug attachments API22:26
lifelessits been our biggest oopser since the epic22:26
lifelessI'm excited.22:26
lifelessI'll see if mwhudson has a cycle or three22:27
lifelessmwhudson: ^22:27
mwhudsonwell22:27
mwhudsonnoone is around from linaro on mondays to see me slacking on that front...22:28
lifelessits small22:28
mwhudsonlink me up22:28
lifelesshttps://code.edge.launchpad.net/~lifeless/launchpad/bug-618849/+merge/3401122:28
lifelessthe typo on line 173 i'm fixing now22:30
mwhudsonhmm22:31
mwhudsonthe bug xyz text on the merge proposal links to https://code.edge.launchpad.net/bugs/625102 :(22:31
_mup_Bug #625102: exported_as does not handle overriding an unexported attribute <lazr.restful:New> <https://launchpad.net/bugs/625102>22:31
lifelessyes22:32
lifelessit made this more awkward than I would have liked.22:32
lifelessIf there is another alternative workaround I'm happy to do-over - ec2 test told me some stuff failed, and I've fixed and checked all that locally, so I'm pretty sure there are no dragons left22:33
mwhudsonno, the rootsite of the url is wrong22:33
mwhudsonthat's what i was complaining about22:33
lifelessoh, ah!22:33
lifelessit works :P22:33
mwhudsonyeah22:34
mwhudsoni don't know what i think about that aspect :)22:34
lifelesswhat do you think about the other aspects22:41
mwhudsonah sorry got distracted by email22:42
* lifeless undistracts mwhudson22:45
mwhudsonlifeless: i think you need to have a big XXX block explaining what attachments_unpopulated is and how it differs from plain attachements22:51
lifelessmwhudson: like the one in the docstrings on the two properties?22:52
mwhudsonyeah, that'd be good i think22:54
mwhudsoner22:54
mwhudsonno22:54
mwhudsonin the interface22:54
lifelessthis poses a quandry22:55
lifelessI don't want to repeat myself.22:55
lifelessThe implementation is the right place to write this up - which I've done.22:55
lifelessthe shenanigans involved are certainly totally irrelevant to the API22:55
mwhudsonsure22:56
lifelessand at the interface level these two things are identical - to the extent that the interface models behaviour22:56
mwhudsonso maybe i should name the problem rather than a solution:22:56
mwhudsonif someone looks at the interface as it is in your branch, they are going to say "wtf"22:56
lifelessI'm happy to add a 'see lp.bugs.model.bug.Bug.attachments'22:57
lifelessbut having the implementation and explanation separated pretty much guarantees skew in the future.22:57
lifeless+    # See lp.bugs.model.bug.Bug.attachments for why there are two similar22:58
lifeless+    # properties here.22:58
mwhudsonyou should also link to the lazr.restful bug22:58
lifeless     attachments_unpopulated = CollectionField(22:58
mwhudsonlifeless: that'll do22:58
lifelesswell22:58
lifelessthe lazr.restful bug wouldn't eliminate having two properties22:58
lifelessit would however let the obvious one be the less-eager-loading one as we did in Person.allmembers and Person.all_members_prepopulated22:59
mwhudson.sure22:59
mwhudsonit should still be mentioned somewhere22:59
lifelessUnless we're going to actually come back and change this when the bug is fixed in lazr.restful, I don't see much point.23:00
mwhudsoni assumed we were23:00
lifelessits cosmetic23:00
mwhudsonhaving most of the code in launchpad reference this peculiarly named property is tech debt, surely?23:01
lifelessit would be a little nicer, but not faster or more correct, if lazr.restful had allowed exporting it23:01
mwhudsonwell sure it's cosmetic23:01
mwhudsoncosmetics are important23:01
lifelessmwhudson: it being a property is tech debt23:01
lifelessuhm23:01
lifelessI can mention it, I just don't see the value in doing so.23:02
mwhudsonlifeless: the way things are, i think it's very likely that the next time someone writes code that iterates over attachments, they will say23:03
mwhudsonfor attachment in self.bug.attachements: ...23:03
mwhudsonbecause that's the natural thing to write23:03
mwhudsonwouldn't it be better if that was actually the correct thing to say?23:04
lifelessit would be, I agree. there are - maybe - 5 bugs needed to fix to make that correct.23:04
lifelesswe need eager loading23:04
lifelesswe need a QL of some sort to control it23:05
lifelesswe need separated domain and storage code23:05
lifelesswe need the API to use object introspection on interfaces to specify a QL that will eager load appropriately23:05
lifelesslook, I'll reference the bug, I just think its minutiae; we could fix all the XXX linked bugs and not be hugely better off.23:06
lifelessor we can fix the structural things, and most of the XXX comments will just get deleted as we swing past the code and overhaul it.23:06
mwhudsonmaybe i'm too pessimistic, but launchpad is littered with 'temporary fixes' from 200523:08
mwhudsoni know you're good at fixing that sort of problem23:08
lifelessabsolutely.23:08
lifeless(to both lines :P)23:08
lifeless+    # attachments_unpopulated would more naturally be attachments, and23:08
lifeless+    # attachments be attachments_prepopulated, but lazr.resful cannot23:08
lifeless+    # export over a non-exported attribute in an interface.23:08
lifeless+    # https://bugs.launchpad.net/lazr.restful/+bug/62510223:08
_mup_Bug #625102: exported_as does not handle overriding an unexported attribute <lazr.restful:New> <https://launchpad.net/bugs/625102>23:08
lifeless     attachments_unpopulated = CollectionField(23:08
mwhudsonlifeless: thank you23:08
lifelessAll I'm saying is that the tech debt lets-use XXX comments approach seems to be not working.23:08
mwhudsonlifeless: it has worked out ok a few times for me23:09
lifelessbecause, the deep problems aren't actually being tackled, or something.23:09
lifelessor aren't getting enough official airtime. I don't have enough data to isolate causes yet.23:09
mwhudsonwhen i've worked around a bug in bzr, i've been able to grep for the bug number when the fix in bzr has been released23:09
mwhudson(and twisted)23:09
lifelessgenerally though thats not something thats really a workaround to a structural issue in LP is it ?23:10
lifelesslike, having to do X to bzr, which it doesn't support, because Y is brain-damaged in LP itself23:10
mwhudsoni guess not23:11
lifelessI think things that can't be done the right way are worth noting with bugs; but the right bug number should be the root cause.23:12
lifelessanyhow, thats committed and pushed.23:12
mwhudsonlifeless: how did you find the places to s/attachments/attachments_unpopulated/, just grep?23:15
lifelessmwhudson: yes23:16
mwhudsonmust have been fun :-)23:16
lifelessnot at all23:16
lifelessit will work if the wrong one is used, just be more expensive.23:16
lifelessI don't *think* I missed any23:16
mwhudsonlifeless: i don't find the docstring on BugAttachment.message very enlightening23:20
lifelessso, you understand what its doing ?23:21
mwhudsoni do now23:21
lifelessany suggestions for what to add into it ?23:21
mwhudsontrying to come up with some :-)23:21
mwhudsonmaybe something like "see lp.bugs.model.bug.Bug.attachments for where the IIndexedMessage is injected"23:22
mwhudsonand maybe change the first line to "this is a cached property to allow message to be prepopulated"23:23
lifeless-        """This is a property to allow message to be an IIndexedMessage.23:23
lifeless+        """This is a cachedproperty to allow message to be an IIndexedMessage.23:23
lifeless         23:24
lifeless-        This is needed for the bug/attachments API calls, which seem to be the23:24
lifeless-        only users of .message.23:24
lifeless+        This is needed for the bug/attachments API call which needs to index23:24
lifeless+        an IIndexedMessage rather than a simple DB model IMessage. See23:24
lifeless+        Bug.attachments where the injection occurs.23:24
mwhudsonlifeless: +1, thanks23:24
mwhudsonlifeless: no other comments, apart from "why is there SAMPLE_PERSON_EMAIL and USER_EMAIL??"23:25
mwhudsonbut that can rest for another day23:25
lifelessif I knew23:25
lifelesshaving found they were the same, I thought I'd make it clear they were the same :)23:25
mwhudsonyeah fair enough23:25
* mwhudson goes to do things on the website23:25
lifelessthanks23:25

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