[01:14] <davecheney> thumper: ok
[01:14] <davecheney> thumper: FWIW, i think any of theproposed solutions will solve the issue at hand
[01:15] <davecheney> i think there is pleanty of scope for a morally correct fix once 1.14.0 is out
[02:36] <arosales> thumper, happy birthday
[02:36] <thumper> arosales: thanks, but it is tomorrow here :)
[02:36] <arosales> it still today here
[02:36] <arosales> and possibly yesterday somewhere else
[02:37] <arosales> thumper, happy belated birthday ;-)
[02:38] <thumper> :-) thanks
[03:45]  * thumper pulls a sad face
[03:52] <axw> thumper: what's making you sad?
[03:52] <thumper> I was adding an apiserver endpoint
[03:52] <thumper> and instead of using a pointer to a struct
[03:52] <thumper> I wanted to use an interface
[03:52] <thumper> everything worked well
[03:52] <thumper> until you called it
[03:52] <thumper> caused a panic in the reflect library
[03:53] <thumper> had to change it to a struct pointer
[03:53] <thumper> because I didn't want to fix our rpc code
[03:53] <thumper> somewhat out of scope for this change
[03:54] <thumper> axw, wallyworld: I completely missed the reminder about package review
[03:55] <axw> oh yeah
[03:55] <axw> me too :)
[03:56] <axw> nobody's selected anything to review either have they?
[04:01] <thumper> not that I know of
[04:02] <wallyworld> thumper: me too
[04:02] <wallyworld> i've been too busy to notice
[04:02] <wallyworld> next week :-)
[04:05] <axw> thumper: has mramm approved your travel? just wondering if my travel request has shown up at all
[04:06] <thumper> yes he has
[04:06] <thumper> but I've not booked it yet
[04:06] <thumper> should get on it
[04:06] <thumper> axw: poke him ovre email
[04:06] <axw> will do, thanks
[04:49] <davecheney> what are the dates again ?
[04:49] <axw> 21-25 I think
[04:52] <davecheney> ta
[05:13] <thumper> gah
[05:13]  * thumper emails travel people
[05:15] <axw> thumper: I'm going to work on bugs, unless you've got something else you'd rather I do?
[05:16] <thumper> you could add the "SupportsContainers" method to the Environment
[05:16] <thumper> it is pretty trivial
[05:16] <thumper> but then we need the add-machine code to use it
[05:16] <thumper> also container constraints
[05:16]  * thumper is polishing a pipeline of work
[05:16] <axw> container constraints? or environment constraints?
[05:17]  * axw hasn't heard of container constraints before
[05:17] <thumper> well, there is a constraint for putting something in a continer
[05:17]  * thumper thinks
[05:17] <thumper> so a machine constraint
[05:17]  * thumper is trying to work out why the tests blew up
[05:17] <axw> ok
[05:19] <thumper> jam: you around?
[05:24] <thumper> at least it looks like changes I added, so shouldn't be too hard to work out
[05:24] <thumper> jam: https://codereview.appspot.com/13421043/ (not sure why it is a closed issue, because it hasn't landed)
[05:25] <thumper> jam: it is a branch the rest of my stuff depends on
[05:25]  * thumper EODs to make dinner
[05:44] <davecheney> jam: is there a bug for the mgo revert ?
[05:44] <davecheney> i need to add it to the build tagball scripts
[05:44] <jam> davecheney: bug #1221705
[05:44] <_mup_> Bug #1221705: relationunit_test.go: 2 tests fail with mgo >= 241 <juju-core:Fix Released> <mgo:Confirmed> <https://launchpad.net/bugs/1221705>
[05:45] <jam> "Fix Released" in that juju-core has worked around the test suite failing.
[05:45] <davecheney> ta
[05:50] <davecheney> https://codereview.appspot.com/13515045
[05:52] <jam> davecheney: approved
[05:53] <jam> davecheney: I *think* that for 1.15 we'll want to go back to tip, and sort out the problems, but it is prudent to use rev240 for 1.14
[05:56] <davecheney> jam: so, to confirm, you do _not_ want this commited to trunk ?
[05:57] <jam> davecheney: I think we want it committed to trunk until the point that we move the rev of mgo on the bot.
[05:57] <jam> I'd like to say otherwise
[05:57] <jam> but it isn't reasonable to release a version we haven't been testing
[05:58] <davecheney> i think we're about 18 months too late to add that kind of hurdle
[06:01] <davecheney> jam: ignore my previously comment
[06:01] <davecheney> i parsed it incorrectly
[06:29] <davecheney> jam: https://code.launchpad.net/~dave-cheney/juju-core/backport-r1782/+merge/184938
[06:39] <jam> davecheney: approved
[06:44] <davecheney> ta'
[07:32] <rogpeppe1> mornin' all
[07:38] <rogpeppe> this looks very cool indeed; i haven't tried it yet though. https://docs.google.com/document/d/1WmMHBUjQiuy15JfEnT8YBROQmEv-7K6bV-Y_K53oi5Y/edit#
[07:39] <rogpeppe> i've been waiting for something like this ever since oakland, when the author mentioned something about it to me
[07:41] <axw> rogpeppe: it does look pretty cool.
[07:41] <axw> oakland? I thought adonovan was in NY
[07:42] <rogpeppe> axw: he was around in sf for the golang meetup
[07:42] <axw> ah
[07:44] <rogpeppe> a probably dubious thought - i wonder if you could use this instead of explicit tests for some hard-to-test functionality.
[07:52]  * axw waits for someone to write a web UI for it
[07:53] <axw> won't be long now
[08:14] <evilnickveitch> bigjools, you still awake?
[08:18] <TheMue> evilnickveitch: seen my hint regarding the docs change for the local provider?
[08:19] <evilnickveitch> TheMue, hi, yes indeed, sorry it has taken a while to get around to it but have been kept rather busy by the site redesign!
[08:19] <evilnickveitch> There are still a few things queued up
[08:20] <TheMue> evilnickveitch: ah, ok. but i'm happy if it is in this queue too. ;)
[08:20] <bigjools> evilnickveitch: I was eating dinner
[08:20] <evilnickveitch> bigjools, at this time in the morning?
[08:21] <TheMue> rogpeppe, axw, dimitern: who would like to review https://codereview.appspot.com/13522043
[08:21] <dimitern> TheMue: it seems you already have an lgtm on it
[08:22] <axw> I can look, but yeah, you only need 1 LGTM now
[08:23] <TheMue> i know, but still feling better with two :D
[08:23] <TheMue> but it's ok so too
[08:34] <fwereade_> evilnickveitch, so, I'm sorry, I got very behind on the actual changes, and my docs are conflicty as anything
[08:34] <fwereade_> evilnickveitch, can you briefly run down what's changed so I can most simply eliminate the structural changes and focus on the actual doc changes?
[08:35] <fwereade_> evilnickveitch, eg, is there some way I can just blat a matching pre/postamble onto the pages I've written and go from there? there didn't seem to be an obvious way to do that
[08:36] <jam> fwereade_: one of the big problems with pure html. no #include directive :)
[08:36] <fwereade_> jam, quite so
[08:37] <fwereade_> (grumble grumble generate from simple source format grumble)
[08:37] <evilnickveitch> fwereade_, don't worry about that, i will fix up the styles - the redesign changed a lot of stuff
[08:37] <jam> fwereade_: it was one of the things I never quite understood how to fix. You end up having to do "dynamic" content just to get consistent headers and footers.
[08:37] <fwereade_> evilnickveitch, well, OK, I just WIPped the branch, but there should be some useful content in there
[08:37] <evilnickveitch> jam, there is! Sort of - you can use the <embed> tag, but it screws up the css
[08:38] <axw> TheMue: reviewed
[08:38] <evilnickveitch> fwereade_, that's fine. There will be a new tool to generate a new page. soon :)
[08:38] <fwereade_> evilnickveitch, it's https://code.launchpad.net/~fwereade/juju-core/docs-splurge/+merge/184833 -- can I leave it in your hands to either fix it up or tell me what I have to do to help you?
[08:39] <evilnickveitch> fwereade_, yup, I already saw it. Just fixing some design tweaks and then I will look over it properly
[08:39] <fwereade_> evilnickveitch, <3
[08:39] <TheMue> axw: thx
[08:41] <fwereade_> evilnickveitch, I sort of feel that there are probably other underdocumented bits that I might be in a position to help with
[08:42] <fwereade_> evilnickveitch, is there anywhere you can think of where I should look in particular?
[08:42] <evilnickveitch> fwereade_, there is still the outstanding task list
[08:43] <evilnickveitch> hang on, i'll get you the link
[08:44] <evilnickveitch> fwereade_,  here:https://docs.google.com/a/canonical.com/spreadsheet/ccc?key=0AluxMMubLozZdEVhald5bFN0U3RFbjdqNW96RWx5Snc#gid=0
[08:44] <evilnickveitch> feel free to add anything :)
[08:44] <fwereade_> evilnickveitch, found it, thanks
[08:44] <fwereade_> evilnickveitch, just looking at m_3's interfaces stuff, seeing how badly I collided with him
[08:45] <evilnickveitch> fwereade_, it's okay, i will make sense of it all. It is easier for me to edit things together.
[08:46]  * TheMue seems to have problems with the compatibility - so many typos *sigh*
[08:47] <axw> TheMue: I think it's not so bad when all a review turns up is typos :)
[08:47] <axw> ... in comments anyway!
[08:48] <fwereade_> evilnickveitch, fwiw I think m_3's interfaces stuff is missing some subtleties -- he seems to be depending on relation-get in a -joined hook, and that's unwise (if perhaps somewhat instructive)
[08:48] <fwereade_> evilnickveitch, I'm afraid I haven't done a broad pass over the docs to see what recommends things contradicted elsewhere :(
[08:48] <TheMue> axw: yeah. but already dimitern found several misspellings of this word before. it seems it has burned in my brain in a wrong way.
[08:49] <axw> heh :)
[08:50] <evilnickveitch> fwereade_, okay, I will watch out for that. Maybe the best thing is for me to take a pass over it all and then let you look over the results? It would be very helpful.
[08:51] <axw> what's the policy for US/UK spelling in Ubuntu technical docs?
[08:51] <fwereade_> evilnickveitch, absolutely, no problem
[08:51] <evilnickveitch> fwereade_, thanks!
[09:00] <rogpeppe> fwereade_: any chance of a quick chat about https://codereview.appspot.com/13640043/ ?
[09:00] <fwereade_> rogpeppe, sure
[09:00] <rogpeppe> fwereade_: https://plus.google.com/hangouts/_/fe0782db82ad005f124b51fd3035bf811cb05e5d?authuser=1
[09:26] <jam> wallyworld: poke if you're around
[09:27] <dimitern> fwereade_: ping
[09:28] <fwereade_> dimitern, pon
[09:29] <dimitern> fwereade_: in worker/uniter/context_test.go there's a test called TestUnitCaching() which relies on PrivateAddress and PublicAddress being on the unit doc (like Life) and basically test what TestRefresh does
[09:30] <dimitern> fwereade_: but once we switch to the API context.unit.PrivateAddress() will always return the up-to-date value, so there's no caching - i'm thinking of dropping that test altogether
[09:30] <dimitern> fwereade_: unless you think that caching has some significance
[09:31] <fwereade_> dimitern, ehh, that's interesting
[09:31] <fwereade_> dimitern, take a quick look at uniter/context.go
[09:32] <fwereade_> dimitern, it feels like it would in general be goofd to maintain the usual guarantees
[09:32] <fwereade_> dimitern, that values from hook tools will not change over the course of a hook
[09:32] <dimitern> fwereade_: how can I do that with the API?
[09:32] <fwereade_> dimitern, in which case, lazily getting the value when requested and caching it for the lifetime of the context does sound smart
[09:33] <fwereade_> dimitern, just how it does for config settings, relation settings, whatever
[09:33] <dimitern> fwereade_: you mean each value is read only once?
[09:33] <dimitern> fwereade_: from the api, and cached
[09:33] <fwereade_> dimitern, get if missing, otherwise use cache, make sure cache is invalidated properly
[09:33] <fwereade_> dimitern, but do this at context granularilty
[09:34] <fwereade_> dimitern, so we get it once per RunHook
[09:34] <dimitern> fwereade_: when should cache invalidation happen?
[09:34] <fwereade_> dimitern, it may be that the precise test you're worried about is actually orthogonal
[09:35] <fwereade_> dimitern, for private/public address, it should be trivial, in that it happens automatically when the context is trashed at the end of the hook run
[09:35] <dimitern> fwereade_: so at RunHook invalidate the cache?
[09:35] <fwereade_> dimitern, the cache is the context
[09:35] <fwereade_> dimitern, the context is created in runHook
[09:35] <fwereade_> dimitern, isn't it?
[09:35] <dimitern> fwereade_: yeah, seems so
[09:35] <fwereade_> dimitern, look what we do for service config settings
[09:35] <fwereade_> dimitern, should be analogous
[09:35] <dimitern> fwereade_: right, thanks
[09:41] <jam> wallyworld: bug #1223752
[09:41] <_mup_> Bug #1223752: environs/simplestreams/simplestreams.go leaks test:// and file:// URLs into the http.DefaultClient <tech-debt> <juju-core:Triaged> <https://launchpad.net/bugs/1223752>
[09:42] <jam> fwereade_: I'm starting to actually like the idea of an "httpps://" protocol that gets registered with the default http.DefaultTransport.
[09:43] <jam> fwereade_: or even be verbose about "insecure-https://" or something like that.
[09:43] <jam> nonvalidating-https:// is a bit long
[09:44] <jam> It has the very nice property that all clients get access to it.
[09:44] <jam> And it allows all other https:// requests to still be validated.
[09:44] <jam> I came across it because of bug #1223752
[09:44] <_mup_> Bug #1223752: environs/simplestreams/simplestreams.go leaks test:// and file:// URLs into the http.DefaultClient <tech-debt> <juju-core:Triaged> <https://launchpad.net/bugs/1223752>
[09:44] <jam> which is exposing test URLs to the DefaultClient accidentally.
[09:47] <jam> It has the downside that mutating DefaultTransport can't actually be undone
[09:47] <jam> (There is RegisterProtocol but I don't see an UnregisterProtocol)
[10:14] <wallyworld> jam: i just got back from a school debate. oh the joy
[10:18] <wallyworld> file:// is intended to be registered since image metadata and tools urls can use that and httpClient.Get() works just fine with file:// so long as it is registered
[10:19] <jam> wallyworld: except you end up globally registering it which means net/http.Get() will also grab file:// urls
[10:19] <wallyworld> sure
[10:19] <wallyworld> is that an issue?
[10:20] <wallyworld> simplestreams uses net/http.Get() from memory, not sure, will have to check the code
[10:20] <wallyworld> the tools-url can be either file:// or http://
[10:21] <wallyworld> so both need to be registered/supported
[10:21] <jam> wallyworld: you have "environs/simplestreams/simplestreams.go" which has its own "httpClient" variable
[10:21] <jam> it seems like you were trying to isolate it for some reason
[10:21] <jam> but then you pass the DefaultTransport to that object
[10:21] <jam> and then register the "file" protocol with the client.Transport
[10:21] <fwereade_> jam, sorry, was meeting, reading scrollback
[10:21] <jam> which... .is the DefaultTransport
[10:22] <jam> wallyworld: so the code *looks* like you were taking pains to not expose this protocol
[10:22] <jam> but ended up using the global objects anyway
[10:22] <fwereade_> jam, I think I may be coming round to that idea
[10:23] <dimitern> small review anyone? https://codereview.appspot.com/13490045/
[10:23] <wallyworld> there was some issue with lack of ability to override some aspect of constructing an gttp client, i can't recall now. but the stdlib was limited somehow. i'd have tp re-read the code
[10:24] <jam> wallyworld: so there is a problem that there is no way to "Unregister" a protocol
[10:24] <wallyworld> yes, that is sad
[10:24] <jam> so you can't just set one up for a test suite and then tear it down
[10:24] <wallyworld> yep :-(
[10:24] <jam> which means you end up needing to shim it in there if you want proper cleanup
[10:25] <jam> like by having your own Transport and its associated registry of protocols
[10:25] <jam> which then means you need a custom Client to point at that Transport
[10:25] <wallyworld> not sure why they designed it like that
[10:25] <jam> you did the custom Client, but not the Transport
[10:25] <fwereade_> dimitern, on it
[10:25] <wallyworld> there may have been a reason, i'd have to re-look
[10:25] <wallyworld> i seem to recall something but can't remember now
[10:26] <jam> wallyworld: on the flip-side, I may be (ab)using the DefaultTransport as well, to allow us to register "nonvalidating-https://"
[10:26] <jam> to allow some URLs to be insecure.
[10:26] <wallyworld> ok
[10:26] <dimitern> fwereade_: thanks
[10:26] <jam> It has the *really* nice property that only some URLs end up insecure
[10:26] <jam> instead of pretty much everything.
[10:27] <jam> and allows us to support it, without having to rewrite every possible http client that might want access to these things.
[10:28] <fwereade_> dimitern, reviewed with questions
[10:29] <dimitern> fwereade_: cheers
[10:29] <dimitern> fwereade_: yes, it does impact tags - they're constructed by transforming the key
[10:30] <fwereade_> dimitern, ok, are there any necessary changes to tag validation functions and the like? assumptions that there's a # in there or something?
[10:30] <dimitern> fwereade_: and i cannot remember whether there were numbers in relation names, but it doesn't hurt to have them imo
[10:30] <dimitern> fwereade_: I made all the changes I think
[10:31] <dimitern> fwereade_: there was # in there originally, now it's optional for peer rels
[10:31] <fwereade_> dimitern, I didn't see any tests for the tag behaviour is all
[10:32] <dimitern> fwereade_: i'm sorry I don't seem to get you, expand please
[10:32] <fwereade_> dimitern, the set of valid relation tags has now changed too, right? and all the changes and tests are purely in terms of name
[10:33] <dimitern> fwereade_: take a closer look at the test - it's both about names and tag formats
[10:35] <fwereade_> dimitern, TestRelationKeyFormats? you'll have to enlighten me
[10:35] <fwereade_> dimitern, fwiw its test numbering is screwy
[10:35] <dimitern> fwereade_: so, like the unit name formats tests
[10:35] <fwereade_> dimitern, (i * len(js))+j, surely?
[10:36] <dimitern> fwereade_: this one combines valid and invalid relation names and valid and invalid service names to form a key and test its validity
[10:36] <dimitern> fwereade_: oh, that's right :) will fix it
[10:37] <dimitern> fwereade_: tag formats are tests in tag_test.go
[10:37] <dimitern> fwereade_: I'll add a peer relation tag there as well, good point
[10:37] <fwereade_> dimitern, yeah, that's all I think
[10:38] <jam> fwereade_: so it isn't "just" that simple. The URLs we use for queries in Openstack are read back from keystone as part of the Authentication process. So goose would still need to know that "for the URLs you get back on this connection, rewrite them to "nonvalidating-https""
[10:40] <fwereade_> jam, sure, understood, I wasn't imagining it was a fix for the whole problem, but the need for nonvalidating-https crosses several boundaries, right?
[10:41] <jam> fwereade_: so before Ian's simplestreams work, we only really accessed HTTP behind the Provider interface. Now we do some bits directly. I'm trying to figure out if registering the new protocol, and then teaching goose to use it is easier/better than just teaching simplestreams at the low level about it.
[10:41] <jam> the *nice* bit is that if we have it registered
[10:41] <jam> then goose can say "the public-bucket URL is actually: nonvalidating-https://"
[10:43] <fwereade_> jam, yeah, the big problem is that it cuts across whole projects
[10:43] <fwereade_> jam, and so it's not quite clear where to put it except in its own project
[10:44] <fwereade_> jam, which feels mildly nasty
[10:44] <jam> fwereade_: right
[10:44] <jam> and then goose imports it, and juju-core imports it, etc
[10:44] <jam> and it is already registered so both just use it
[10:44] <jam> standup time: https://plus.google.com/hangouts/_/fe0782db82ad005f124b51fd3035bf811cb05e5d
[10:45] <jam> mgz fwereade_ dimitern TheMue wallyworld natefinch ^^
[10:45] <fwereade_> btw, guys, I'm not even going to try the standup today, drilling has just started and it will be unpleasant for all concerned
[10:46] <dimitern> fwereade_: updated https://codereview.appspot.com/13490045/
[10:46] <fwereade_> I will be here on irc though
[10:46] <fwereade_> and will hopefully be signing an actual contract tonight, soon after which I will be out of this building site
[10:47] <dimitern> fwereade_: \o/
[10:47] <jam> fwereade_: np, what have you actually gotten done today?
[10:48] <jam> mgz: ^^
[10:48] <mgz> ta
[10:48] <jam> rogpeppe: standup? ^
[10:48] <fwereade_> jam, nothing apart from talking to people I'm afraid, and I have emails to write for much of the afternoon
[11:03] <dimitern> fwereade_: ping
[11:04] <davechen1y> fwereade_: welcome to my world
[11:08] <wallyworld> fwereade_: since you're ocr, if you have time, there's a couple of merge proposals which are lonely and need some lovin' , see +activereviews
[11:49] <fwereade_> dimitern, sorry, went for lunch, couldn't stand it
[11:49] <fwereade_> wallyworld, ack
[11:49] <wallyworld> thanks :-)
[11:53] <rogpeppe> lunch
[11:58] <dimitern> fwereade_: np, have a look when you can https://codereview.appspot.com/13490045/
[11:59] <fwereade_> dimitern, that LGTM, thanks
[11:59] <dimitern> fwereade_: cheers
[12:06] <jam> natefinch: https://code.launchpad.net/~natefinch/juju-core/008-windows/+merge/181916 It looks like you tried to land it, but had a file conflict.
[12:06] <jam> Can you look at it again?
[12:06] <jam> I thought we actually wanted that to land for 1.14
[12:12] <natefinch> jam: ahh, thanks, I missed the fact that it didn't actually land
[12:50] <rogpeppe> fwereade_: slight hitch with the plan to introspect directly what workers are being run by the machine agent
[12:51] <fwereade_> rogpeppe, oh yes
[12:51] <rogpeppe> fwereade_: it's not easy to tell which worker is actually being run
[12:51] <rogpeppe> fwereade_: i'd thought we could do it by looking at the type of the worker
[12:51] <rogpeppe> fwereade_: but several workers share the same type
[12:52] <rogpeppe> fwereade_: i could just look at the runner worker id, but that doesn't actually tell us if we're actually running the correct worker
[12:53] <rogpeppe> fwereade_: i suppose i could mock out all the worker New functions
[12:55] <rogpeppe> fwereade_: for the specific case of the api server, this isn't an issue because the worker is of type *apiserver.Server, but i'd really hoped to use the same test style for the existing tests too (and hopefully be able to reenable some of the flaky ones too)
[12:56] <fwereade_> rogpeppe, yeah, indeed
[12:57] <fwereade_> rogpeppe, patching new-worker funcs sounds somewhat interesting me, because it's most in line with what stm to be a sensible end state
[12:57] <rogpeppe> fwereade_: in the end, even if i mock out the worker New* functions, i'm still not convinced that we get sufficient test coverage though
[12:57] <fwereade_> rogpeppe, but the variety of such funcs is in itself somewhat flaky
[12:58] <rogpeppe> fwereade_: you think all workers should be able to start with no input except the state?
[12:59] <fwereade_> rogpeppe, and probably the agent conf
[13:00] <fwereade_> rogpeppe, because that's got DataDir from which all good things flow, not to mention the actual tag etc
[13:00] <fwereade_> rogpeppe, however, I'm concerned it's too much of a leap from where we are to get done any time soon
[13:00] <rogpeppe> fwereade_: i'm not sure. i like seeing exactly what a worker needs, rather than just passing everything in.
[13:02] <rogpeppe> fwereade_: yeah, i think agree it may be too big a leap
[13:02] <rogpeppe> fwereade_: for example, the current machine id isn't in the agent conf
[13:02] <rogpeppe> fwereade_: but we need to pass it to provisioner.NewProvisioner
[13:04]  * fwereade_ raises an eyebrow...
[13:04] <fwereade_> rogpeppe, the id is needed to create the conf in the first place
[13:04] <fwereade_> rogpeppe, even if there is not currently a Tag method on conf I don't see it as forbidden knowledge in that context
[13:05] <rogpeppe> fwereade_: hmm, yes, we can infer it from the data dir, i guess
[13:05] <rogpeppe> fwereade_: or APIInfo.Tag
[13:06] <fwereade_> rogpeppe, anyway, not one for today, but I think thumper has also had thoughts in that direction
[13:08] <rogpeppe> fwereade_: even if we mock out the worker New functions, i'm not sure that it's totally convincing that they're being used in the right way inside the guts of the machiner.
[13:09] <fwereade_> rogpeppe, surely you get to see exactly what gets started, and when they each get stopped
[13:10] <rogpeppe> fwereade_: you get to see that they're started, but you don't necessarily know if they're actually wired up correctly
[13:10] <fwereade_> rogpeppe, by triggering various errors from inside and out
[13:10] <fwereade_> rogpeppe, if you've mocker out the new worker funcs, you can check the args and know what was created surely
[13:11] <fwereade_> rogpeppe, the wiring of those args within the real workers will be tested in the worker-specific tests
[13:11] <rogpeppe> fwereade_: that joined-upness is something that could easily come apart AFAICS
[13:13] <rogpeppe> fwereade_: in the end, i think we really do want some integration tests here, even if we do some other checks too.
[13:13] <fwereade_> rogpeppe, function signature changes are generally spotted when things fail to compile
[13:13] <rogpeppe> fwereade_: i wasn't thinking of sig changes, but semantic changes
[13:14] <rogpeppe> fwereade_: in the end, we really do want to check that there's actually a given worker running that actually does the right stuff.
[13:14] <fwereade_> rogpeppe, hence my preference for configuring workers with a conf and a state directly
[13:14] <fwereade_> rogpeppe, well
[13:14] <fwereade_> rogpeppe, no
[13:15] <fwereade_> rogpeppe, we actually don't, quite often
[13:15] <fwereade_> rogpeppe, we want to check, like, *one* -- the simplest one with the fewest and fewest-reaching bizarre side effects
[13:16] <fwereade_> rogpeppe, each of the workers must indeed be independently tested
[13:16]  * rogpeppe tries to convince himself that that's sufficient
[13:17] <fwereade_> rogpeppe, and the mechanism for creating workers must itself also be tested
[13:17] <fwereade_> rogpeppe, there are more things in play, and they require more testing, but each of the mechanisms can be tested in isolation
[13:18] <fwereade_> rogpeppe, rather than carrying all the context for the N other attached mechanisms every time you want to test just one feature
[13:19] <rogpeppe> fwereade_: the difficulty i have is that working out whether this actually tests that it works is a bit like working out whether two halves of an inductive proof meet in the middle
[13:20] <rogpeppe> fwereade_: it's easy to *think* you're testing that the whole thing works, but actually you're not testing what you think. end-to-end tests avoid that issue.
[13:20] <rogpeppe> fwereade_: although i totally agree they're heavyweight
[13:21] <fwereade_> rogpeppe, but the bigger the test, the flakier, and the harder to fix, and the harder-still to fix correctly
[13:21] <fwereade_> rogpeppe, a few big tests are a necessary evil
[13:22] <fwereade_> rogpeppe, and a lot of small tests are a necessary good ;p
[13:23] <rogpeppe> fwereade_: the other p.o.v. is that we end up with tests so reliant on internal implementation details that we can't change things without rewriting the tests, which loses one big point of having the tests in the first place.
[13:24] <fwereade_> rogpeppe, lots of packages with a few small types each usually only come about when you've actually figured out the separation of responsibilities in the system pretty well
[13:25] <fwereade_> rogpeppe, yes, you're still vulnerable to semantic changes; the big tests *are* a necessary evil
[13:26] <fwereade_> rogpeppe, but if you can't write the small tests, your system is likely to be suboptimally factored ;)
[14:45] <m_3> fwereade_: hey, just read backchannel and had to do a double-take
[14:45] <fwereade_> m_3, the relation-get thing?
[14:46] <m_3> fwereade_: yeah, that needs to be cleared up
[14:46] <fwereade_> m_3, I maintain that it cannot be relied upon in -joined
[14:46] <m_3> fwereade_: it's just getting the service name
[14:47] <m_3> so it's more pseudo-code at that point in the docs
[14:47] <fwereade_> m_3, ah!
[14:47] <m_3> but needs to be rewritten to make that clear
[14:47] <fwereade_> m_3, ok, I am an idiot, I misunderstood completely
[14:47] <fwereade_> m_3, I thought it was getting an actual relation setting
[14:47] <m_3> i.e., "mysql creates a new db based on the related service's name"
[14:48] <fwereade_> m_3, so that'd just be derived from $JUJU_REMOTE_UNIT, I guess?
[14:48] <m_3> so I'll give nick a MP... that's an important point to clear up
[14:48] <fwereade_> m_3, cool, thanks
[14:49] <m_3> right...  want a way to describe that in pseudocode without bogging down in env
[14:49] <m_3> thanks for catching that
[15:32] <dimitern> fwereade_: woohoo!!! all the uniter tests pass with the api!!
[15:32] <natefinch> dimitern: awesome :)
[15:33] <fwereade_> dimitern, sweeeet!!
[15:33] <dimitern> natefinch: yep, these were some long 3 days of struggling
[15:33]  * fwereade_ flings confetti
[15:33] <fwereade_> dimitern, does it work in practice as well? ;p
[15:33] <dimitern> fwereade_: haven't tried yet
[15:33] <natefinch> dimitern: I feel your pain. Big changes are always really hard to get 100% corret
[15:34] <dimitern> fwereade_: what live testing should be sufficient?
[15:34]  * fwereade_ crosses many fingers
[15:34] <mgz> cross ALL the fingers
[15:35] <mgz> fwereade_: is your docs stuff nearly ready for review? I'm pretty keen to read it.
[15:35] <mgz> doh, I missed it, damn email filters
[15:35]  * mgz goes back and pours through
[15:35] <fwereade_> dimitern, how about checking whether a subordinate gets cleaned up properly in response to a destroy-unit of its princpal?
[15:36] <fwereade_> mgz, the conflicts are terrifying, everything htmly changed while I was doing it
[15:36] <fwereade_> mgz, but there should be some useful content
[15:36] <mgz> yeah, it's not a great format for version control currently, alas
[15:36] <fwereade_> mgz, I should also fix up the subordinates and implicit relations docs
[15:36] <dimitern> fwereade_: just that?
[15:37] <fwereade_> dimitern, it feels like a decently risky start
[15:37] <dimitern> fwereade_: ok, so I'll do 2 tests: classic wordpress + mysql stuff and another with subs (nrpe)
[15:37] <fwereade_> dimitern, cool
[15:38] <fwereade_> dimitern, maybe one specific one that deals with relation settings changing, and checking the caching stays sane
[15:39] <mgz> fwereade_: I'll branch and look at resolving while I read
[15:39] <mgz> will poke you to pull later
[15:39] <fwereade_> mgz, don't worry about that
[15:39] <fwereade_> mgz, evilnickveitch has said he knows what to do with it
[15:39] <mgz> I think a re-run of the template thing and some bzr commands should do it
[15:39] <fwereade_> mgz, he just announced a new way of creating pages
[15:40] <fwereade_> mgz, my first attempts in that direction were less fruitful than I had hoped they might be
[15:40] <mgz> yeah, saw that, was what reminded me about your docs
[15:40] <dimitern> fwereade_: luckily I already have that prepared from last time
[15:40] <fwereade_> dimitern, nice
[15:41] <evilnickveitch> mgz, fwereade_ sorry for spoiling everyone's day by making things easier :)
[15:42] <fwereade_> evilnickveitch, cheers dude ;)
[15:43] <mgz> evilnickveitch: yell if you need a hand resolving that branch
[15:47] <dimitern> fwereade_: but first this https://codereview.appspot.com/13324052
[15:49] <fwereade_> dimitern, LGTM, lovely small branch :)
[15:49] <dimitern> fwereade_: cheers :)
[15:51] <dimitern> fwereade_: just proposing the big branch as WIP for discussion first
[15:51] <dimitern> fwereade_: and to see how big it actually is
[15:51] <fwereade_> dimitern, cool, I have to head off and sign the contract in a few minutes
[15:52] <dimitern> fwereade_: ah, cool, good luck then :)
[15:52] <fwereade_> ...which means, jcastro, that I'm afraid I'll be missing the charm call again :(
[15:52] <dimitern> fwereade_: it's not that bad actually 2188 lines (+556/-285) https://codereview.appspot.com/13355046
[15:53] <jcastro> fwereade_: that's cool
[15:56] <dimitern> now on to live testing
[16:16] <TheMue> rogpeppe, dimitern: a small review https://codereview.appspot.com/13656044
[16:19] <rogpeppe> TheMue: reviewed
[16:21] <TheMue> rogpeppe: thx, though of that flag too but then decided to go the save way ;)
[16:21] <TheMue> thought
[16:24] <natefinch> dimitern, rogpeppe , mgz, TheMue, fwereade_: Anyone have an opinion on where to put the logrotate config file? is next to the log file acceptable, or should it go in the .juju folder, or somewhere else?
[16:24] <dimitern> natefinch: shouldn't it be in /etc/logrotate.d/ ?
[16:24] <mgz> in /etc somewhere I'd assume
[16:24] <TheMue> dimitern: +1
[16:25] <rogpeppe> natefinch: i think putting it in /var/log/juju would seem ok to me
[16:25] <rogpeppe> natefinch: but /var/lib/juju would be ok too
[16:25] <dimitern> rogpeppe: why there?
[16:25] <rogpeppe> natefinch: but if there's some other standard, it might be best to use that
[16:25] <dimitern> rogpeppe: there is - /etc/logrotate.d/ is the usual place
[16:25] <rogpeppe> dimitern: just to limit the amount of config we spray around the system
[16:25] <rogpeppe> dimitern: ok, fair enough
[16:26] <dimitern> rogpeppe: hmm.. well, I suppose we can put it in /var/lib/juju/, but logrotated should be notified somehow to search it there
[16:26] <natefinch> I wish linux man files would just say that
[16:27] <rogpeppe> dimitern: /etc/logrotate.d sounds fine if that's standard
[16:27] <dimitern> rogpeppe: at least that's where I put logrotate conf files before on ubuntu and it always worked
[16:32] <natefinch> dimitern: it looks like there are several in there, so definitely seems like a standard
[16:34] <natefinch> anyone have opinions on rotation poiicy?
[16:40] <mgz> natefinch: policy is the sort of thing where you just have to pick an option, then review it later if needed I think
[16:41] <mgz> daily seems fine
[16:41] <natefinch> mgz: that's fine.  I was thinking of something like ,roll at 50 megs, keep 4 backups, compress all but the most recent backup
[16:41] <natefinch> mgz: hmm.. you think time is better than size?
[16:41] <mgz> not really, just what I'm used to
[16:42] <natefinch> mgz: pros and cons to both I guess
[16:43] <rogpeppe> anyone else seen this error when testing state? ... value *errors.errorString = &errors.errorString{s:"cannot create log collection: read tcp 127.0.0.1:54392: i/o timeout"} ("cannot create log collection: read tcp 127.0.0.1:54392: i/o timeout")
[16:43] <mgz> hm, no, new one to me
[16:44] <rogpeppe> mgz: when i run the tests individually, they pass
[16:44] <rogpeppe> mgz: but i'm seeing that issue consistently currently
[16:45] <mgz> I;m mostly running just one module tests at the moment, which doesnt help noticing those kinds of issues...
[16:45] <rogpeppe> mgz: it's worth running whole-suite tests too, at least once a day, i reckon
[16:46] <natefinch> mgz: this sounds promising, minsize, used with daily, means "roll over daily, but only if the log is at least N bytes"  It doesn't stop you from getting 2 gigs of logs in a day, but it means you won't end up with 5 logs of 2 lines each
[16:46] <mgz> natefinch: that does sound good
[16:47] <rogpeppe> mgz: ah! i know the problem. i think it must be reason jam rolled back the mongo version
[16:48] <dimitern> rogpeppe: there's something wrong with worker/runner
[16:48] <rogpeppe> dimitern: in trunk?
[16:48] <dimitern> rogpeppe: yes
[16:49] <rogpeppe> dimitern: hmm, a recent change?
[16:49] <dimitern> rogpeppe: it seems it restarts workers even after a fatal error in some cases
[16:49] <rogpeppe> dimitern: oh really? have you got a way of reproducing the behaviour?
[16:50] <dimitern> rogpeppe: still looking - so far I can only reproduce it once I migrated the uniter to the api and it happens in TestWithDeadUnit
[16:51] <dimitern> rogpeppe: the first time Login succeeds, then we return ErrTerminateAgent because the entity is dead, that gets the task killed with "fatal", but after that it's immediately restarted
[16:51] <rogpeppe> dimitern: i can see a way that it can happen, but only a very small time window, and i'm not sure that's the issue you're seeing
[16:52] <rogpeppe> dimitern: can you paste a log from when it happened?
[16:53] <dimitern> rogpeppe: http://paste.ubuntu.com/6093304/ here's a snippet
[16:53] <dimitern> rogpeppe: as you can see the first time it's ok, then it gets into a loop restarting it
[16:55] <rogpeppe> dimitern: ah! i think i see what might be the problem.
[16:55] <dimitern> rogpeppe: oh?
[16:55] <rogpeppe> dimitern: i don't *think* it's a problem in worker/runner, although, hmm
[16:56] <dimitern> rogpeppe: perhaps it's in the common agent code
[16:56] <dimitern> rogpeppe: but can't figure out what
[16:56] <rogpeppe> dimitern: oh, this is the unit agent, isn't it?
[16:56] <dimitern> rogpeppe: yeah
[16:58] <rogpeppe> dimitern: that scuppers that thought. thinking again.
[17:00] <rogpeppe> dimitern: the weird thing is line 22 of that log
[17:00] <rogpeppe> dimitern: why is the unit agent being restarted?
[17:01] <dimitern> rogpeppe: exactly my question
[17:01] <rogpeppe> dimitern: i mean the unit agent itself, not the uniter worker
[17:01] <rogpeppe> dimitern: that's nothing to do with worker.Runner
[17:02] <dimitern> rogpeppe: ah, ha!
[17:03] <rogpeppe> dimitern: BTW I think openAPIState should return ErrTerminateAgent if it gets a permission-denied error
[17:03] <rogpeppe> dimitern: i think if you fix that, this problem might go away
[17:03] <dimitern> rogpeppe: I was thinking the same
[17:11] <rogpeppe> dimitern: which actual test was running in the log you posted?
[17:11] <rogpeppe> dimitern: let me guess - it was TestWithDeadUnit, right?
[17:12] <rogpeppe> dimitern: if so, everything's working as expected, except the permission-denied problem
[17:12] <dimitern> rogpeppe: yep
[17:13] <dimitern> rogpeppe: still can't make it exit, even after returning errTerminateAgent on CodeUnauthorized
[17:13] <rogpeppe> dimitern: hmm. could you paste the (complete) log again?
[17:14] <rogpeppe> dimitern: (of running just TestWithDeadUnit)
[17:14] <dimitern> rogpeppe: one moment
[17:14] <jam> rogpeppe: the "timeout" test failure you saw was, indeed, why I rolled back to rev 240 on the bot
[17:15] <rogpeppe> jam: yeah, tests passed again when i reverted to that rev
[17:15] <dimitern> rogpeppe: does this look ok http://paste.ubuntu.com/6093367/
[17:15] <dimitern> rogpeppe: that's inside agent/openAPIState now
[17:15] <rogpeppe> dimitern: doesn't look quite right
[17:15] <dimitern> rogpeppe: and still I get *exactly* the same log output
[17:15] <dimitern> rogpeppe: why?
[17:15] <rogpeppe> dimitern: don't you want to return ErrTerminateAgent on not-found?
[17:16] <rogpeppe> dimitern: are you thinking you've got a C-style switch statement?
[17:16] <dimitern> rogpeppe: oh..
[17:16] <rogpeppe> dimitern: i think you want a ","
[17:16] <rogpeppe> dimitern: or just an if statement...
[17:18] <dimitern> rogpeppe: changed to an if
[17:18] <dimitern> rogpeppe: and still the same result - here's the complete log http://paste.ubuntu.com/6093388/
[17:21] <rogpeppe> dimitern: what does your openAPIState function look like now?
[17:22] <dimitern> rogpeppe: http://paste.ubuntu.com/6093402/
[17:22] <rogpeppe> dimitern: ah, i see the problem
[17:23] <dimitern> rogpeppe: good! where it is?
[17:23] <rogpeppe> dimitern: the OpenAPI call is failing, not the Entity call
[17:23] <rogpeppe> dimitern: you need to do a similar thing for the error result of agentConfig.OpenAPI
[17:23] <rogpeppe> dimitern: it never gets as far as calling Agent().Entity()
[17:24] <dimitern> rogpeppe: I see
[17:31] <dimitern> rogpeppe: sweet! so it looks like this now and it passes: http://paste.ubuntu.com/6093428/
[17:32] <rogpeppe> dimitern: cool!
[17:33] <dimitern> rogpeppe: and due to that change now tests pass slightly faster :)
[17:38] <natefinch> man, these cloudinit tests are gnarly
[17:38] <dimitern> natefinch: everybody hates them :)
[17:38] <natefinch> dimitern: well, glad I'm in good company at least
[17:39] <rogpeppe> natefinch: they're better than they were :-)
[17:39] <natefinch> rogpeppe: that's scary :)
[17:39] <rogpeppe> natefinch: if you can think of a better way, feel free :-)
[17:40] <natefinch> rogpeppe: I knew you'd say that :)  Not saying I know a better way.... just... gnarly :)
[17:41] <rogpeppe> natefinch: the original tests just probed random bits of shell script. at least here we get to vet the shell script when it changes
[17:41] <rogpeppe> natefinch: (i agree BTW)
[17:41] <rogpeppe> natefinch: (even though i am responsible for them...)
[17:41] <rogpeppe> dimitern: can the Entity call ever return NotFound?
[17:42] <dimitern> rogpeppe: i think not
[17:42] <natefinch> rogpeppe: seems like, if we're going to test it as one giant script, why not just write it as one giant script?  Might be more clear that way.
[17:44] <rogpeppe> natefinch: and just test the entire cloudinit output in each test?
[17:46] <rogpeppe> dimitern: i'm not sure about the shouldTerminate helper function. i wonder if openAPIState is a bit clearer something like this: http://paste.ubuntu.com/6093489/
[17:47] <natefinch> rogpeppe: so, I'm just basically looking at expectScripts.... and... well, it seems like it's testing that we're calling the code we expect to call, not that the result of the call is what we expect.  Like we test that mkdir -p '/var/lib/juju/agents/machine-0'  is in the scripts, but we don't test that /var/lib/juju/agents/machine-0 exists.
[17:47] <rogpeppe> natefinch: how can we check that?
[17:47] <rogpeppe> natefinch: (without actually running the scripts, which is problematic)
[17:48] <rogpeppe> natefinch: if it was trivial and cheap to spin up an LXC environment, we might do that in the tests, but i don't see a good alternative otherwise
[17:49] <rogpeppe> natefinch: i would *love* to be able to test that those scripts worked without actually testing them live
[17:49] <natefinch> rogpeppe: maybe we need a separate suite marked as slow tests that actually does spin up an LXC container
[17:52] <dimitern> rogpeppe: lgtm, will change as you suggested
[17:52] <natefinch> rogpeppe: it might also be easier to test if the script and the inputs to the script were separated. So, like, have the script as a template, and then fill it in with the values based on the environment, similar to the way it is now... but that way you could test that the values are correctly derived from the environment, independently of testing the script itself.
[17:52] <natefinch> rogpeppe: er, that is, similar to the way it is in the tests
[17:53] <rogpeppe> natefinch: script-as-template is perhaps an interesting idea, but i fear it would be even harder to maintain
[17:53] <rogpeppe> natefinch: currently at least you can pretty much paste the output into the tests
[17:57] <natefinch> rogpeppe: yeah, that's true
[17:59]  * rogpeppe has reached eod
[18:00] <rogpeppe> g'night all
[18:00] <natefinch> night!
[18:03] <TheMue> night
[18:05]  * TheMue will step out too
[18:05] <TheMue> bye
[20:28] <thumper> fwereade_: around per chance?
[20:45] <thumper> natefinch: hey there
[20:45] <natefinch> thumper: howdy
[20:45] <thumper> natefinch: that branch that just merged seemed to have more than the comment mentinoed
[20:46] <natefinch> thumper: the windows one?
[20:46] <thumper> yeah
[20:46] <thumper> I see logrotate in it
[20:46] <natefinch> thumper: crap, I thought I'd backed that out... I accidentally committed that code to the wrong branch
[20:47] <thumper> natefinch: how about you take a look at the last revision
[20:47] <thumper> and we can do a post merge review if necessary
[20:47] <thumper> let me know what else is there that shouldn't be
[20:47] <thumper> if it is too much, we can revert
[20:47] <thumper> but I'd prefer not to
[20:47] <natefinch> thumper: I think that should be it, but I'll double check
[20:47] <thumper> kk
[20:50] <natefinch> thumper: yeah, just the logrotate stuff... luckily not very many lines of code
[20:51] <thumper> had it been reviewed?
[20:52] <natefinch> thumper: no :/
[20:52]  * thumper takes a look
[20:52] <natefinch> thumper: evidently i misunderstood how bzr uncommit works.... and then foolishly didn't think to double check that it did what I expected
[20:53] <thumper> ah, uncommit doesn't remove the change
[20:53] <thumper> just removes the commit
[20:53] <thumper> the code stays there
[20:53] <thumper> to kill it you need to:
[20:53] <thumper> bzr uncommit && bzr revert
[20:54] <natefinch> thumper: hmm... though I did that, but obviously missed a step.
[20:55] <thumper> natefinch: well you get a +1 from me on the logrotate stuff, assuming it works :)
[20:56] <natefinch> thumper: I double checked the logrotate stuff by actually running it with actual files.  I almost wrote a test explicitly to do that, but it feels more like testing logrotate than testing our code
[20:57] <natefinch> thumper: especially since the configuration is so simple
[21:09] <natefinch> thumper:   EOD for me.  Thanks for notifying me about that, btw.
[23:06] <bigjools> morning all
[23:14]  * thumper headdesks
[23:19] <fwereade_> thumper, hey, around briefly
[23:20] <thumper> fwereade_: hey
[23:20] <thumper> fwereade_: nothing urgent, just hadn't talked in a while
[23:20] <thumper> I keep finding shit not done when I thought it was
[23:20] <thumper> makes me sad
[23:20] <thumper> worse when it is my own TODO
[23:21] <fwereade_> thumper, likewise :(
[23:21] <fwereade_> thumper, I am largely spared that by virtue of writing little code
[23:21] <thumper> heh
[23:21] <fwereade_> thumper, dimitern's got the uniter api working live, though
[23:21] <thumper> we can catch up later, I'm well aware of how late it is there
[23:21] <thumper> cool
[23:23] <thumper> wallyworld: ping
[23:23] <fwereade_> thumper, yeah, I might go to bed in a mo
[23:23] <wallyworld> yo
[23:23] <thumper> wallyworld: I need another set of eyes on something
[23:23] <fwereade_> thumper, I just have a vague recollection I told some people I'd pass by tonight
[23:23] <thumper> wallyworld: jam was reviewing about a week ago, but has left it
[23:23] <wallyworld> ok
[23:23] <thumper> wallyworld: and it is rapidly becoming a blocker
[23:24] <thumper> fwereade_: it is the 1.16 format branch
[23:24] <thumper> oh ffs, where did it go
[23:24] <fwereade_> thumper, ok, I thought I posted some vague questions on that a while ago
[23:25] <fwereade_> thumper, I thought I checked it today and saw no movement
[23:25] <thumper> I didn't realise there were outstanding questions
[23:26] <fwereade_> thumper, let me look again, perhaps I have been hallucinating
[23:26] <thumper> ah...
[23:26] <thumper> there were two reviews
[23:26]  * thumper will look at this
[23:27] <fwereade_> thumper, I did https://codereview.appspot.com/13481043/ and jam did the previous
[23:28]  * thumper nods
[23:28] <thumper> I'll respond today
[23:30] <wallyworld> thumper: did you need me to look at something?
[23:31] <thumper> wallyworld: not any more
[23:31] <thumper> but thanks
[23:31] <wallyworld> \o/
[23:43] <thumper> fwereade_: FWIW, I have a reasonably reasonable answer formulating in my head, will write it down after the gym
[23:43] <thumper> as opposed to a reasonably unreasonable answer