[00:56] <lifeless> gary-afk: ok, so I've submitted upstream, but upstream zope.app.publication looks to be in the middle of a refactoring
[00:57] <lifeless> so 2) - can do
[01:11] <lifeless> mtaylor: please comment on HUDSON-5223
[01:11] <lifeless> bah echannel
[02:11] <maxb> Hmm. I wonder if I should nudge people away from importing multiple separate projects within the namespace of a single Launchpad project, when reviewing vcs-imports.
[02:21] <wgrant> maxb: That certainly sounds like a good idea.
[02:21] <lifeless> also towards using one project for one codebase
[02:21] <lifeless> (see python-email6)
[02:23] <lifeless> the most visible change with the new job for me: a whole new class of spam.
[02:24] <wgrant> lifeless: Does bugmail make up most of it?
[02:24] <lifeless> none of it
[02:24] <lifeless> 'enterprise architecture seminar' etc
[02:25] <wgrant> Oh dear.
[02:26] <lifeless> tell me something
[02:26] <lifeless> if we *deleted* the entire build scoring stuff
[02:26] <lifeless> and just said 'distro first, ppa builds second, recipes third, rebuild-tests fourth'
[02:26] <wgrant> It would work fine, yes.
[02:26] <lifeless> do you think people would be happier or sadder ?
[02:27] <lifeless> ok
[02:27] <lifeless> clearly I need to ask actual distro folk
[02:27] <lifeless> :P
[02:27] <wgrant> Well.
[02:27] <wgrant> In the current model it would work fine.
[02:27] <wgrant> But soon it won't.
[02:27] <wgrant> When we destroy the virt/non-virt distinction.
[02:27] <lifeless> I don't see why that would invalidate it
[02:27] <lifeless> tell me more!
[02:27] <wgrant> We probably don't want the first autosync run to drown out PPA builds for days.
[02:28] <wgrant> Nor do we want mass give-backs to do so.
[02:28] <lifeless> what if we said
[02:28] <lifeless> rather than strictly ordered
[02:28] <lifeless> 10 distro to 2 ppa
[02:28] <lifeless> 10 ppa to 2 recipes
[02:28] <lifeless> 10 recipes to 2 rebuild tests
[02:29] <lifeless> or something like that
[02:29] <wgrant> Possibly.
[02:29] <wgrant> I also think we should look at existing scheduling theory and see how things are meant to be done. We can do better than a CPU scheduler, since we have job time estimations.
[02:30] <lifeless> well
[02:30] <lifeless> right now I'd settle for 'real simple and understandable'
[02:31] <wgrant> We need to draw out various use cases like those I've just outlined.
[02:31] <wgrant> And work out what will work.
[02:31] <wgrant> Since the current one probably doesn't work.
[02:31] <wgrant> Although it's not quite clear, given how crap buildd-manager is at the moment.
[02:32] <lifeless> I would like something with the following characteristics:
[02:32] <lifeless>  - does not do O(anything) work after accepting a task
[02:33] <lifeless>  - supports some form of 'make this thing happen sooner pretty please' (but does not need to support 'make thing happen later')
[02:35] <wgrant> We definitely need a 'rush build' button, yes.
[02:36] <lifeless> most of the queuing system out there are not terribly keen on lots-of-fiddle : they want simple reliable robust
[03:54] <mtaylor> lifeless: is there any good way to bribe a losa?
[03:54] <lifeless> yes
[03:54] <mtaylor> sweet! what is it?
[03:54] <lifeless> write a patch to launchpad that makes their lives easier.
[03:54] <mtaylor> gah
[03:54] <mtaylor> that will take longer than just waiting
[03:55] <lifeless> what are you waiting for
[03:55] <mtaylor> some renames
[03:55] <lifeless> details
[03:55] <lifeless> branches or projects
[03:55] <lifeless> people or teams
[03:55] <lifeless> planets or governments
[03:55] <mtaylor> a project, and two teams
[03:55] <mtaylor> they've all got approved questions
[03:55] <lifeless> did you make a question
[03:56] <mtaylor> I did
[03:56] <lifeless> linky linky
[03:56] <mtaylor> https://answers.edge.launchpad.net/launchpad-registry/+question/116856
[03:56] <mtaylor> https://answers.edge.launchpad.net/launchpad-registry/+question/116849
[03:57] <mtaylor> https://answers.edge.launchpad.net/launchpad-registry/+question/116846
[05:16] <spm> mtaylor: fwiw, cake works. as do any sweet baked substances.
[05:18] <mtaylor> spm: I'll mail cake right away
[05:19] <mtaylor> spm: does the cake need to taste good? or is it enough that it is simply cake?
[05:19] <spm> the former is preferred, but the latter is, tbh, good enough
[05:26] <spm> mtaylor: blarg. first hurdle of sorts. swift-team "This team cannot be renamed because it is private." <== I believe via the DB will work, but there may be funkies. be. ware.
[05:27] <mtaylor> spm: lovely
[05:27] <mtaylor> spm: I like causing trouble!
[05:28] <spm> ./forcenickchange mtaylor Trouble (note capital T)
[05:29] <Trouble> oh. this nick is registered...
[05:30] <spm> hahaha
[05:31] <mtaylor> spm: I found many things that don't like being done with private teams
[05:31] <mtaylor> spm: and private projects
[05:31] <spm> yeah. because they're the exception and not the rule; they tend to hit funky edge cases as it were
[05:32] <spm> mtaylor: so the first two should be done
[05:33] <mtaylor> spm: you are so getting a cake
[05:33] <spm> heh
[05:33]  * mtaylor goes to look up cake import laws for australia
[05:34] <spm> they're probably horrible. even carrying in mentos and the like, need to be declared.
[05:37] <spm> mtaylor: that's the lot, and answers updated accordingly. woo.
[05:37]  * StevenK has declared food and medication every time he's re-entered Australia. Fun. Except not.
[05:39] <spm> I believe we now have to declare porn too. Tho I felt let down at not having that option to fill in, on the last trip.
[05:39] <StevenK> I've not yet seen that question
[05:40] <mtaylor> spm: sweet. thanks!
[05:40] <mtaylor> spm: oh - hey - you know those weird edge-cases you were mentioning
[05:40] <mtaylor> spm: check out https://edge.launchpad.net/swift
[05:40] <mtaylor> spm: all looks good except for "swift-files trunk series is the current focus of development"
[05:40] <spm> orsum
[05:41] <mtaylor> and yup. ... swift-files also mentioned on https://edge.launchpad.net/swift/trunk
[05:41] <mtaylor> me finds bugs! :)
[05:41] <spm> Ahhh. Display Name: swift-files <== for the project
[05:42] <mtaylor> ah. weird. ok cool!
[05:42]  * mtaylor didn't find bugs after all
[05:42] <spm> 1 form edit later, that looks better!
[05:42] <mtaylor> w00t!
[05:43] <spm> heh; I dunno; that I didn't see that as needing to be fixed when doing the change...
[05:44] <mtaylor> I think it was my sillyness that I had the display name be the same
[05:44] <spm> :-)
[05:45] <mtaylor> spm: you're going to shoot me... but I just noticed one more team/user thing, you know, because I'm stoopid
[05:45] <mtaylor> spm: should I file new question?
[05:45] <spm> nah is cool. which one?
[05:45] <mtaylor> https://edge.launchpad.net/~nova
[05:45] <mtaylor> spm: 0 karma user ... ~nova-team wants to be called ~nova in my boss's perfect world
[05:45] <spm> darn bosses
[05:46] <mtaylor> tell me about it
[05:46] <mtaylor> I would have preferred ~nova-devel and ~swift-devel myself
[05:48] <spm> hrm. that may still be in use by a wiki user
[05:49] <spm> nope. false alarm.
[05:50] <spm> https://edge.launchpad.net/~nova-es now
[05:51] <spm> mtaylor: and done
[05:52] <mtaylor> spm: I think you get two cakes now
[05:52] <spm> \o/
[05:52] <mtaylor> of course, aussie import quarentine means they'll likely be 6 months old by the time they get to you ... but you'll be sure they do not have rabies!
[05:53] <spm> hahaha
[05:55]  * spm recalls an amusing little take with quarantine and ship ballast water forms filled/filed via email and clasing with the tax office dropping a million or so emails in our queues of a friday afternoon. For some reason ships are a tad unreasonable to slowing down because a mail funnel is overwhelmed.
[06:02] <mtaylor> hahahahaha
[06:57] <lifeless> spm: hey question
[06:57] <spm> yo
[06:57] <lifeless> spm: is it possible to get something that would let me read most/all of dev.launchpad.net on the plane to prague ?
[06:58] <spm> wget?
[06:58]  * lifeless claps slowly
[06:58] <lifeless> or are you serious ?
[06:58] <spm> heh, was a serious suggestion. use it to recursively get the site down to 3-5 levels
[06:59] <spm> fwiw, I've used wget as a not as quick, yet dirty and working method to mirror a certain chunk of a Federal health & Ageing Departments website for DR purposes.
[07:00] <lifeless> oh yay naffed css on it
[07:00] <spm> which was .. fun. domino would have two 'names' that are different in it's namespace, yet identical on a mirror disk: blah/stuff/morestuff and blah/stuff being a file
[07:00] <spm>  -k? from memory?
[07:01] <lifeless> -m ?
[07:01] <lifeless> nope, needs more, its root-parenting them
[07:01] <spm> possibly. the option that says 'get all this stuff'
[07:01] <spm> extra stuff
[07:02] <lifeless> nah 404's
[07:02] <lifeless> -k is convert links
[07:03] <spm> ah yes. you will want that then.
[07:03] <lifeless> except its failing
[07:03] <lifeless> oh yay also the follow to action=xxx is terrible
[07:04] <spm> lifeless: wget -T 10 -o $ROOTDIR/../mirror.log -nv -rkEp -l 6 -nH
[07:04] <spm> is an extract of the cmd used per that mentioned above
[07:05] <spm> istr the -l 6 is "levels, 6 deep", which is oft trial and errorish
[07:06] <lifeless> also
[07:06] <lifeless> wth is that wiki on https?
[07:06] <lifeless> is public
[07:08] <spm> good question. no idea. hadn't noticed that before.
[07:13] <lifeless> grrrr
[07:30] <adeuring> good morning
[09:45] <wgrant> bigjools: Morning.
[09:59] <bigjools> wgrant: hi
[10:01] <wgrant> bigjools: So... the PPA log parser should work now, although I'm not sure if the production configs have the limit set.
[10:02] <bigjools> wgrant: nearly, I'll sort the rest today
[10:03] <wgrant> bigjools: Thanks!
[10:17] <wgrant> What happens if I create a PPA named 'meta'? Does the world explode?
[10:18] <wgrant> (since USER/meta seems to be used for metadata from other PPAs now)
[10:18] <jml> wgrant, asking is for minions
[10:18] <jml> wgrant, evil overlords do science!
[10:21] <lifeless> wgrant: you've done enough tests of these things in prod.
[10:21] <lifeless> wgrant: why start asking questions now ?
[10:25] <wgrant> lifeless: Huh?
[10:27] <bigjools> wgrant: I expect it will be fine right up until the point someone deletes the package with the meta data
[10:28] <lifeless> wgrant: I mean, give it a shot.
[10:28] <lifeless> wgrant: play around like you normally do :)
[10:28] <wgrant> bigjools: Well, or the 'meta' PPA becomes private.
[10:28] <bigjools> wgrant: it should co-exist fine with a PPA of that name
[10:28] <wgrant> lifeless: I don't play around and try to break production, except for U1, and that's because I have no other option :P
[10:50] <jml> I wonder how hard it would be to change zope.testrunner so that it can do its own layer composition
[10:54] <jml> so that instead of layer = LaunchpadFunctionalLayer, we could say layer = (DatabaseLayer, FunctionalLayer)
[10:54] <jml> or what have you
[10:56] <lifeless> fairly straight forward
[10:56] <lifeless> also should be fairly easy to make a testresources thing to process layers
[10:57] <lifeless> fwiw
[10:57] <jml> I've thought about that
[10:57] <jml> a) I'm not 100% sure what that would mean
[10:57] <jml> b) I don't know how to handle the "doesn't support tearDown" problem
[10:57] <lifeless> fix the root cause?
[10:57] <lifeless> what layers do we have that don't support tearDown ?
[10:59] <lifeless> [and how can we find that out]
[10:59] <jml> lifeless, http://paste.ubuntu.com/461047/
[10:59] <lifeless> none of those sound like they should be hard to fix.
[10:59] <lifeless> *sound*
[11:00] <jml> (I told you all that subunit was worth it!)
[11:02] <lifeless> I don't quite get the context on your last ;)
[11:02] <wgrant> The main issue is tearing down the CA, right?
[11:02] <lifeless> wgrant: there are 5 layers that don't support teardown
[11:02] <lifeless> wgrant: so there are, in theory, 5 issues, no ?
[11:02] <wgrant> No.
[11:02] <wgrant> Those four are probably all CA-related.
[11:02] <wgrant> The last, I'm not sure.
[11:03] <wgrant> Remember that the layers are composed.
[11:03] <lifeless> jml: ah, I see, you queried subunit for the answer
[11:03] <jml> wgrant, CA?
[11:03] <wgrant> jml: Component Architecture.
[11:03] <wgrant> Our lovely, lovely global state.
[11:04] <jml> right. specifically all of the registering done by zcml.
[11:04] <wgrant> Right.
[11:05] <jml> lifeless, how else would you find out? :)
[11:07] <jml> undoing that is probably not all that hard.
[11:09] <wgrant> It'd also be really nice if it didn't take lots of seconds to do in the first place.
[11:18] <jml> wgrant, yeah, it would.
[11:18] <jml> wgrant, did you know that when processing zcml, all of the registered utility classes are constructed?
[11:18] <wgrant> jml: ..... seriously?
[11:18] <jml> wgrant, yeh.
[11:18] <wgrant> I... thought that getUtility would do that on the first call.
[11:18] <jml> wgrant, it's caused the occasional weird import problem
[11:19] <jml> wgrant, as did I
[11:19] <lifeless> so
[11:19] <lifeless> this sounds simple
[11:19] <lifeless> does anyone feel like shaving it ?
[11:19] <lifeless> I promise a review if they do.
[11:19] <jml> heh heh
[11:19] <mwhudson> i knew that, because one of the utilities classes overrides $GNUPGHOME to something stupid in its constructor
[11:20] <mwhudson> https://bugs.edge.launchpad.net/launchpad-foundations/+bug/227586
[11:20] <jml> lifeless, I'm already nested a couple deep. gimme a few minutes
[11:20] <_mup_> Bug #227586: setting up the component architecture overwrites $GNUPGHOME <tech-debt> <Launchpad Foundations:Triaged> <https://launchpad.net/bugs/227586>
[11:20] <lifeless> test isolation, thats always a good idea.
[11:21] <mwhudson> the problems that causes aren't (just) in tests
[11:23] <lifeless> sure
[11:25] <lifeless> I have a nasty suspicion its my fault
[11:25] <lifeless> anyhow
[11:25] <lifeless> moving right along...
[11:25] <jml> has db-stable been merged back into devel yet?
[11:25] <jml> I guess I can find out myself
[11:27] <wgrant> Yes.
[11:27] <wgrant> A couple of days ago.
[11:27] <wgrant> It broke, but it's fixed now.
[11:27] <jml> wgrant, thanks.
[11:29] <jml> https://code.edge.launchpad.net/~jml/launchpad/remove-product-branch-portlet/+merge/29532
[11:32] <wgrant> jml: Oooh deleting sample data?
[11:33] <jml> wgrant, yeah, just the branch sample data
[11:33] <jml> wgrant, http://paste.ubuntu.com/461059/
[11:34] <jml> I'll push my branch up too
[11:34] <wgrant> jml: ... dragons?
[11:34] <jml> wgrant, as in "here be dragons"
[11:35] <wgrant> Ah.
[11:35] <jml> all of the pagetest/windmill stuff probably isn't intrinsically harder than the others
[11:35] <jml> but I'm afraid, and the list is long enough that I need to break it up in order to approach it anyway
[11:36] <jml> lifeless, could you please add an approved vote too? it makes ec2 land easier to use.
[11:36] <lifeless> grr
[11:36] <lifeless> by which I mean
[11:36] <lifeless> yes of course
[11:37] <bigjools> AAAAAAAARRRRRRRRRRRRGGGGGGGGGGGGGGGGGG
[11:38] <jml> lifeless, thanks.
[11:38] <jml> bigjools, you seem vexed.
[11:38] <bigjools> yes
[11:39] <jml> wgrant, lp:~jml/launchpad/no-branch-sample-data if you want to follow along.
[11:39] <wgrant> jml: s/branch-//
[11:40] <jml> wgrant, well, that's the goal :)
[11:40] <jml> wgrant, but one step at a time.
[11:40] <wgrant> Soyuz will be... fun.
[11:40] <wgrant> Although Code has done well with the factory for Soyuz stuff.
[11:40] <bigjools> where fun == pain hereto untold
[11:41] <bigjools> the old soyuz tests suck beyond belief
[11:41] <wgrant> Um, yes.
[11:41] <wgrant> I beliiiieve they're the worst in the tree.
[11:43] <bigjools> why does uncommenting the code here make this return an extra row in the results? http://pastebin.ubuntu.com/461061/
[11:43] <bigjools> extra_exprs is not even used in the query yet :/
[11:45] <lifeless> jml: https://bugs.edge.launchpad.net/launchpad-code/+bug/603532
[11:45] <_mup_> Bug #603532: make a simple 'approve' on a merge cast an approve vote <Launchpad Bazaar Integration:New> <https://launchpad.net/bugs/603532>
[11:45] <jml> lifeless, thanks.
[11:45] <wgrant> lifeless: Shouldn't that be handled by automatically setting the MP status when the right votes are present?
[11:46] <jml> wgrant, ideally, it would work both ways
[11:46] <lifeless> wgrant: thats a different story, and also nice to have.
[11:47] <lifeless> wgrant: one could write a scanner to scan for mp's that have individual votes which add to 'approved' and do it per-project
[11:47] <lifeless> I'd like to make that efficient,.
[11:47] <lifeless> e.g. event driven yada yada.
[11:47] <bigjools> Psychic Octopus has spoken
[11:47] <jml> bigjools, there's not enough information there for me to even make a guess.
[11:48] <bigjools> jml: well, now it works.... I'm at the stage where I don't care why it wasn't working
[11:48] <jml> ok.
[11:48] <bigjools> sorry for the noise
[11:52] <lifeless> no worries
[11:53] <jml> I just had an idea I should have had two years ago
[11:53]  * jml enhappenates
[11:58] <lifeless> and whats that?
[12:00] <jml> Hush. I'm creating.
[12:05] <deryck> Morning, all.
[12:05] <lifeless> hai
[12:06] <jml> deryck, hello
[12:08] <jml> lifeless, http://pastebin.ubuntu.com/461067/ -- that's what.
[12:08] <wgrant> jml: Randomness in tests: Australia says 'no'.
[12:08] <jml> yeah, I was uncertain about that bit.
[12:09] <jml> the other option (which I've used directly in other tests) is teamowner
[12:09] <wgrant> Although I guess it could weed out issues... it could also make everything damn confusing.
[12:09] <jml> erratic tests are bad.
[12:10] <jml> wgrant, of course, the whole point is that the manner in which one gets an arbitrary team member is completed separated from one's need for it
[12:11] <wgrant> jml: Right.
[12:11] <jml>     # David Allouche is a member of the vcs-imports team.
[12:11] <jml>     login('david.allouche@canonical.com')
[12:11] <jml> ^^^ that's the sort of code I want to replace.
[12:11] <wgrant> Right.
[12:12] <wgrant> Could just choose the first member or something like that.
[12:12] <lifeless> no
[12:12] <wgrant> Owner sounds dangerous.
[12:12] <lifeless> what does participation= in login do ?
[12:12] <jml> lifeless, I don't know.
[12:12] <jml> there's no docs on it either.
[12:12] <lifeless> heh
[12:12] <jml> lifeless, what question is "no" an answer to?
[12:12] <lifeless> so this looks good.
[12:13] <lifeless> but it could do with tests
[12:13] <lifeless> no -> wgrants 'take first' - taking the first will bite, eventually.
[12:13] <jml> wgrant, I don't know how deterministic choosing the first member is.
[12:13] <lifeless> it will also tend to be the owner.
[12:13] <lifeless> given that its currently rather difficult to make an owner outside the team, at least fo rusers of lp.
[12:13] <jml> lifeless, I couldn't find any tests for the existing stuff...
[12:14] <lifeless> jml: would you like a hand putting some smoke tests for this together ?
[12:14] <jml> I'm also not sure about passing the celeb name as the interface.
[12:15] <jml> but if it's a choice between login_as(getUtility(ILaunchpadCelebrities).vcs_imports) and login_celebrity('vcs_imports'), I think I know what I'll choose.
[12:15] <lifeless> I'm not sure enough about celebs yet.
[12:15] <jml> (I wish Python had a separate literal for symbols)
[12:15] <lifeless> string seems fine.
[12:16] <jml> hmm.
[12:17] <jml> now I feel sad
[12:17] <jml> lifeless, yes.
[12:18] <jml> lifeless, all of this stuff boils down to setupInteraction
[12:18] <jml> which lives in c.l.webapp.interaction
[12:18] <lifeless> jml: yes what ?
[12:18] <jml> and has tests here lib/canonical/launchpad/doc/webapp-authorization.txt
[12:18] <jml> lifeless, yes I would like a hand putting some smoke tests for this stuff togethre
[12:18] <lifeless> ok
[12:18] <jml> lifeless, this yak shaving thing is exhausting.
[12:18] <lifeless> the first times a doozy
[12:19] <lifeless> I'm logging tointo my lp dev environment
[12:19] <jml> I need to make a list.
[12:21] <lifeless> oh wow
[12:21] <lifeless> so, your patch adds login_as, login_celebrity, login_team
[12:22] <lifeless> login_as needs two tests
[12:22] <lifeless> or perhaps four (check participation is passed down)
[12:22] <lifeless> celebrity wants one happy path
[12:23] <lifeless> team wants one, and get_arbitrary wants either a test or to be private.
[12:23] <lifeless> does that seem complete ?
[12:23] <lifeless> jml: can you push your patch, we can divide and conquer
[12:24] <jml> lifeless, sure, that seems good. let's make get_arbitrary_... private for now.
[12:24] <jml> bzr+ssh://bazaar.launchpad.net/~jml/launchpad/more-login-helpers
[12:24] <jml> http://paste.ubuntu.com/461073/
[12:26] <jml> lifeless, so now I've found get_current_principal, I think I'm actually ok with figuring out how to write these tests.
[12:27] <lifeless> ok
[12:28] <lifeless> I like that you are yak shaving here.
[12:28] <lifeless> The result should be really helpful to people!
[12:58] <jml> woot, down another level.
[12:58] <lifeless> \o/
[12:58] <lifeless> want a review?
[13:00] <jml> no, not yet, thanks. I'm one level deeper. I need to actually come back up before reviews make sense.
[13:00] <lifeless> oh
[13:00] <lifeless> I thought your stack was inverted based on your pastebin
[13:01] <lifeless> Its midnight; I shall sleep; then fly.
[13:01] <jml> uhh, no. the stack goes down.
[13:01] <jml> lifeless, sleep well.
[13:11] <jml> https://code.edge.launchpad.net/~jml/launchpad/remove-get-current-principal/+merge/29542
[13:19] <salgado> jml, s/principle/principal  ;)
[13:19] <jml> salgado, where?
[13:19] <salgado> the function's docstring
[13:19] <jml> salgado, thanks.
[14:37] <mwhudson> jml: wouldn't login_team work better by creating a person, adding them to the team and logging in as that person?
[16:55] <jml> mwhudson, good idea
[17:40] <jml> I've got a question. It might be a tough one.
[17:40] <jml> what's the difference between being logged in as an anonymous user and not being logged in?
[17:45] <bigjools> test suite or API?
[17:49] <jml> since you asked, both :)
[17:49] <jml> (but test suite is my primary interest)
[18:18] <mwhudson> jml: it has to do with whether the principal associated with the current interaction implements some interface i think
[18:18] <jml> mwhudson, yeah, but what does that actually mean?
[18:18] <jml> mwhudson, and why does it matter?
[18:18] <mwhudson> jml: it means that some bits are different in ram somewhere
[18:19] <mwhudson> jml: why does anything matter :)
[18:19] <mwhudson> jml: you're not asking these questions in a way that's easy to answer :-)
[18:19] <jml> why do we ever need to login(ANONYMOUS)?
[18:19] <jml> why don't we model being "logged in as anonymous" as "not being logged in"
[18:19] <mwhudson> oh sorry
[18:19] <mwhudson> i misread
[18:20] <mwhudson> if you're not logged in, there is no principal associated with the current interaction, or maybe there is no interaction
[18:21] <jml> there's no interaction, it seems.
[18:21] <mwhudson> for web-published stuff (like the api) logging in (possibly has anonymous) happens very very early
[18:21] <jml> *** AttributeError: AttributeError("'thread._local' object has no attribute 'interaction'",)
[18:21] <mwhudson> in tests and scripts and so on ... err
[18:21] <jml> I wonder what an interaction is.
[18:21] <mwhudson> not sure
[18:21] <mwhudson> jml: it's a less specific word that request
[18:22] <mwhudson> but it basically fits the same hole in the puzzle
[18:22] <jml> mwhudson, I thought participation was that.
[18:22] <mwhudson> oh
[18:22] <jml> I might be wrong.
[18:22] <mwhudson> ok, i don't remember what the difference between interaction and participation is then :-)
[18:22] <jml> ok.
[18:22] <mwhudson> i think one might be a more specific version of the other though?
[18:23] <jml> benji, gary_poster: hello
[18:23] <gary_poster> jml hey
[18:23] <mwhudson> oh no
[18:23] <mwhudson> the interaction can have a number of participations
[18:23] <gary_poster> interactions have one or more partici...right
[18:23] <jml> mwhudson, if I had to guess, I would say that a participation is the thing that bridges between a principal and an interaction
[18:23] <gary_poster> but we never do that
[18:23] <gary_poster> yes
[18:24] <jml> gary_poster, so what's an interaction?
[18:26] <gary_poster> jml, for our usage (and indeed standard usage) one request has one security interaction with the system (which is practically an instance of the security policy).  The interaction, for us, always has one participation, which is the user for that request.
[18:27] <mwhudson> gary_poster: but in principle answering a request could have multiple interactions?
[18:27] <gary_poster> (the multiple participation model exists to prevent privilege escalation in certain scenarios)
[18:27] <jml> gary_poster, ok, that helps. some followup questions though...
[18:27] <gary_poster> mwhudson in the abstract, yes
[18:27] <jml> gary_poster, "practically"?
[18:28] <gary_poster> jml, um, replace with "in our implementation, and the standard implementations"?
[18:28] <jml> gary_poster, thanks :)
[18:28] <gary_poster> np :-)
[18:28] <jml> gary_poster, also, the participation is not the user for the request, at  least, not in our tests.
[18:28]  * mwhudson runs
[18:28] <jml> gary_poster, participation = LaunchpadTestRequest(
[18:28] <jml>             environ={'HTTP_HOST': allvhosts.configs['mainsite'].hostname,
[18:28] <jml>                      'SERVER_URL': allvhosts.configs['mainsite'].rooturl})
[18:29] <gary_poster> yes, the participation is a request in the implementation
[18:29] <gary_poster> from the security system's perspective, though, the request only has to implement a single interface
[18:29] <jml> which is?
[18:29] <gary_poster> that interface describes how to get the user from the participation
[18:29] <gary_poster> eh, I'll look
[18:30] <gary_poster> it's in zope.security someplace
[18:30] <jml> from zope.security.interfaces import IParticipation ?
[18:30] <gary_poster> must be it, yes
[18:30] <jml> ok. pieces are drifting into place.
[18:31] <gary_poster> and if you look at that interface, it only defines two bits
[18:31] <gary_poster> a (back) reference to the interaction
[18:31] <gary_poster> and a principal
[18:31] <jml> gary_poster, so the reason that we get errors like "'thread._local' object has no attribute 'interaction'" when we try to use getUtility without first "logging in" is...
[18:31] <gary_poster> an interaction has not been started
[18:31] <gary_poster> as defined in zope.security.management I think; looking
[18:32] <gary_poster> yeah, newInteraction
[18:32] <gary_poster> (or perhaps something is being called with a security wrapper after the interaction has been ended)
[18:32] <gary_poster> in any case, there is no active security interaction
[18:33] <jml> gary_poster, ok, thanks.
[18:33] <gary_poster> sure
[18:33] <jml> gary_poster, I think as a result of this conversation I am going to maybe write a longer module docstring in c.l.webapp.interaction
[18:33] <gary_poster> I'm going to run about now for travel prep and the like...
[18:33] <gary_poster> ok I like improved docs
[18:34] <gary_poster> I'll look at that module for the heck of it...
[18:34] <gary_poster> yeah, doesn't say much
[18:35] <gary_poster> jml, anything else I can help with, or may I run?
[18:35] <jml> gary_poster, nothing for now
[18:35] <gary_poster> ok cool
[18:35] <jml> gary_poster, I'll shelve my next request :)
[18:35] <gary_poster> ...
[18:35] <gary_poster> ok :-)
[18:35] <gary_poster> see you in Prague!
[19:50] <lifeless> morning
[20:03] <lifeless> gary-afk: when you get back, I've a small question about zcml and utility parameters / configuration of event driven things.
[20:04] <gary-afk> morning lifeless.  ok, cool, what's up?  (fwiw, I'm mostly gone--travel prep, with occasional look-backs for pings like this)
[20:04] <gary-afk> need to go in prob 5
[20:04] <lifeless> Sure
[20:05] <lifeless> so I have some itch scratching on the profile module thing
[20:05] <lifeless> I have two functions called at start and end of requests
[20:06] <lifeless> I want to decouple them from the oops system and the global config, for testing and reuse. So I plan to make a single object and have the functions just trampoline into it.
[20:06] <lifeless> A Utility would match our current idiom, or perhaps just a module private.
[20:06] <lifeless> Anyhow, I'd like to give the instance of this class a parameter that it can call to name-and-write-out a profile
[20:07] <lifeless> because that code isn't related *doing* profiling, its related to *how we glue it in*
[20:08] <lifeless> I could subclass and our zcml then specifies the subclass, but thats all kinds of wrong. So I was wondering if there is either a way to provide parameters in zcml configs, or a way to run some python code at the same point in startup that zcml parsing occurs.
[20:08] <lifeless> fin
[20:08] <gary-afk> reading and processing...
[20:11] <lifeless> oh, one other small thing is that I'd then like to turn this into a totally external module - put it in the zope project or some such; I need to talk to flacoste about the logistics there; for now I'll probably keep it in-tree but give it its own dir and setup.py and build an egg for buildout from that.
[20:11] <gary-afk> no there's not; however, that's mostly because you shouldn't need to.  (which isn't to say I haven't wanted to practically, but anyway...) you can have, for instance, a class that provides the functionality, and then have zcml register an instance of the class, set up in LP code, that actually has specified the location.
[20:11] <gary-afk> A similar pattern, more for adapters, is to register in zcml a function as a factory
[20:12] <gary-afk> and the function specifies custom local bits
[20:12] <gary-afk> calling out to another function or class for the more general adapter bits
[20:12] <lifeless> the former looks a better fit to me; are there examples of that ?
[20:12] <lifeless> 'register an instance setup by LP code'
[20:13] <gary-afk> well, there is in Zope code.  It's pretty easy; lemme get details for you
[20:13] <lifeless> sweet, thanks
[20:14] <gary-afk> lifeless: btw, handy: http://apidoc.zope.org/++apidoc++/ .  zcml section is where I look bits up in sometimes.  salgado is making the other bits available for LP devs customized to LP (like browsing LP interfaces and classes with crossreferences and stuff)
[20:15] <lifeless> thanks
[20:16] <gary-afk> lifeless: <utility component="my.package.my.module.instance" provides="the.interface" />
[20:16] <lifeless> is using a Utility as a singleton a common pattern ?
[20:16] <gary-afk> definitely
[20:16] <lifeless> ok
[20:16] <lifeless> and where would one put the lp code to setup 'instance'
[20:16] <gary-afk> the zcml: can be simplified
[20:16] <lifeless> (surely not module inline)
[20:16] <gary-afk> depends on what you are doing
[20:16] <gary-afk> oh, yes.
[20:16] <gary-afk> if you want a factory then you can do a factory instead
[20:17] <gary-afk> but yeah, looking for something in module
[20:17] <lifeless> ok; so let me run this integrated thing past you once:
[20:17] <gary-afk> <utility factory="foo.factory" provides=""
[20:17] <gary-afk>  />
[20:17] <gary-afk> I have to run now!
[20:17] <gary-afk> sorry
[20:17] <lifeless> configured instance is a utility
[20:17] <lifeless> event hooks use utility
[20:17] <lifeless> implementation out of tree
[20:17] <lifeless> configuration in tree.
[20:17] <lifeless> gary-afk: thanks, you've been helpful.
[20:17] <gary-afk> +1, yes that's the intent
[20:18] <lifeless> I'll have some fine tuning to do in Prague
[20:18] <lifeless> thanks!