[01:20] morning axw [01:20] waigani: morning [01:20] can I ask you a quick golang question? [01:21] certainly [01:21] I'm being stupid again (somewhere!): http://play.golang.org/p/lIn3HvcBNI [01:21] I thought interface{} was like a type wildcard? [01:22] you can assign any type to interface{}, but this is different... *thinks how to phrase* [01:23] axw: you can assign any value to a variable of type interface{} [01:23] yes, value not type... [01:23] waigani: you can't do what you tried there because map[x]x and map[y]y are differetn types [01:24] in real terms, they have different layouts in memory [01:24] what you tried to do won't work because go doesn't have type polymorphism [01:24] right so the map as a whole is taken as one type? [01:24] yes [01:24] yup [01:24] map, slide, array, chan [01:24] hmmm [01:25] so is there a smarter way to do what I was trying to do? [01:25] copy each key/value [01:25] davecheney: https://code.launchpad.net/~thumper/juju-core/no-proxy/+merge/210098 for you local issue [01:25] thumper: ta [01:25] waigani: just do a range and assign each k/v [01:25] waigani: you can delete from a map as you range over it [01:26] waigani: what are you actually trying to do though? [01:26] you could write a very long complicated functoin that does that via reflect, or just write [01:26] for k,v := range m { if k == "whoot" { delete m[k] } } [01:26] right, so your saying don't bother writing the generic function [01:26] pretty much [01:27] okay [01:27] davecheney: "you can assign any value to a variable of type interface{}" - any value of any type? I'm missing something? [01:28] davecheney: will that variable then have the type of the new value? [01:28] waigani: eh ? [01:28] var v interface {} [01:28] v = something [01:28] v's type remains interface{} [01:29] okay, cool got you. [01:29] thanks [01:30] last question, if something was of type string and I tested v to be a string - would that be true or false? [01:30] davecheney: ^ [01:30] _, ok := v.(string) -- ok will be true [01:30] if you assigned a string [01:31] the interface value remembers the type of the assigned value [01:31] waigani: http://play.golang.org/p/qsXniVhWSa [01:31] s/remembers/stores [01:32] axw: standup [01:32] coming [01:32] storage, memory, same thing. [01:32] remembers == ooh spookey magic [01:33] stores == how it really works [01:33] :) [01:44] waigani: https://launchpad.net/juju-core/+milestone/1.18.0 [01:45] thumper: thanks [01:55] wallyworld_: here is the golxc branch https://code.launchpad.net/~thumper/golxc/clone/+merge/209790 [01:55] ok [02:03] thumper: there are no tests for non nil extra args. should there be a test that at least checks that the args are assembled correctly ie "... extra args -- template args" [02:07] hmm... [02:07] ok [02:08] wallyworld_: I wish I had the cleanup suite for that [02:08] ... [02:08] thumper: do you agree we should have the extra test? [02:09] I'd like to see a test that shows the command line being called [02:09] we have some in juju [02:09] where we patch PATH, and create a command that echoes the args [02:10] so you can have a test that the command is being called with the right args [02:10] yeah, that's what i'd like [02:10] * thumper thinks [02:10] perhaps I should make "github.com/juju/testing" [02:10] that has the cleanup suite and checkers from trunk [02:11] that would be useful [02:11] why should juju-core get all the toys [02:11] well, more goose, goaws, etc [02:11] * thumper goes to make the repo [02:11] that's what i mean - why should juju-core be the only project with the cool stauff [02:12] haha [02:12] I already made the repo [02:12] just haven't stuck anything in there [02:35] How do you get a logger.Warningf message in testing? I need to assert it. [02:35] I saw ctx := testing.Context(c), but it seems that captures the output from a cli command. [02:36] here is my test: http://pastebin.ubuntu.com/7065333/ [02:40] c.GetTestLog() works! YAY :) [02:55] wallyworld_: https://github.com/juju/testing [02:55] doesn't have checkers yet [02:55] ok, give me a minute to finish a mp response comment [03:01] great. let the mass migration begin :-) [03:01] that's fine, I'll look to add a function for the "make me a fake exec" that we've used a lot [03:01] thumper: https://codereview.appspot.com/73360043 [03:47] thanks for ploughing through the monster branch axw [03:48] np [03:48] thumper: https://codereview.appspot.com/73390043 (I've got a question in there) [03:54] got a question where? [03:54] oh, that's a different one... [03:57] waigani: can I get you to consider suspend and resume commands? [03:57] for juju-local [03:58] thumper: okay ... [03:58] waigani: :-) [03:58] don't worry, it'll be fun [03:58] although there are a few interesting edge cases [03:58] it always is .. [03:58] :) [03:58] there always are .. [03:59] thumper: did you want to put the details in the review? [04:00] https://code.launchpad.net/~thumper/juju-core/autostart-containers-after-creation/+merge/210099 [04:00] waigani: this ^^ is the one we should land first [04:04] thumper: I forgot to take out AutoRestart() - I was just using it to debug/test [04:07] thumper: are you asking me to review your branch, I'm not sure if I'm ready for that :/ [04:15] waigani: no [04:15] waigani: I'm asking you to wait :-) [04:31] wallyworld_: can I get you to look at this? https://code.launchpad.net/~thumper/juju-core/no-proxy/+merge/210098 [04:31] sure [04:32] thumper: i would have looked but i thought you were getting someone else to look [04:32] wallyworld_: looks like dave didn't [04:32] np [07:31] jam, hey, i'll be 10m late for the 1-1 sorry [07:45] axw, hey [07:46] axw, what do you suggest as an appropriate place for these 2 scripts? utils/ssh/testing ? [07:46] dimitern: hey. I think it should be close to environs/manual, if not inside [07:47] dimitern: why not just expose the scripts from environs/manual, and add the testing code in environs/manual/testing? [07:47] axw, ok, i'll try that - i was having issues with import loops [07:47] ah [07:47] I did try that at one point, maybe that's why I didn't finish it.. can't remember now [07:48] axw, the whole point of the change was to get rid of gocheck deps in production code - because of that we were importing gocheck's gnuflags, and since they're global juju commands were affected [07:49] oops :\ [07:49] dimitern: I actually didn't expect you on today, since you get 1-2 days off for sprinting [07:49] dimitern: I understood the intent (didn't realise that problem), the only issue I have is putting non-ssh-related things in utils/ssh [07:50] jam, oh, i wasn't sure it about that :) i actually did some work yesterday, but perhaps I'll take a swap day this friday [07:50] jam, should we have the 1-1 anyway? [07:52] dimitern: we can if there's stuff you want to talk about, we did just see eachother 3 days ago :) [07:52] jam, yep, let's skip it then :) [08:16] wwitzel3, hey, just so you know - it's not needed to call lbox propose after each commit, what I usually do is go review the comments, do them all, answer them, doing one or more commits and finally do lbox propose (without posting the draft comments, as lbox does that for you) [09:44] dimitern: yeah, it wasn't intentially .. I just kept seeing things I wanted to fix after I self reviewed it. [09:54] wwitzel3, i know the feeling :) [10:47] fwereade, wwitzel3, voidspace, mgz, jam, standup? [10:48] dimitern: I think most people are away, but I'll join you in just a sec [10:49] dimitern: I can't seem to get in to the call [10:49] jam, yeah, i guess so - just pinging [10:49] I'll be in [10:49] dimitern: coming [10:49] I need to find headset though [10:50] wwitzel3: it can be tricky, try logging out of your gmail and log into canonical [10:50] natefinch: I did that, I even opened up a private browser session and tried that. [10:52] according to hangouts I'm the only person here [10:52] am I in the right place? [10:52] voidspace: nope [10:52] wwitzel3, are you logging in with your @canonical account? [10:52] voidspace: retry [10:52] natefinch: I used the link from the calendar [10:52] will retry [10:52] voidspace: thats the one, but sometimes it's finicky [10:53] ah, so dimitern sent me a link [10:53] it says "you're not allowed to join this video call" [10:53] from the calendar it uses my canonical id - but goes to the wrong place [10:53] voidspace, using your @canonical account? [10:53] from a direct link it uses the wrong account [10:53] dimitern: well, I'm logged into both [10:53] I will try a different browser [10:54] voidspace, log off from both and login in the @c first, that way it's the default [10:54] dimitern: I am logged into multiple google services - making canonical my default would be very inconvenient :-) [10:54] I'll use another browser [10:54] voidspace, yeah, that's the alternative [10:55] for online services the calendar links always worked fine so I didn't need to [10:56] dimitern: natefinch: same result - only logged into Canonical [10:56] "you aren't allowed to join this video call" [10:57] voidspace, i'll invite you [10:57] going to plus.google.com shows me definitely logged in with my canonical id [10:57] dimitern: cool - thanks [10:57] yay [10:58] no audio though, fiddling with the settings :-) [10:58] I have audio [10:58] :-) [11:29] mgz: did my email about joyent make sense? [11:31] wallyworld_: I must confess to having opened it in a tab, gone, "that's long, I'll come back to it later"... and not having read it properly yet [11:31] lol, np :-) [11:31] tl;dr; we still have work to do [11:32] okay, so, it's actually pretty good progress [11:32] i got it starting a bootstrap instance but ssh ing in to run the scripts fails [11:32] and i had to hack the header date [11:33] you had to fix a bunch of tings, but are at the bootstrap starts an instance stage, next is working out why ssh in doesn't work [11:33] otherwise it barked with a timestamp skew error [11:33] i also didn't see any tools metadata issue, which was the reason i was asked to help [11:34] but yes, it's progress :-) [11:51] added a test for TargetRelease if someone can take a look https://codereview.appspot.com/72270044/ [12:36] fwereade, ping? [12:36] mattyw: pretty sure he's out today [12:37] natefinch, ah ok - no problem, thanks [12:38] mattyw: welcome [12:39] natefinch, in one of my code reviews fwereade suggested that I should pull out the admin user name "admin" into a const - I was going to ask if he had any idea where it should live - do you have any opinion? [12:39] mattyw: depends on where and how it is used [12:41] natefinch, I'm working on api calls to add/remove users - but there are places where the admin user is going to be a special case at the moment [12:41] natefinch, it's only related to the apiserver at the moment I think [12:43] mattyw: if it's only used in a single package, just make it a non-exported const for now, it just makes it easier to refactor, and make sure it doesn't get typoed. [13:37] natefinch, do you have much experience with the client side of the api? do you know what william might be by unpacking the error?: https://codereview.appspot.com/61620043/patch/110001/120007 === bloodearnest_ is now known as bloodearnest [14:16] mattyw: I'm not sure familiar with the client API code, but looking at other examples, it looks like if you expect a maximum of one error from the api. you can call OneError() on the params.ErrorResults that is returned, and it'll return an error interface, which you can then return from your function [14:16] mattyw: like this: func (m *Machine) EnsureDead() error { [14:16] var result params.ErrorResults [14:16] args := params.Entities{ [14:16] Entities: []params.Entity{{Tag: m.tag}}, [14:16] } [14:16] err := m.st.caller.Call("Machiner", "", "EnsureDead", args, &result) [14:16] if err != nil { [14:16] return err [14:16] } [14:16] return result.OneError() [14:16] } [14:17] natefinch, the OneError() function returns an error if there's not on error in the result though doesn't it - so if there are > 1 errors (because it's part of a bulk call) then you won't get the error you expect? [14:21] mattyw: yeah. it's only valid for non-bulk calls.. .but it looks like add user and remove user are just single calls [14:23] natefinch, I guess they are actually - the server supports bulk calls but the client only allows single calls at the monent [14:24] natefinch, that hadn't actually crossed my mind - thanks for helping out [14:24] mattyw: Probably best to just follow the pattern the other API methods use. [14:27] natefinch, that's normally a good plan [15:12] fwereade, sinzui: gonna give me a clue as to when I might expect to have to go ask the release team for a freeze exception for 1.18? [15:15] jamespage, 4 to 9 days. We will release 1.17.5 in a 1+ days. If we think it is stable enough, it becomes 1.18.0 [15:15] sinzui, ok [15:16] jamespage, I don't think it will be, I still see regressions, So I believe 1.18.0 will be 1.7.5 + some discrete fixes [15:16] sinzui, ack [15:17] which reminds, me, time to rename 1.18.0 to 1.20.0. The new 1.18.0 will have only the crucial regressions and tests targeted [16:38] I just spent 50 minutes on a failing test that was = vs := .. because the scope of the for was modifying the function scoped variable of the same name. lolcry === Ursinha is now known as Ursinha-afk [17:47] wwitzel3: you'll get used to the := vs. = .... it's tricky at first, but after a while it becomes a lot more obvious, and you just pay more attention to := inside conditionals. [17:53] natefinch: yeah, I figured as much, it just made me feel dumb when I finally noticed it. === Ursinha-afk is now known as Ursinha [17:53] wwitzel3: pretty much everyone who writes Go code has done the same thing one time or another. [19:43] mramm: morning [19:43] mramm: seems like you had daylight savings [19:43] 8am isn't such a good time for me :) [19:43] sure [19:44] I have another meeting in 15 min [19:44] can we push ours back another hour? [19:44] to 1:15 from now [19:47] thumper: ^^^^ [19:47] sounds good [19:58] thumper: daylight savings time in the spring is nice. I get up at the same time, but the clock says it's an hour later. [20:23] * thumper growls [20:23] 10 minutes chasing a dumb bug because I used "print" in the bash script instead of "printf" [20:23] haha [20:24] thumper: ..... bash script .... <- there's your problem [20:24] the bigger problem there is 'bash script' ;) [20:24] lol ^5 [20:24] nice [20:24] it is being tested in Go, does that help? [20:25] :) [20:27] thumper: not really [20:27] haha [20:28] * thumper ignores natefinch [20:28] :) [20:28] could be wore, could be csh! [20:28] or perl [20:29] thumper: serious question, though. Any idea why I wouldn't be able to connect to an Amazon juju environment? bootstrap says it's timing out trying to ssh in.. though if I manually make an amazon instance I can ssh in just fine. [20:30] natefinch: nope, sorry [20:36] thumper, hey, I've got a review for you when you have 15m :) https://codereview.appspot.com/72860045/ [20:36] * dimitern steps out [21:04] * natefinch EODs [21:51] wallyworld: can you kick the bot? [21:51] ok [22:12] thumper: you know why this isn't being picked up by the bot? https://code.launchpad.net/~wwitzel3/juju-core/lp-1289316-lxc-maas-precise/+merge/209974 ? [22:12] bot is fubard [22:12] ahh [22:12] wwitzel3: wallyworld was going to kcik it [22:13] thumper: I thought it might of fixed itself since I saw the merge for your branch. [22:13] oh, yay it landed [22:13] :) [22:13] * thumper actually looks [22:14] wwitzel3: it takes a few minutes for the tests to run [22:14] perhaps 15-20 [22:14] so wait a bit [22:14] it was fubared [22:15] wwitzel3: Ok, I set it approved a couple hours ago, didn't know the bot was fubar then [22:15] oops thumper [22:22] thumper: i did kick it [22:22] yeah I see that [22:22] thanks [22:22] wallyworld: wwitzel3 didn't realize and was waiting for his branch to land [22:22] wallyworld: it seems to be working now [22:22] ah ok [22:22] \o/ [22:24] thumper: I am getting a failure on the bot, juju-core/replicaset: error getting replset config : no reachable server [22:24] thumper: but I am unable to replicate that behavior locally [22:25] * thumper sighs [22:25] yeah [22:25] intermittent failure [22:25] I get it sometimes [22:25] you have two choices [22:25] fix it [22:25] thumper: ok, I will ticket it or + the bug [22:25] or click approve [22:31] thumper: click approve where? I've createda bug for the intermitten failure and I'm going to approve this. [22:32] on the merge proposal near the top, from needs-review to approved [22:33] thumper: ahh ok, just to put back in the queue [22:37] * thumper nods