/srv/irclogs.ubuntu.com/2012/04/26/#juju-dev.txt

=== flaviamissi_ is now known as flaviamissi
wrtpfwereade: mornin'08:04
fwereadewrtp, heyhey08:04
wrtp  fwereade: my ping last night BTW was to let you know that i'd found an old branch that actually made some of the juju commands work, in case you were about to work on something similar.08:13
wrtpfwereade: it's funny though, i dusted off the branch, split off a part of it that was logically separate and proposed that, then proposed the original again, and only *then* did i discover i'd proposed it before and even had a LGTM!08:14
fwereadewrtp, yeah, it was nagging at my mind, I *thought* you'd done something like that :)08:15
wrtpfwereade: yeah, exactly. i looked at cmd/bootstrap and thought "i thought this was working now", then i found the branch and thought i'd never got around to proposing it.08:16
wrtpfwereade: there was quite a bit of code that i'd totally forgotten about08:16
fwereadewrtp, heh, ouch :)08:17
wrtpfwereade: it's fine. nobody's written anything similar in parallel, and the tests are *almost* passing.08:18
wrtpfwereade: it's quite nice actually.08:18
fwereadewrtp, awesome :)08:20
fwereadewrtp, the Init change will hit one of us soon but it shouldn't be a bother08:21
fwereadewrtp, oo, cath has made breakfast, bbs :)08:21
wrtpfwereade: is there another Init change in the offing?08:21
wrtpfwereade: enjoy!08:21
wrtphey Daviey08:21
fwereadewrtp, oh, yeah, Init went in already; sorry, confused :)08:30
fwereadewrtp, (mmm, maltese bread :))08:30
* wrtp has no idea what maltese bread might be like, but thinks he should have some breakfast because his mouth is watering.08:31
wrtp(mmm, Sainsbury's muesli :-))08:32
wrtpTheMue: hiya08:32
TheMuewrtp: moin, just came back from workout08:33
TheMuewrtp: … and a discussion with my daughter that a fresh setup of a computer keeping software and data is more than a five minute job08:34
* TheMue laughs08:34
wrtpTheMue: what, you mean you can't just do "juju add-unit ms-windows --constraint machine=daughters-computer ? :-)08:38
wrtpfwereade: what *is* maltese bread like, BTW?08:40
TheMuewrtp: Hehe, no. And even no "osx" (she's got an Apple). OK, installing the OS is done quickly, but a backup of her data as reinstallation of her software later.08:40
TheMueBtw, anyone already upgraded to 12.04?08:41
fwereadewrtp, crusty on the outside, awesomely soft and springy on the inside, nice taste that I don't really have the vocabulary to describe; works really *really* well with tomatoes, capers, maybe basil, little bit of oil08:42
* fwereade is hungry again08:42
wrtpTheMue: not I08:42
fwereadeTheMue, yeah, haven't got around to it yet08:43
wrtpfwereade: white or brown?08:43
fwereadewrtp, white08:43
TheMuewrtp, fwereade: Will also wait a few days until upgrade.08:44
TheMuefwereade: Hey, I'm trying to loose some weight. Please don't write about delicous food here. ;)08:45
* fwereade resists the urge08:46
* TheMue once again listens to Porcupine Tree and is happy about such a great music08:47
fwereadewrtp, btw, you remember we had a discussion about cmd/jujuc/server and tomb the other day09:17
wrtpfwereade: i do09:17
wrtpfwereade: i suggested not using tomb in that case if i remember rightly09:18
fwereadewrtp, I must say I keep wanting to use tomb when I look at it -- for example, as it is I think it will be tricky to implement both Close and Wait nicely09:18
wrtpfwereade: does it need a Wait?09:19
fwereadewrtp, perhaps not yet; but without one, error discovery is deferred until you want to close the server anyway09:19
fwereadewrtp, and that feels like it could be a problem09:19
wrtpfwereade: i see09:20
wrtpfwereade: depends whether something might want to wait for an error and start a new server or something09:20
wrtpfwereade: but to be honest, when are you ever going to get an error here? accept is never going to fail in reality.09:21
fwereadewrtp, I don't know... but I'm not very comfortable just dropping errors on the floor like that: just because I can't imagine the error doesn't mean it won't happen ;p09:22
wrtpfwereade: can you paste the code again so i can remember it a bit better?09:23
fwereadewrtp, http://paste.ubuntu.com/947032/09:23
wrtpfwereade: are you ever going to implement any other methods on Server? (other than Wait)09:25
wrtpfwereade: cos i have a suggeston09:25
wrtpiom09:25
fwereadewrtp, I don;t think so09:25
wrtpion09:25
fwereadewrtp, go on09:26
wrtpfwereade: why not remove the server type, and replace with a function: RunServer(...) error09:26
wrtpah, no09:26
fwereadewrtp, I *think* I need both wait and close09:27
wrtpwell, why not09:27
wrtpfwereade: when are you going to want to shut down the server?09:27
wrtpfwereade: won't it always run forever?09:27
fwereadewrtp, as part of an orderly shutdown in preparation for a code upgrade, for example09:27
wrtpfwereade: if we're doing that, won't we be exiting the whole program anyway?09:28
wrtpfwereade: alternatively...09:29
wrtpfwereade: don't start the server on NewServer - just return the server object. then implement Server.Run which blocks when called.09:31
fwereadewrtp, ah, that sounds like it could work09:31
wrtpfwereade: similar to rpc.Server.ServeConn09:31
fwereadewrtp, I'll try that, ty :)09:32
wrtpfwereade: np09:32
wrtpfwereade, TheMue: https://codereview.appspot.com/6120052/11:34
TheMue*click*11:34
wrtpyou have reviewed it before, but it has changed a certain amount11:34
fwereadewrtp, I can't decide whether I like the bootstrap Init12:00
wrtpfwereade: you mean that it initialises the Conn rather than just the env name?12:01
fwereadewrtp, it kinda feels as though an error in juju.NewConn would be better reported to the user with os.Exit(1) rather than (2)12:01
fwereadewrtp, which is the observable distinction between Init and Run errors12:01
wrtpfwereade: it means we can uniformly test that all commands open their environment correctly12:01
wrtpfwereade: although perhaps there's another better way of doing that that i haven't thought of12:02
fwereadewrtp, I don't see how that follows -- the code is duplicated in the Inits of Bootstrap and Destroy, so where we happen to test it is a matter of choice12:03
fwereadewrtp, now I think of it, what we did with Log could quite easily work with other chunks of common command functionality12:04
wrtpfwereade: ah, now yer talkin12:04
fwereadewrtp, I think it'd work out really quite nicely :)12:05
wrtpfwereade: consider it done12:05
fwereadewrtp, cool12:05
fwereadewrtp, I'll leave a comment for form's sake, I haven't finished looking through it yet12:05
wrtpfwereade: are the final Log changes submitted yet?12:05
fwereadewrtp, afraid not, you'll have to look at the CL for the latest12:06
wrtpfwereade: k12:06
fwereadewrtp, hoping that this morning's modifications will pass muster :)12:06
wrtpfwereade: i'm not sure that that approach entirely solves the problem. it looks to me like we'll still need to test the environment behaviour of every command.12:24
wrtpfwereade: for instance, here's what bootstrap might look like: http://paste.ubuntu.com/947216/12:24
wrtpfwereade: although, i suppose that if we test at least one working example, we can infer the fact  that the command has the correct c.env.open call, and hence testing the env name after Init is sufficient.12:26
fwereadewrtp, I think that's a good boundary, yeah12:26
wrtpfwereade: yeah, i think i'll do that.12:27
fwereadewrtp, other comments delivered btw12:29
wrtpfwereade: tyvm12:30
niemeyerHello!12:57
wrtpniemeyer: yo!12:59
TheMueniemeyer: moin13:05
wrtpfwereade: PTAL13:12
wrtpniemeyer: https://codereview.appspot.com/612005213:12
fwereadeniemeyer, heyhey13:12
niemeyerfwereade: https://codereview.appspot.com/6115048/ reviewed13:14
fwereadeniemeyer, tyvm13:14
niemeyerfwereade: My pleasure13:14
fwereadeniemeyer, ah, I think I missed the import of what you said before13:15
niemeyerwrtp: Ohhh, tasty13:15
niemeyerfwereade: You mean re. public/private?13:15
fwereadeniemeyer, Help should probably be public if for no other reason than directness of testing13:15
niemeyerfwereade: Yeah, it looks like a nice piece for the API13:15
fwereadeniemeyer, there's a followup that covers that but it's WIP until the parent pipeline settles down13:16
niemeyerfwereade: That's ok13:16
wrtpniemeyer: you reviewed it before some time ago, and i forgot about it, found the old branch, dusted it off, split it, and only when i re-proposed did i find the old thread!13:16
niemeyerwrtp: Hah :-)13:16
niemeyerwrtp: Nice to see this going along the cool improvements by fwereade in the last few days13:17
fwereadeniemeyer, I feel that "ERROR:" beats "error:" in practice merely because it's often followed up with "usage:", etc, and it makes it stand out much better13:17
niemeyerwrtp: Should we do a gigantic s/Environ/Env/ replacement?13:18
wrtpfwereade: the Init/Run distinction works well. i don't know quite why we didn't go with that originally. maybe because we didn't think of the trick of passing in FlagSet13:18
niemeyerand s/environs/envs/ etc13:18
wrtpniemeyer: i like Environ13:18
wrtpniemeyer: but i'd prefer "environ" as the package name13:18
niemeyerwrtp: I see we often pick one or the other arbitrarily13:18
fwereadewrtp, indeed, it would be interesting to go spelunking through its very early history in my copious free time ;)13:18
wrtpfwereade: yeah, there was a long discussion AFAIR13:19
niemeyerThat's of course not too important, and if there's no agreement let's move on13:19
wrtpniemeyer: i realised that unnecessary plurals don't help anything. hence my "environs->environ" suggestion.13:20
wrtpniemeyer: but i'm much less keen on abbreviations than i used to be :-)13:20
niemeyerwrtp: I'd take "env" as a tradeoff ;-)13:21
wrtpniemeyer: i'll think about it13:22
niemeyerwrtp: FWIW, we had "environs" to free the "environ" name for variables, if I'm not mistaken13:23
niemeyerI may be wrong, though13:23
wrtpniemeyer: maybe. though we usually use "e" or "env" (a good reason not to rename the package, perhaps)13:23
TheMueniemeyer: Just for info, https://codereview.appspot.com/6111053/ has the changes after the review in and https://codereview.appspot.com/6118055/ is a new one I would like to see in trunk before moving the watchers.13:24
niemeyerwrtp: Or a good reason to have it as juju/envs13:25
niemeyerwrtp: same as strings, bytes, ..13:25
niemeyerTheMue: Cool, thanks13:25
wrtpniemeyer: i don't feel like i type it that often, or that it's an eyesore when i do.13:26
niemeyerwrtp: "that"?13:26
wrtpniemeyer: although i'm still thinking :-)13:26
wrtpniemeyer: "environ"13:26
wrtpniemeyer: "Environ"13:26
niemeyerwrtp: Ah, .. it's more that we can't agree on the proper way to abbreviate it13:26
niemeyerwrtp: Not that I dislike it per se13:27
wrtpniemeyer: true.13:27
niemeyerwrtp: Your branch has EnvName13:27
wrtpniemeyer: ah!13:27
wrtpniemeyer: now i see where you're coming from!13:27
niemeyerwrtp: It's not the only place.. it just reminded me of the issue13:27
wrtpniemeyer: hmm, you're right: http://paste.ubuntu.com/947322/13:28
niemeyerwrtp: I'm pretty sure I had reviewed that branch before, but my comments are not there.. was there a different thread in place already?13:28
wrtpniemeyer: look at the first message in the thread13:28
wrtpniemeyer: i had to make a new CL because i changed the dependency13:28
niemeyerOMG13:29
niemeyerI can see that :-)13:29
niemeyerwrtp: I reminded of it because I still feel the same way about the tests13:29
wrtpniemeyer: all of them? i think there's enough commonality to justify tables, but perhaps only because i anticipate very similar tests for other subcommands.13:30
niemeyerwrtp: cmd_test.go13:30
wrtpniemeyer: there are two table-driven tests there.13:31
niemeyerwrtp: It feels over the top.. I'm tempted to reduce them to straightforward checks to see how it'd look13:31
wrtpniemeyer: the first one really will be identical for every command that takes a --environment flag13:31
niemeyerwrtp: Maybe I'm just missing how complex it is, but the amount of exceptions and reflection on these tests makes me feel like it's being unnaturally forced onto a table13:31
wrtpniemeyer: i don't see any exceptions in the EnvironmentInit tests, or reflection in the Commands tests.13:32
wrtpniemeyer: your argument is stronger for TestCommands, i think13:34
niemeyerif t.initErr != "" {; if t.runErr != "" {; com := testInit(c, t.cmd, t.args, t.initErr); etc13:34
wrtpniemeyer: i could easily factor out the command test thing into a function.13:34
niemeyerwrtp: This is also extremely simplistic:                 ops: envOps("peckham", dummy.OpBootstrap),13:35
wrtpniemeyer: say runCommand(c *C, com Command, args ...string) (initErr, runErr error, ops []dummy.Operation)13:35
niemeyerwrtp: This only works for cases where it's calling a simple method without any expectations about it13:35
niemeyerwrtp: It's mocking on its best.. tying implementation shape to the tests13:36
wrtpniemeyer: that's perhaps true13:36
wrtpniemeyer: i'll try refactoring it. i stick to my guns on TestEnvironmentInit though.13:36
niemeyerwrtp: This one is not so bad, but I'd change it to have a list of factories rather than a list of commands13:37
niemeyerwrtp: So that the magic copying can go away13:37
wrtpniemeyer: ok13:37
niemeyerwrtp: That's the only comment really.. everything else is great13:41
wrtpniemeyer: it doesn't get rid of reflection entirely BTW13:41
wrtpniemeyer: thanks13:41
andrewsmedinaniemeyer, wrtp morning13:43
wrtpandrewsmedina: hiya13:43
andrewsmedinawrtp: are you ok?13:44
wrtpandrewsmedina: fine thanks. and you?13:44
andrewsmedinawrtp: when you have time, please take a look https://codereview.appspot.com/6099051/13:45
andrewsmedinawrtp: im ok13:45
wrtpandrewsmedina: yes i will. thanks for the reminder.13:45
andrewsmedinawrtp: thanks13:48
wrtpandrewsmedina: one question: do you need to be root to run those tests?14:05
wrtpandrewsmedina: also i'm slightly concerned that running the tests might have undesirable side effects (but i'm not familiar with virsh - perhaps there are none)14:09
andrewsmedinawrtp: not. the user that will run the tests need access to libvirt14:10
wrtpandrewsmedina: and side effects?14:10
andrewsmedinawrtp: not14:10
andrewsmedinawrtp: i created and drestoy a dummy net14:11
wrtpandrewsmedina: i don't see anywhere in the tests that the net is destroyed14:12
=== nijaba is now known as nijaba_tab
=== nijaba_tab is now known as nijaba
andrewsmedinawrtp: in the other tests I'm using the default libvirt net14:14
wrtpandrewsmedina: sorry, i don't know anything about libvirt. what's the default libvirt net?14:15
wrtpandrewsmedina: is it something the user might be using anyway?14:15
niemeyerfwereade: https://codereview.appspot.com/6123049/ done14:16
fwereadeniemeyer, tyvm14:17
andrewsmedinawrtp: I'll be more careful in the tests and create a flag for those who have not installed virsh14:17
andrewsmedinawrtp: he may be using the network default but I do not modify it in the tests14:18
wrtpandrewsmedina: isn't starting it a modification?14:18
fwereadeniemeyer, nice suggestion, ty14:18
niemeyerfwereade: Glad you like it14:19
andrewsmedinawrtp: the start verify if the net is already started14:19
niemeyerfwereade: I pondered about the forcing upgrade as well, btw14:19
wrtpandrewsmedina: what if it's not already started?14:19
niemeyerfwereade: I didn't bother too much because it's mimicking what's in Py today14:20
fwereadeniemeyer, oh, ok14:20
niemeyerfwereade: I'm happy to splat the state if we have --force, but I don't think the opposite is sensible14:20
niemeyerfwereade: IOW, if somebody does "upgrade --force", and then "upgrade", the second shouldn't drop the --force state14:21
fwereadeniemeyer, ah, I thought it... kinda dumb to do so, but not intrinsically *bad*14:21
TheMueniemeyer, fwereade: I found it in the Py code, that a change isn't allowed.14:22
fwereadeniemeyer, I don't really feel that it should be an error, even so14:22
fwereadeniemeyer, it may silently refuse to downgrade from --force to not14:22
niemeyerfwereade: I think it's actually bad because doing an upgrade at all is generally forbidden unless the unit is running fine14:22
niemeyerfwereade: The first succeeds because of the --force, and the second succeeds because of the first14:22
andrewsmedinawrtp: a network should be active, inactive or does not exists14:23
niemeyerfwereade: So, in a way, the second would only happen at all because there's a --force in place..14:23
fwereadeniemeyer, hmm, ok14:23
andrewsmedinawrtp: if it's active, it's started14:23
niemeyerfwereade: That's why, in that situation, I'd rather see "hey, already doing it, hold on" rather than "sure!"14:23
wrtpandrewsmedina: by running this test, the current status is changed. i don't think tests should have side-effects.14:23
andrewsmedinawrtp: in your machine?14:24
wrtpandrewsmedina: that's right14:24
niemeyerTheMue: Are you with us14:24
niemeyer?14:24
niemeyerTheMue: The summary is:14:24
wrtpandrewsmedina: it's ok if it has side-effects that are cleaned up afterwards14:24
niemeyerTheMue: upgrade + upgrade == fine14:24
niemeyerTheMue: upgrade + force-upgrade == fine14:24
andrewsmedinawrtp: yes14:25
niemeyerTheMue: force-upgrade + force-upgrade == fine14:25
niemeyerTheMue: force-upgrade + upgrade == NOT fine14:25
andrewsmedinawrtp: I will use a testdummy net in tests for start method ok?14:25
wrtpandrewsmedina: but anyone should be able to run go test launchpad.net/juju/go/... and be happy that it won't interfere with anything on their machine14:25
niemeyerTheMue: Well.. or maybe, fine as well14:25
niemeyerfwereade: We could actually make it fine, by saying that the --force continues in place in that situation14:25
TheMueniemeyer: Hmm, sadly don't know enough about the upgrade mechanism in total.14:26
wrtpandrewsmedina: you should make sure to delete the net afterwards too (perhaps by defining TearDownSuite)14:26
fwereadeniemeyer, yeah, that seemed nicer to me14:26
andrewsmedinawrtp: you are "+1" for virsh flag or I shoud reuse the lxc flag?14:26
andrewsmedinawrtp: I'm doing it for other tests14:26
wrtpandrewsmedina: i don't understand14:26
fwereadeniemeyer, you're not allowed to, er, downgrade your upgrade ;)14:26
niemeyerTheMue, fwereade: Ok, so what about this.. let's just move on with what's there given that it mimics what exists today.. we can improve it later14:26
niemeyerfwereade: We can then implement that nicer behavior on a follow up14:26
TheMueniemeyer: Sounds ok.14:27
fwereadeniemeyer, TheMue: yep, I'm fine with that14:27
niemeyerTheMue: Cool14:27
wrtpandrewsmedina: what flag are you referring to?14:28
* TheMue sadly forgot why he added (TODO) to the comment. 14:28
TheMueI'm getting old.14:28
andrewsmedinawrtp: a "--virsh" flag14:28
andrewsmedinaops14:28
niemeyerTheMue: So you just need to observe the last of fwereade's point to see how to get to some agreement14:28
andrewsmedinawrtp: a "-virsh" flag14:29
wrtpandrewsmedina: it depends whether you think you can implement the tests without affecting the user's environment14:29
wrtpandrewsmedina: if you don't, i think it would be a good idea to implement some tests that can be run without running virsh, even if they don't verify all the functionality14:30
andrewsmedinawrtp: how I mock the virsh commands?14:30
wrtpandrewsmedina: you could set $PATH14:31
andrewsmedinawrtp: I dont undertand14:31
wrtpandrewsmedina: have a look at state/ssh_test.go14:31
wrtpandrewsmedina: it uses that technique14:31
andrewsmedinawrtp: brb14:32
wrtpandrewsmedina: ok14:32
TheMuefwereade: For the watchers which run concurrently I would like to keep those changes in the background (see the other watchers). Direct write/read tests are already done in state_test.go.14:32
fwereadeTheMue, I don't see how it's a benefit to run the test code concurrently when you don't have to14:37
fwereadeTheMue, the change goes through ZK just the same either way, and if you skip the concurrency you can eliminate both waiting and the (admittedly unlikely) potential event coalescing14:39
TheMuefwereade: How would you build this as a table driven test?14:40
andrewsmedinawrtp: im back :D14:40
fwereadeTheMue, I'm not sure it favours a table-driven style so much as it does a plain old procedural style14:41
TheMuefwereade: niemeyer and wrtp convinced me about the elegant way of doing it table-driven. And I've got to admit, I now like this way. It's clean.14:42
fwereadeTheMue, heh, has it changed already?14:42
fwereadeTheMue, still don't feel it's a good fit tbh, but perhaps it'll grow on me14:43
TheMuefwereade: What has changed? I had changed other watcher tests to be table-driven today.14:43
TheMuefwereade: All now work the same way, also the new PortsWatcher test.14:44
fwereadeTheMue, sorry, I'm just unclear on a largely irrelevant point: whether or not the watcher tests were originally more procedural14:45
TheMuefwereade: I've started them in a more mixed way, asynchronous changes and a procedural testing of the obtained values.14:46
TheMuefwereade: And here it would habe been more simple to move the changes between the tests.14:47
fwereadeTheMue, it's the asynchronicity that I feel is the problem anyway, not the table-drivenness14:47
fwereadeTheMue, what behaviour does it exercise that a synchronous test wouldn't?14:48
TheMuefwereade: Yes, that's why I asked you if you've got a good idea on integrate the changes int the table too.14:48
TheMuefwereade: I've got no problem in convert it to be synchronous (but in a different branch, all watchers, after moving). But I would like to keep it table-driven.14:50
fwereadeTheMue, `func() { unit.OpenPort("tcp", 80)}` ?14:50
andrewsmedinawrtp: I will create the mock for virsh like your ssh tests, ok?14:50
wrtpandrewsmedina: you've got a review14:50
TheMuefwereade: OK, so the table has to be an anonymous struct to contain test func and expected result, but yous, looks ok to me.14:51
fwereadeTheMue, cool14:52
wrtpandrewsmedina: i think so. perhaps you might talk to niemeyer some time about this too.14:52
andrewsmedinawrtp: ok14:52
andrewsmedinawrtp: I will improve the tests and talk with you and niemeyer again14:52
TheMueniemeyer: How about you? I would do that change after this watcher and the PortsWatcher are in and then the branch with moving all watchers is in too.14:53
niemeyerTheMue: Which change?14:59
niemeyerTheMue: The refactoring fwereade suggested?15:00
TheMueniemeyer: I discussed with fwereade to take the concurrent changes out of the tests later.15:00
TheMueniemeyer: Yes.15:00
niemeyerTheMue: Yeah, as long as fwereade is happy, I'm happy15:01
niemeyerTheMue: and as long as you're happy too, of course15:01
TheMueniemeyer: Fine, and I will keep it as small branches to make you happy.15:01
niemeyerTheMue: WOohay small branches!15:01
niemeyer:)15:01
TheMueniemeyer, fwereade: Big party!15:01
niemeyer!15:01
niemeyer  i i i15:02
niemeyer----------15:02
TheMue*rofl*15:02
fwereadeTheMue, I'm happy :)15:02
niemeyer|          |15:02
niemeyer\:-)15:02
TheMueOh, we get a cake.15:02
TheMueBtw, just had some selfmade chocolate chips by my wife with the coffee. Yummy.15:03
fwereadeniemeyer, btw, ERROR/error: thoughts? ERROR stands out much better when the error line is not the only output15:09
TheMueniemeyer: So, submitted, next stop: PortsWatcher. ;)15:13
niemeyerTheMue: Was just looking at it, but in a meeting with zaid just now.. will continue after lunch15:14
niemeyerfwereade: just a sec and will be with you15:14
TheMueniemeyer: OK, np.15:22
niemeyerfwereade: I'd prefer "error: unrecognized flag --foo" than "ERROR: unrecognized flag --foo"15:30
niemeyerfwereade: My feeling about it is that it was just a problem detected.. no one is dying :-)15:31
fwereadeniemeyer, fair enough, I imagine I'll grow used to it :)15:31
niemeyerfwereade: That said, you have a point..15:31
niemeyerfwereade: Something we should do is to reorder the error vs. help15:31
niemeyerfwereade: In that one place we print the error & help, error should come last15:31
niemeyerfwereade: So it's next to the prompt15:31
fwereadeniemeyer, that's no problem... and it will be much clearer in that case anyway15:32
fwereadeniemeyer, ok, if I rearrange all that and make it lowercase, good to submit?15:32
niemeyerfwereade: In other cases, I suspect that's already happening15:32
niemeyerfwereade: I mean, error is already the last thing printed15:32
niemeyerfwereade: As long as that's true, I don't see a problem with it being lowercased as it'll be very clear15:33
niemeyerfwereade: Yep, +115:33
niemeyerTheMue: Btw, I just detected a silliness I've suggested that isn't necessary15:34
niemeyerTheMue: You know that change, ok := ... if !ok { s.tomb.Kill(nil); return }, that we're using everywhere?15:35
TheMueniemeyer: Yes?15:35
niemeyerTheMue: It's not necessary15:35
niemeyerTheMue: It's fine to just return in that case15:36
niemeyerTheMue: The deferred Done() will make it all work fine15:36
TheMueniemeyer: So check the ok but don't Kill()? OK, I'll change it during refactoring.15:36
TheMueniemeyer: Is it ok when putting it into the watcher movement change?15:37
TheMueniemeyer: So that change would only contain this code change and the moving.15:37
niemeyerTheMue: No, please not in the movement change15:39
niemeyerTheMue: You can put it in the PortsWatcher, though15:39
niemeyerTheMue: As it's just a bunch of one-liner removals, that's fine15:39
TheMueniemeyer: OK, no pro.15:39
niemeyerTheMue: If you do that now, please fix the comment of the watcher as well.. it's referring to the copy & pasted watcher15:40
niemeyerTheMue: I'll review it right after lunch and hopefully we can already get it in15:40
TheMueniemeyer: fwereade already reviewd it.15:40
niemeyerTheMue: Ah, superb15:40
niemeyerTheMue: Btw, do you understand why these lines can be removed?15:40
TheMueniemeyer: OK, will change it now and propose it immediately.15:40
niemeyerTheMue: Btw, do you understand why these lines can be removed?15:43
wrtpniemeyer: PTAL  https://codereview.appspot.com/612005215:44
TheMueniemeyer: We don't pass an error to outside, but want to close the tomb and the channel. That's done by defers after the return.15:45
niemeyerTheMue: Right, Done() takes care of "killing" the tomb if it's not yet dead15:46
niemeyerTheMue: So as long as we're returning from this function, with nil err, just returning is fine15:46
niemeyerwrtp: Thanks, I'll have  a look right after lunch + TheMue's15:47
TheMueniemeyer: Fine, code reduction at its best.15:47
niemeyerTheMue: +115:47
* niemeyer => lunch16:03
wrtpisn't it nice to know that gustavo implies lunch? i'll make sure to have him around as often as possible.16:16
TheMuewrtp: *rofl* took a few moments to get it.16:20
wrtp:)16:20
wrtphmm, i thought i'd sussed this prerequisite stuff. but despite small diffs16:28
wrtpbzr diff --old lp:~rogpeppe/juju/go-more-commands | wc16:28
wrtp     68     260    211316:28
wrtpi guess this:16:28
wrtp https://codereview.appspot.com/611706416:28
wrtps/guess/get16:28
TheMuewrtp: Strange. It claims different changes as yours. Hmm.16:30
wrtpTheMue: yeah. somewhere it's diffing against an unmerged branch16:31
wrtpor something16:31
TheMuewrtp: I still don't understand the prereq stuff.16:33
wrtpTheMue: i thought i did!16:33
TheMuewrtp: As long as the tools are working I'm happy. But in case of a problem I'm lost.16:34
wrtpTheMue: and this is really weird: http://paste.ubuntu.com/947637/16:42
wrtpif i revert to a revision, isn't the revision-id going to be that revision?16:42
* wrtp is trying to work out how to diff two revision-ids16:42
fwereadeTheMue, wrtp: is it not that lbox requires that changes on the target that have been merged into the proposed branch have *also* been merged into the prereq, even if the prereq has already been merged?16:43
TheMuewrtp: Huh16:43
wrtpfwereade: yes. i did that though, i think16:43
fwereadewrtp, ah ok -- it just looked a bit like it has for me when I've got that wrong16:43
wrtpfwereade: me too. that's why "i thought i understood it!"16:43
fwereadewrtp, haha, sorry :(16:44
wrtpoh, i have uncommitted changes.16:45
wrtpand it wants to remove cmd/juju/destroy.go16:45
wrtpso weird. i could've sworn it passed its test *and* i merged it.16:47
fwereadegn all, take care17:00
wrtpfwereade: gn, take care17:01
wrtpniemeyer, TheMue: https://codereview.appspot.com/611706417:01
wrtpall that hassle for about 6 lines of code :-)17:01
wrtpniemeyer, TheMue: ultra-small branch BTW!17:01
TheMuewrtp: *lol*17:02
niemeyerwrtp: LGTM17:04
wrtpniemeyer: still waiting for prereq BTW, but i'm sure you know that :-) it turns out that it didn't need to be a prereq, but i didn't want to delete the CL.17:05
wrtpi probably should've17:05
niemeyerwrtp: Yeah, I'll just review TheMue's first17:06
wrtpniemeyer: np17:06
wrtpniemeyer: do you know if http.Client.Do is guaranteed to close req.Body ?17:10
niemeyerTheMue: Done.. just a couple of trivials17:16
TheMueniemeyer: Fine, thx.17:16
niemeyerwrtp: I don't17:16
wrtpniemeyer: np. just wondering about s3 Put. but i don't think it matters actually.17:17
niemeyerwrtp: I'd check the implementation17:26
TheMueniemeyer: Do you wonna see the openPortsNode change? Otherwise I submit it.17:26
niemeyerTheMue: No, happy to have it submitted, thanks!17:26
wrtpniemeyer: yeah, i did, but it's not greatly obvious17:26
wrtptime to go17:28
wrtpniemeyer, TheMue: g'night. see ya tomorrow.17:28
TheMuewrtp: Yes, good night, I leave too in a few minutes.17:28
TheMuewrtp: CU17:28
niemeyerwrtp: Thanks, and have a good one too17:28
wrtpniemeyer, TheMue: to both of you too17:29
niemeyerwrtp: I think the answer is no, there's no guarantee17:36
TheMueniemeyer: So, I'm off. CU tomorrow.17:39
niemeyerTheMue: Cheers, have a good evening too17:39
TheMueniemeyer: You too, bye.17:39
robbiewniemeyer: we have 1:1 now, mind if we just have it in person next week?18:31
* robbiew is cleaning up Precise blueprints all day today :/18:31
niemeyerrobbiew: np18:32
robbiewthx...back to the grind18:33
=== bcsaller_ is now known as bcsaller

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