[00:07] <hazmat> i'm trying to debug why the charm store doesn't have a particular charm.. specifically landscape-client none of the personal versions or the 'official' version are available
[00:08] <hazmat> i wrote a quick go program and verified that the charm loads correct, and that the its in the ls getBranchTips output..
[00:08] <hazmat> i'm stumped as to why its not in the store then.. any suggestions?
[00:12] <hazmat> hmm.. i did find one personal archive in the store.. cs:~therve/precise/landscape-client ( but none of the 4 others seems to have made it)
[04:58] <jtv> Is the schema package documented anywhere?
[06:24] <jtv> This is driving me nuts.  Getting a strange error in my tests:
[06:24] <jtv> Panic: runtime error: invalid memory address or nil pointer dereference (PC=0x8057A45)
[06:25] <jtv> Weird thing is, this is the third of a series or near-identical lookups.
[06:25] <dimitern> jtv: what are the first couple of lines at the end of the panic dump?
[06:25] <jtv> I'm trying to test an environs/*/config module.
[06:25] <dimitern> paste?
[06:26] <jtv> Hi dimitern!  Coming up.
[06:26] <dimitern> hi :)
[06:26] <jtv> dimitern: https://pastebin.canonical.com/83822/
[06:26] <jtv> Part of the weirdness is that I see no reason why that configuration string shouldn't be there.
[06:27] <dimitern> jtv: so do you have admin-secret defined in the config attrs?
[06:27] <jtv> I thought I did.
[06:29] <dimitern> jtv: can I look at the module that fails? have you proposed the branch?
[06:29] <jtv> Not yet.  I'll put it up for you somewhere.  Thanks.
[06:31] <jtv> dimitern: try lp:~jtv/juju-core/mpv-config
[06:31] <dimitern> jtv: np, I know how it is with these pesky go errors - it took me some time to start getting what's actually was wrong
[06:31]  * dimitern looking
[06:33] <jtv> I made _some_ progress: I converted a c.Check(err, IsNil) to an assertion and now at least I'm not getting the segfault.
[06:33] <jtv> Just a failure I can't explain.
[06:35] <jtv> I could see how the checks for all 3 config items would fail.  But what did I do to break just the last one?
[06:36] <dimitern> jtv: so the difference between Check and Assert is only in that the latter fails the test immediately, while the former still marks it as failed, but continues to run it, so there's something going on after that Check you changed
[06:37] <jtv> Yes...  and I'm not even so worried about that.
[06:37] <jtv> What I'm worried about is how the error comes back non-nil in the first place.
[06:37] <jtv> (The check that fails looks a bit different from the others right now, but that's from experimentation with the problem.)
[06:39] <dimitern> jtv: so I can see a potential problem in newConfig
[06:40] <dimitern> jtv: cfg should be := make(map[string]interface{})
[06:40] <dimitern> jtv: but since you're initializing it, probably should be ok - but try separating the making and init
[06:41] <jtv> Yeah.  I've just been doing that for new().
[06:41] <jtv> I haven't been able to find any explanation as to why make() is needed if returning the address of a local is guaranteed to be OK.
[06:41] <dimitern> jtv: try: cfg := map[string]interface{}{values} - can skip the loop
[06:41] <dimitern> make is needed for maps
[06:42] <dimitern> or slices
[06:42]  * jtv tries
[06:45] <jtv> dimitern: I'm not so sure I can skip the loop... "values" is meant to complement (and override) the existing "cfg."
[06:47] <jtv> dimitern: no change.  :(
[06:47] <dimitern> jtv: hmm
[06:47] <dimitern> jtv: let me try you branch locally
[06:49] <jtv> Thanks again for helping out.  I really appreciate it.
[06:51] <dimitern> np
[06:56] <jtv> dimitern: I just updated my branch to avoid stack allocation of persistent objects.
[07:00] <dimitern> jtv: so as far as I can see, admin-secret is not set for some reason by the time it's validated in config:Validate()
[07:01] <jtv> Yes... but how is it different from the other items?  Wait...  maybe it has a special meaning to juju.
[07:01] <jtv> Yup.
[07:01] <jtv> I guess attrs only receives the "unknown" attributes, and the juju-standard ones go somewhere else.
[07:02] <dimitern> hmm shouldn't be
[07:02] <dimitern> I'm comparing it with openstack provider to see what could be wrong
[07:02] <jtv> Yup.  That's part of what I cargo--culted.
[07:06] <dimitern> I think the map is structured wrong
[07:06] <dimitern> see, the attrs should match the environments.yaml
[07:06] <dimitern> i.e. tree-based, not flat
[07:06] <dimitern> type attrs map[string]interface{}
[07:06] <dimitern> cfg := attrs{"environments":attrs{"testenv":attrs{"type":"maas"}}}
[07:07] <dimitern> something like this
[07:07] <jtv> Well this is related to rogpeppe's ongoing work tighten up those tests.
[07:07] <jtv> When you don't need to do the round-trip, you don't need that tree above the environ config.
[07:08] <dimitern> hmm
[07:10] <dimitern> yes it seems if you're using tree-based cfg, you need to marshal it to yaml and use ReadEnvironBytes, otherwise NewFromAttrs
[07:12] <dimitern> sorry I couldn't help more, but ask rogpeppe when he's around
[07:12] <jtv> I will.  Thanks.
[07:12] <jtv> (What you see is copied from his proposed test change :)
[07:13] <dimitern> I see :) yeah, definitely he's the man then
[08:19] <rogpeppe> jtv, dimitern: hi
[08:19] <dimitern> rogpeppe: hiya
[08:20] <rogpeppe> jtv: are you still around?
[08:23] <rogpeppe> dimitern: what's the name of jtv's branch? i'll take a look at what's going on.
[08:24] <dimitern> rogpeppe: lp:~jtv/juju-core/mpv-config
[08:30] <rogpeppe> dimitern: ta
[08:54] <jtv> Hi rogpeppe
[08:54] <rogpeppe> jtv: hiya
[08:55] <rogpeppe> jtv: i'm just having a look at your branch now
[08:55] <jtv> My problem is now that I'm not seeing my admin-secret in my test config.
[08:55] <jtv> Thanks.
[08:56] <rogpeppe> jtv: nearly worked it out. it's being lost in maasEnvironProvider.Validate
[08:57] <jtv> Is it?  I wrote it, but I have no idea what most of it means.  It's just stuff that seems to be needed based on other implementations.
[08:57] <rogpeppe> jtv: yes, i'm afraid the config stuff is not ideal. it's been through a fair few iterations, but we're still not entirely happy with it.
[08:57] <rogpeppe> jtv: well, i'm not anyway :-)
[08:58] <rogpeppe> jtv: i think you're right about making the round trip test separate BTW
[08:58] <jtv> Thanks.
[08:58] <jtv> I don't mind a bit of legacy complexity, but it'd be so nice to know what's going on!  :)
[08:59] <jtv> Hmmm mango from my own tree.
[08:59] <fwereade> hey all
[09:00] <rogpeppe> fwereade: yo!
[09:00] <dimitern> fwereade: hey!
[09:00] <fwereade> jam, dimitern, mgz: if you want to talk about last night's braindump let me know
[09:01] <dimitern> fwereade: what's that?
[09:02] <fwereade> hum, did I just send it to mramm?
[09:03] <fwereade> dimitern, about get/set and upgrade-charm
[09:03] <dimitern> fwereade: ah, this one, yeah
[09:03] <dimitern> fwereade: sounds interesting
[09:04] <dimitern> fwereade: I have a couple of things in line on the provider, which I hope to land today and then I can look into get/set or charm upgrades
[09:05] <fwereade> dimitern, I strongly favour all of us having a chat about them before anyone gets too deep into implementing them, there are probably assumptions that  I have failed to capture that a chat could smoke out
[09:05] <dimitern> fwereade: sure, we'll talk first, I have no idea where to begin anyway :)
[09:08] <rogpeppe> jtv: ah, i've found your problem
[09:08] <rogpeppe> jtv: at least, i think i have; let me check.
[09:08] <rogpeppe> jtv: yup.
[09:09] <rogpeppe> jtv: the problem is you've included "admin-secret" in the maasConfigChecker schema fields
[09:10] <dimitern> rogpeppe: that's odd - so what does this cause?
[09:10] <rogpeppe> jtv: but you need to put only fields that are unknown to the config package in there, otherwise they'll override the known attributes when you do the Apply at the end of Validate.
[09:11] <rogpeppe> jtv: the fact that you needed to put admin-secret in the schema defaults, despite it being a required field, was probably a hint.
[09:11] <jtv> I see.  Thanks for finding that!
[09:12] <rogpeppe> jtv: it's easy stuff to get wrong though. i'd love to find a nice way to factor out a lot of this stuff.
[09:12] <jtv> I wasn't aware that I needed to put it in the schema defaults, really.
[09:12] <dimitern> rogpeppe: so schema defaults is only for fields which are not required and should have defaults?
[09:12] <rogpeppe> dimitern: if you don't have a schema default, the field is required
[09:12] <dimitern> rogpeppe: I see!
[09:13] <rogpeppe> dimitern: but in this case the schema is used to validate only fields returned by config.Config.UnknownAttrs
[09:13] <dimitern> rogpeppe: I get it now
[09:14] <dimitern> 10x
[09:14] <jtv> Oh, so if I want these fields to be required, I can just leave them out of the schema instead of checking for them.
[09:14] <jtv> I mean, out of the defaults.
[09:14] <jtv> Not out of the schema, obviously.
[09:14] <rogpeppe> jtv: out of the defaults, yes
[09:14] <jtv> Yayy that gets rid of some code.
[09:15] <rogpeppe> jtv: that's kinda the point of the schema - it does quite a few checks for you so you know it's in a certain form before you start checking
[09:15] <jtv> Yeah, it's just that I couldn't find any documentation whatsoever for it.
[09:15] <jtv> So I had no idea what it did that I could rely on.
[09:15] <dimitern> it's probably worth a comment somewhere then!
[09:15] <jtv> It would be, definitely!
[09:15] <rogpeppe> jtv: have you tried "go doc launchpad.net/juju-core/schema" ?
[09:16] <jtv> Nope.
[09:16] <rogpeppe> jtv: if in doubt, read the docs :-)
[09:17] <jtv> Hmm... that just produced the stuff I'd already read.
[09:17] <rogpeppe> jtv: although they're not great there, it's true
[09:17] <jtv> Not documentation, just implementation notes.
[09:18] <jtv> What is a Checker?  A Checker is called recursively etc.  Now you know, so the rest can be explained in terms of Checkers!
[09:18] <rogpeppe> jtv: yeah
[09:18] <rogpeppe> jtv: one of gustavo's earlier efforts :-)
[09:18] <jtv> I find one of the hardest things to imagine is not knowing something that you do know.
[09:19] <jtv> The ability to grasp something complicated and to explain it don't really fit comfortably into one brain at the same time.  :(
[09:19] <rogpeppe> jtv: there should be a package-level comment that explains how things work
[09:19] <jtv> Definitely, yes!
[09:20] <rogpeppe> jtv: one small remark: usually we name error values starting with "err", so your "noMaasServer" would be errNoMaasServer.
[09:22] <rogpeppe> jtv: another one: there's not much point in putting a "maas" prefix on types/variables that are local to the maas package, so i'd define "environProvider", not "maasEnvironProvider", etc, thus saving quite a bit of typing :-)
[09:22] <jtv> Ah OK, I'll patch that up quickly, thanks.
[09:22] <rogpeppe> jtv: ah, and error messages generally don't start with capital letters (they usually form part of a longer "sentence")
[09:22] <jtv> Well I found the environProvider slowed me down a lot because it sounds just like EnvironProvider, and because it's relative to the package you're in.
[09:23] <jtv> Ah, yes, back to K&R times.  :)
[09:23] <jtv> When Bearded Dinosaurs Roamed the Earth.
[09:23] <dimitern> :D
[09:23] <jtv> Can I punctuate?
[09:24] <rogpeppe> jtv: sure, but there's generally no full stop. an error message isn't the full message that will be printed to the user.
[09:24] <jtv> Ah.
[09:24] <jtv> Good thing most of those error messages are no longer needed!
[09:25] <rogpeppe> jtv: environProvider is supposed to sound like EnvironProvider BTW - it's a provider-specific implementation of the EnvironProvider interface.
[09:26] <rogpeppe> jtv: all types in Go are relative to their package - it's common to define names that make sense in the context of the package itself.
[09:27] <rogpeppe> jtv: so if you think of it as "maas.environProvider" it perhaps makes sense. rather than "maas.maasEnvironProvider", which has a certain amount of redundancy.
[09:28] <jtv> I understand that they're supposed to sound similar, but they sound _too_ similar!  And I'm fully aware of the whole idea of nested namespaces.  I myself thought that was a good idea, back in the 20th century.  The real world taught me otherwise!
[09:29] <TheMue> The best way to use a language is to use the idioms of that language. Java in Java, Smalltalk in Smalltalk, Go in Go.
[09:30] <rogpeppe> jtv: namespaces aren't nested - they're two llevel. package.name
[09:30] <rogpeppe> jtv: well, three level if you count structs and interfaces.
[09:31] <rogpeppe> jtv: what TheMue says - this are just standard Go idioms. they seem to work pretty well most of the time.
[09:31] <jtv> Film at eleven!
[09:31] <rogpeppe> jtv: :-)
[09:32] <jtv> I mean, this stuff we all know.  I'm not saying it's new to me, but that it's stuff I found to be bad ideas.
[09:32] <rogpeppe> jtv: what made you think that nested namespaces weren't a good idea BTW?
[09:33] <jtv> It increases the overhead of finding out what's going on.  If I see package.Name, I need to find out which package that actually is.
[09:33] <jtv> It's an extra step of indirection in an inner loop.
[09:33] <jtv> Increases the overhead of understanding new code tremendously.
[09:33] <rogpeppe> jtv: luckily it's possible to do that mechanically and instantly.
[09:34] <jtv> But tools like grep won't know about that.
[09:34] <rogpeppe> jtv: there are tools that do.
[09:35] <dimitern> i think what's confusing at first is that modules and files are not orthogonal in go
[09:35] <rogpeppe> jtv: making all names unique takes us back to the pre-K&R days of having a shared struct field namespace
[09:36] <rogpeppe> jtv: i mean pre-ANSI C of course
[09:36] <dimitern> you can have module X, which is spread across several files and all of them define it, so finding X.Y is not as straightforward as in other langs
[09:37] <TheMue> dimitern: Thankfully packages and files aren't the same. It would be a hard limitation.
[09:37] <dimitern> but has it's advantages too ("silent" scope membership) and access in-module
[09:39] <rogpeppe> dimitern: yeah, i rely heavily on godef (http://godoc.org/code.google.com/p/rog-go/exp/cmd/godef)
[09:39] <rogpeppe> dimitern: which takes me straight to the definition of any name.
[09:39] <dimitern> rogpeppe: sweet! I didn't know this
[09:40] <dimitern> rogpeppe: thanks, I'll definitely use this
[09:40] <dimitern> beats rgrep by a margin :)
[09:40] <rogpeppe> dimitern: i believe there's perhaps similar functionality in some of the Go-modes for other editors.
[09:41] <dimitern> rogpeppe: not for emacs, AFAIK
[09:41] <rogpeppe> dimitern: BTW godef is a not-too-thick layer on top of http://godoc.org/code.google.com/p/rog-go/exp/go/types
[09:42] <rogpeppe> dimitern: so you might want to customise it for your situation
[09:42] <rogpeppe> dimitern: (it's nice when a single click takes you to the definition.
[09:42] <dimitern> rogpeppe: yeah, I could try to automate it somehow from the editor when I have some time
[09:42] <rogpeppe> )
[09:44] <rogpeppe> dimitern: it's particularly good when you've got something like: x.foo.Bar().Arble, in the middle of a loop where is the loop variable etc, and you can click on Arble and it'll do all the type inference (through embedded fields too) and go straight there.
[09:44] <dimitern> rogpeppe: so not only X.Y, but even more complex expressions are supported
[09:45] <rogpeppe> dimitern: yeah - it supports almost everything. one notable limitation is it doesn't support import to "."
[09:45] <rogpeppe> dimitern: i need to fix that
[09:45] <dimitern> rogpeppe: ah, yeah, I see how this can be tricky
[09:47] <rogpeppe> dimitern: it's not actually too tricky - it's just not as efficient as i wanted it to be. i thought . imports would be very rare, but gocheck is a sadly common exception.
[09:47] <dimitern> yeah
[09:50] <rogpeppe> jtv: as for grep, i have an experimental command which covers some of the same ground, and makes it possible to grep for particular symbols even if they don't have a unique name: http://godoc.org/code.google.com/p/rog-go/exp/cmd/gosym
[09:51] <jtv> Argh, more tools, more cognitive load!
[09:53] <rogpeppe> jtv: that's the unix way :)
[09:56] <rogpeppe> jtv: BTW a grep pattern i use quite a bit: grep for ' Foo(' finds functions and method names named Foo, with surprisingly little redundancy.
[10:04] <jam> w7z: /wave
[10:04] <jam> morning
[10:04] <w7z> hey!
[10:05] <jam> w7z: good to have you back. how was fosdem?
[10:06] <w7z> good! I'm feeling a little fluish as an after effect, but not as ropey as I was last night, just ignore the coffing
[10:18] <jtv> rogpeppe: sorry for being quiet — in meetings!
[10:19] <dimitern> rogpeppe: can you take a look at a couple of related trivials? https://codereview.appspot.com/7307046/ and https://codereview.appspot.com/7299045/
[10:20] <rogpeppe> jtv: np
[10:20] <dimitern> jam, w7z: morning
[10:22] <jtv> rogpeppe: would you be up for reviewing that branch?  It's for our feature branch.
[10:22] <rogpeppe> jtv: sure
[10:22] <rogpeppe> jtv: did you see my comments on gomaas BTW?
[10:23] <jtv> Oh, yes...  still have to go into details with those.
[10:24] <jtv> Too many tabs open!
[10:24] <rogpeppe> jtv: i have that problem
[10:24] <jtv> The Launchpad+Rietveld split makes me worse at it.  :)
[10:24] <jtv> Found it.
[10:25] <rvba> rogpeppe: I just saw your review on gomaasapi, thanks a lot for that, I'll work on it today.
[10:25] <rogpeppe> rvba: cool, thanks.
[10:25] <dimitern> rogpeppe: ^^ it's what we discussed last week
[10:25] <jtv> In particular, we did talk about the idea of representing a higher abstraction level.
[10:25] <rogpeppe> dimitern: am on it
[10:25] <dimitern> rogpeppe: thanks
[10:26] <jtv> We didn't want to mirror the whole MAAS API on that side manually — so our hope is that at some point we can generate a native API representation in some automated fashion.
[10:26] <jtv> Until then, given time constraints, we kept it very basic.
[10:27] <rogpeppe> jtv: perhaps, to start with, you could restrict the provided API to the things that juju needs.
[10:28] <rogpeppe> jtv: and build it up from there.
[10:28] <jtv> That option came up, but it's still mirroring the API details manually...  plus it increases the risk of moving to an automated API.
[10:28] <jtv> Because it may require changes in approach.
[10:29] <jtv> For now we don't need to make very  intensive use of the API yet, so we went with something highly generic that'll do for what we need.
[10:29] <jtv> Time pressure is a big thing for us.  :)
[10:29] <rogpeppe> jtv: as it is, the gomaasapi package is pretty incomprehensible without a deep understanding of how the maas client-server interaction works, which seems to lose the point of the package.
[10:30] <jtv> Yes, but bear in mind that the package's immediate reason for existence is the work we're doing now, immediately after.
[10:30] <jtv> So see this more as laying the foundations for an independent front-end, rather than providing a full front-end for general use.
[10:31] <jtv> (Also the MAAS API is extensively documented, so though it's not easy, it should be possible to figure out)
[10:31] <rogpeppe> jtv: i'd be happier if the surface area was much smaller.
[10:31] <jtv> Measured in what terms?
[10:34] <dimitern> jam: why you think it'll be tricky to land my change? what ordering?
[10:34] <jam> dimitern: you can't just mark it approved, because it won't past the juju-core test suite
[10:34] <jam> I mentioned it in my email
[10:35] <dimitern> jam: yes, so how then
[10:35] <dimitern> jam: juju-core first?
[10:35] <rogpeppe> jtv: the number of artifacts exported from the package
[10:36] <rogpeppe> jtv: most of the functions and methods in the package feel like http utility functions.
[10:37] <jtv> Well to be honest some of those things probably just shouldn't be exported — but those things are subject to change and Go makes it a bit harder to streamline them.
[10:37] <jam> dimitern: so you can, at the risk that if there was something you didn't catch, you've broken the juju-core suite until your goose patch lands.
[10:37] <jam> The manual way is to do the merges locally, make sure everything passes, and then push them up to the right location.
[10:38] <rogpeppe> jtv: what do mean by "Go makes it a bit harder to streamline them." ?
[10:38] <jtv> rogpeppe: all you really need to know, I think, is JSONObject, MAASObject, and a constructor.
[10:38] <jtv> Un-exporting an item means changing its name everywhere.
[10:38] <dimitern> jam: can you explain the manual way in more detail?
[10:38] <rogpeppe> jtv: luckily the compiler will tell you exactly where you need to change the name...
[10:39] <jtv> Yes, but you have to go ask it.
[10:39] <jtv> And make the changes.
[10:39] <jtv> Being told by a computer what work you need to do is not the same as not having to do it.  :)
[10:39] <rogpeppe> jtv: sure, but it's not more than a minute or so's work.
[10:39] <jam> dimitern: cd $GOPATH/src/launchpad.net/juju-core; bzr merge MY_JUJU_PATCH; cd ../goose; bzr merge $MY_GOOSE_PATCH; py test.py (-live); cd ../juju-core; go test ./...; bzr commit -m "?"; cd ../goose; bzr commit -m "?"; bzr push bzr+ssh://goose-bot@bazaar.launchpad.net/~goose-bot/goose/trunk; cd ../juju-core; lbox submit
[10:40] <jtv> rogpeppe: I'm sure it is.  But so is everything else!
[10:40] <rogpeppe> jtv: (BTW i did write that gosym command to try and make it easy to make bulk changes like that automatically; it needs some work though)
[10:40] <jtv> Oh, it helps automate that?  That'd be very helpful for something like this.
[10:40] <rogpeppe> jtv: can you explain the rationale behind JSONObject, BTW?
[10:40] <jam> rogpeppe: does 'go fmt' take a regex, or do you use go fix?
[10:41] <jam> (can you use go fix?)
[10:41] <rogpeppe> jam: gofmt can do expression rewriting, but it's not type-aware.
[10:41] <rogpeppe> jam: go fix is only used for go core API changes
[10:42] <jam> rogpeppe: sure, I wasn't sure if you could pass it your own transformations.
[10:42] <dimitern> jam: and if I do it the usual way - first submitting the juju patch, and immediately after coping the commit msg in the MP in LP and marking it as Approved?
[10:42] <jtv> rogpeppe: JSONObject is there to provide an abstraction layer that lets us provide (and test) dynamic data types including MAAS object types.
[10:43] <rogpeppe> jam: no. i think that coming up with a language that can express sufficiently transformations is a hard problem
[10:43] <dimitern> dimitern: juju-core will be broken for like less than 10m
[10:43] <jam> dimitern: if juju lands first, it should work, but you just open the risk that you've broken the test suite until goose lands.
[10:43] <jtv> rogpeppe: I know the caller could just do everything with casts, but that takes aware our room to explore the problem and make changes.
[10:43] <dimitern> jam: ok, I'll try that - it seems simpler
[10:43] <jam> dimitern: it is the "wrong" order, but I'm pretty sure it is what wallyworld did earlier, and it certainly is easier :)
[10:44] <wallyworld> jam: i tried the "right" way, but no luck
[10:44] <jam> dimitern: it will stop working once commits t ojuju-core actually have to pass their test suite.
[10:44] <jam> wallyworld: what step didn't work for you?
[10:44] <rogpeppe> jtv: i'm not sure i see how GetString is better than a cast
[10:44] <dimitern> jam: but that'll be fixed once the goose patch lands, right? so it's just a few minutes of breakage
[10:45] <rogpeppe> jtv: i think it would be better to simply return the object as unmarshalled json
[10:45] <jtv> rogpeppe: we still need to think about things like what is an error and what is a panic.
[10:45] <wallyworld> jam: longish  story, bzr push to goose-bot trunk returned AppendRevisionsOnlyViolation error
[10:45] <dimitern> rogpeppe: I'll land https://codereview.appspot.com/7299045/ - if you don't mind
[10:45] <wallyworld> jam: plus manually approving mp didn't trigger tarmac
[10:46] <wallyworld> jam: or maybe it did, but i couldn't ssh in to the machine to seer the logs
[10:46] <rogpeppe> dimitern: yes sorry, LGTM
[10:46] <dimitern> rogpeppe: tyvm
[10:46] <rogpeppe> jtv: in general if you're checking something coming from an external source, it's an error not a panic
[10:46] <wallyworld> jam: so i ended up merging to trunk locally and pushing that
[10:47] <jtv> rogpeppe: does an impossible cast always panic?
[10:47] <rogpeppe> jtv: no
[10:47] <jtv> Or does it have that weird optional-second-output thing?
[10:48] <rogpeppe> jtv: yup
[10:48] <jam> wallyworld: so you need to merge your change into trunk ,rather than merging trunk into your changes (that is the AppendRevisionsOnly thing).
[10:48] <wallyworld> jam: yeah, finally figured that out :-)
[10:49] <rogpeppe> jtv: i'd be happier to see: type Object struct {Data interface{}} and methods on it to retrieve maas-specific things.
[10:49] <jam> wallyworld: I'm checking the tarmac logs, it seems to think there is a ghost revision in your branch ancestry... thats a bit strange.
[10:50] <rogpeppe> jtv: possibly with Data as an unexported field.
[10:50] <wallyworld> yeah
[10:50] <jtv> rogpeppe: what kind of maas-specific thing do you mean there?  Attributes?  Or would this also wrap numbers, arrays etc?
[10:50] <rogpeppe> jtv: the methods that are currently available on MAASObject
[10:51] <jam> wallyworld: it seems to be complaining about: $ bzr log -r revid:ian.booth@canonical.com-20130204235315-18qtwkohjlb8403u
[10:51] <jam> "history_db_path" not set for BzrBranch7(file:///D:/dev/go/goose/trunk/)
[10:51] <jam>      60.1.3 Ian Booth   2013-02-05 [merge]
[10:51] <jam>             Merge trunk
[10:51] <jam> which doesn't make a lot of sense. maybe something with pushing and then it not completing properly because of ARO ?
[10:51] <wallyworld> jam: i never had a d:/dev/go/goose/trunk anything
[10:51] <wallyworld> i don't do windows
[10:51] <jam> wallyworld: don't worry about the history_db_path part.
[10:52] <jam> the actual failure is different, I was just logging the rev
[10:52] <wallyworld> i did pull to my loval copy of trunk and merge that at some point
[10:52] <jam> wallyworld: it looks like tarmac doesn't do the nice thing and tell you what branch it is trying to merge.
[10:53] <jam> :(
[10:53] <wallyworld> i'll have to figure out how to ssh in
[10:53] <jam> wallyworld: I probably need to add your ssh-keys. juju doesn't default to adding the shared ssh key I set up (I think)
[10:54] <wallyworld> ok
[10:55] <jtv> rogpeppe: then you're talking about casting your way around everything.  One thing that's very important to us is that code's intent be explicit, and especially with this being our first Go project, we don't pick up intent as easily from casts as we do from function names.
[10:55] <jam> wallyworld: I just added the goose-bot pub key, I'll look for yours next
[10:55] <jam> I thought there was a simple command to import keys from LP, but I don't remember what it is
[10:55] <wallyworld> ok
[10:55] <wallyworld> me either
[10:56] <jam> wallyworld: your key should be added
[10:56] <wallyworld> ok, will try and ssh
[10:57] <wallyworld> jam: ssh_exchange_identification: Connection closed by remote host
[10:58] <wallyworld> when i tried ssh  tarmac@10.55.60.11
[10:58] <jam> wallyworld: so it looks like tarmac was trying to land your branch for about 10 minutes before it stopped (but it never posted to Launchpad unfortunately)
[10:58] <rogpeppe> jtv: i really don't see a significant difference between. s, err := o.GetString() and s, ok := o.(string)
[10:58] <wallyworld> i'm not that familiar with ssh to know inmmediately ehat that error means
[10:58] <jam> wallyworld: ubuntu@10.55.60.94
[10:58] <jam> not sure where you got .11
[10:59] <wallyworld> ok, i think i did a nova list
[10:59] <jtv> rogpeppe: that's why I said it's _our_ first Go, not yours!
[10:59] <wallyworld> and picked a server, can't recall now
[10:59] <jam> wallyworld: right, instance 0 is the juju state server
[10:59] <jam> instance 1 is the bot
[10:59] <jam> which is running as "tarmac" but ssh access is via "ubuntu"
[10:59] <jam> you can sudo su - tarmac if you need to.
[10:59] <jtv> rogpeppe: We do see a significant difference there.  And that may well change, and we're trying to do everything the Go way here, but we do also need to be comfortable with what we're writing.
[10:59] <wallyworld> jam: ok, i'm in, thanks
[11:00] <dimitern> rogpeppe: sorry about missing you comment, here's the fix: https://codereview.appspot.com/7308044
[11:01] <jam> dimitern: why the intermediate variable?
[11:01] <dimitern> jam: because I need to deref it
[11:02] <jam> ah, pointer stuff, sure
[11:02] <dimitern> jam: btw the usual way worked smoothly :)
[11:03] <jam> dimitern: yeah,it usually works quite quickly, I'm not sure what the problem was for Ian. It looks like one of his branches on LP wasn't complete. wallyworld did you happen to try to push to lp:goose *before* you pushed up your own branch for review?
[11:04] <wallyworld> jam: i don't believe so but can't say for 100% sure
[11:04] <rogpeppe> jtv: i'm aware it's your first Go - i'm just trying to gently suggest ways of doing things that are more "go-like". JSONObject seems to be duplicating the go type system without any particular reason (all the information in the maasify'd object is present in the original interface{} value)
[11:04] <dimitern> jam: actually I did just that - tried pushing to lp:goose, got bitten and went with what you said in the mail about the bot
[11:04] <jam> wallyworld: what is weird is that it is claiming it failed to merge goose's trunk, but the revision it is complaining about should have only been in your branch.
[11:05] <jam> dimitern: you shouldn't have direct commit access to 'lp:goose' to keep us all honest, but I do outline in the email how to get around it.
[11:05] <wallyworld> hmmm. that is weird
[11:05] <jam> wallyworld: my guess is it was having trouble with your branch, but giving a bad error message.
[11:05] <wallyworld> could be. let's see what happens next time i guess
[11:06] <jam> which *might* have been that your branch tip had a revision, which bzr didn't copy to your branch's local repository, because it was stacked on a repository that already had it.
[11:06] <jam> (which should work, but tarmac might be trying something special under the covers)
[11:06] <jam> I know it uses a lightweight checkout for trunk
[11:06] <jtv> rogpeppe: Yes and I appreciate that, but to us there _is_ a real difference between having the caller cast their way around and hiding that detail from them — including an apparent bug in the json package where you don't know if a number is going to be an int or a float64.
[11:06] <wallyworld> i use lightweight checkouts also
[11:06] <jam> and using remote lightweight checkouts has had some edge cases in bzr in the past.
[11:07] <rogpeppe> jtv: numbers are always float64 when unmarshalled into an interface{}
[11:07] <jtv> That's what I thought too.
[11:07] <rogpeppe> jtv: unless you've found a counter-example...
[11:07] <jtv> Yeah.  :(
[11:07] <jam> jtv: http://golang.org/pkg/encoding/json/#Unmarshal claims that. Were you unmarshalling into a map?
[11:07] <rogpeppe> jtv: if so, sounds like a bug. have you got something that demos the problem?
[11:08]  * jtv looks
[11:14] <jtv> jam, rogpeppe: wouldn't you know it — can't reproduce that now.  I must have been wrong.
[11:14] <jtv> Yes, I was unmarshaling into a map.
[11:14] <jam> jtv: my guess is while discovering it, you were probably trying out "what if it is an int" and got an int back.
[11:15] <jtv> Nope.
[11:15] <jtv> Not *consciously*.  But I do wonder if somehow I got an int in there that I didn't first serialize.
[11:16] <jtv> Could easily have happened.
[11:31] <jam> dimitern: care to come join us in mumble?
[11:31] <dimitern> jam: sure
[11:41] <TheMue> lunchtime
[12:32] <dimitern> yay! so nova list server/detail filters support regex matching by name!
[12:33] <dimitern> filtering current env's machines will be a breeze
[12:35] <jam> wallyworld: I use local lightweight checkouts, but not lightweight checkouts of lp: branches.
[12:35] <jam> dimitern: nice
[12:35] <wallyworld> ok
[12:36] <jam> (and remote lightweight checkouts have had some rough edges)
[12:36] <wallyworld> i can't get by without
[12:59] <niemeyer> Goood morning all
[12:59] <rogpeppe> niemeyer: hiya
[13:00] <niemeyer> rogpeppe: Yo!
[13:01] <dimitern> weird.. it tells me I cannot join the weekly hangout
[13:01] <dimitern> jam: how did you get in?
[13:02] <jam> dimitern: I just joined
[13:02] <jam> https://plus.google.com/hangouts/_/calendar/bWFyay5yYW1tLWNocmlzdGVuc2VuQGNhbm9uaWNhbC5jb20.pjo9s0ubrlo7fudfdu3bkivq34
[13:02] <jam> https://plus.google.com/hangouts/_/33acfc2c8af8792568274fa110371db956f9fde7
[13:02] <dimitern> You are not allowed to join this hangout.
[13:03] <dimitern> why?!
[13:03] <jam> dimitern: are you connecting with an @canonical account?
[13:03] <jam> just a thoguht
[13:04] <dimitern> jam: yeah it seemed like that's the issue
[13:05] <jam> dimitern: I think you can try the last link, and just go directly to the hangout, rather than via the calendar
[13:06] <dimitern> yeah, I tried them all, switched to @canonical account ...a few times, no cigar
[13:11] <dimitern> i'm switching the account, but somehow the link switches it back to the other (non canonical) one :(
[13:11] <dimitern> can somebody invite me or something?
[13:50] <hazmat> niemeyer, good morning
[13:50] <rogpeppe> luunch
[13:50] <hazmat> niemeyer, i'm trying to debug an issue with the charm store, the landscape-client charm isn't showing up on either the alias or most of the personal addresses
[13:51] <niemeyer> hazmat: Heya
[13:51] <hazmat> i wrote a small go program and verifies that the charm loads correctly, and one of the personal charm branches (out of 4) does appear in the store
[13:51] <hazmat> i'm a bit stumped as to causes or how to debug further
[13:51] <niemeyer> hazmat: Worth asking mthaddon for the logs to see if it's breaking on import
[13:52] <hazmat> niemeyer, cool, i'll do that, thanks
[13:52] <niemeyer> hazmat: np
[14:03] <hazmat> mthaddon, fwereade, niemeyer so the issue is that the landscape-client has a required relation named 'juju-info' which per previous discussion i believe is resolved on trunk. is there a procedure in place re updating the charm store code. (charm store log - https://pastebin.canonical.com/83865/)
[14:03] <niemeyer> hazmat: We just have to ask Tom to bump it
[14:04] <mthaddon> hazmat: we have deployment instructions (anyone from webops, not just me)
[14:04] <hazmat> mthaddon, cool, should i have someone put in an RT put in for this?
[14:05] <fwereade> hazmat, AIUI we agreed that that that name would only be accepted for container-scoped require relations
[14:05] <mthaddon> hazmat: that'd be great, thanks
[14:05] <fwereade> hazmat, without that restriction relation specifiers become potentially ambiguous
[14:05] <hazmat> fwereade, in this case it is container scoped (its a sub)
[14:06] <hazmat> fwereade, yup
[14:06] <fwereade> hazmat, hmm, so it is, I do apologise
[14:07] <hazmat> fwereade, no worries, nothing wrong with being precise
[14:35] <niemeyer> hazmat: Even then
[14:35] <niemeyer> hazmat: We want to obsolete that eventually
[14:35] <niemeyer> hazmat: So I recommend fixing the charm
[14:35] <niemeyer> hazmat: Even more considering that charm is ourrs
[14:35] <niemeyer> ours
[14:35] <niemeyer> fwereade: ^
[14:36] <fwereade> niemeyer, hazmat, I am +1 on this
[14:37] <fwereade> niemeyer, hazmat: there's a bug in juju-core to deprecate and complain about use of that exception
[14:38] <hazmat> niemeyer, understood, and i can file a bug against the ls charm, but there are a large number of subordinates that do this in the wild, its not clear if they all have maintainers. i had thought we had resolved the ambiguity in a tight way. the problem with deprecations is that it hits the users not the authors.
[14:39] <niemeyer> hazmat: How's that in disagreement with what I just said?
[14:39] <niemeyer> hazmat: You are not "in the wild".. you are a juju developer.. I recommend fixing the charm. That's all.
[14:52] <hazmat> niemeyer, its not clear what the timeline is for eventually, realistically it may be never. there are roughly 50 charms extant that have this behavior (http://jujucharms.com/search?search_text=juju-info). afaik no juju devs do charm maintenance/reviews. for this particular charm as i already said yes we can do it, but we don't have access to update personal charms everywhere.. the rest of my comment was directed to fwereade's suggestion of deprecations/com
[14:52] <hazmat> plaints
[14:56] <niemeyer> hazmat: I think we covered that topic pretty well in the ML thread.
[14:57] <fwereade> hazmat, it is true that if they're never going to be fixed then adding the warnings will have no net effect other than to increase the quantity of spam in the world, but I'm not quite ready to give up on the dream
[14:57] <niemeyer> hazmat: If you don't want to fix the charm, nobody will force you to right now. Be happy.
[15:01] <rogpeppe> mramm: i can't join the usual kanban hangout
[15:02] <rogpeppe> dimitern: how did you fix your hangout issue?
[15:03] <mramm> rogpeppe: I think you need to use a canonical G+ account
[15:03] <mramm> no idea how to fix that though
[15:03] <mramm> let me poke around...
[15:03] <TheMue> same problem here
[15:03] <rogpeppe> mramm: i am.
[15:11] <dimitern> rogpeppe: logged out of the other account and left the canonical one only
[15:12] <dimitern> sign out of all accounts and log in to the canonical first (then the others, if needed) - your default account is the one you first logged in
[15:12] <dimitern> http://webapps.stackexchange.com/questions/6862/how-do-i-change-my-default-account-with-google-multiple-sign-in
[15:15] <dimitern> I'd appreciate 2 quick related reviews: https://codereview.appspot.com/7299047/ (juju-core) and https://codereview.appspot.com/7309045/ (goose)
[15:18] <hazmat> niemeyer, i'm not sure why you feel the need to make a technical discussion  personal, but i'll take the advice.
[15:32] <niemeyer> hazmat: Because there wasn't any technical discussion.. we've already talked about that. I've made a trivial suggestion.. if you don't want to follow, just ignore me.
[15:36] <dimitern> fwereade: ping
[15:36] <fwereade> dimitern, in a call, expect slow responses
[15:37] <dimitern> fwereade: sure, when done if you have some time, can you take a look at these 2 CLs? ^^
[15:44] <hazmat> niemeyer, afiacs the discussion had evolved past the suggestion of fix the charm into discussion of the merits of deprecation, which you tried to shut down by making it personal. anyways.. bug filed against ls charm.
[15:49] <niemeyer> hazmat: That's your reading. My reading is that we already covered that topic in the mailing list thread. I'm not willing to explain everything again here.
[15:50] <niemeyer> hazmat: and you're pulling it into a personal argument for no good reason.
[15:51] <niemeyer> hazmat: In fact, you do that pretty often. Please stop. Thank you.
[15:52] <hazmat> niemeyer, i'll raise my comments on the thread then, and yes i'm calling you out for what your doing because its not appropriate.
[15:52] <niemeyer> hazmat: What you are doing is what is not appropriate. Yes, considering the points previously made in a conversation is a terrific plan.
[15:52] <niemeyer> hazmat: No, bugging people to say what you want is not okay.
[15:53] <niemeyer> hazmat: You don't have to follow my suggestions, but you can't force me to cover the subjects of your will whenever you please, and then call that a personal argument when I say no.
[15:54] <hazmat> niemeyer, i'm fine with that, but there are much better ways to say no
[15:54] <niemeyer> hazmat: The thread has a good assessment of the situation as I've pointed out repeatedly. Basic home work.
[15:54] <niemeyer> hazmat: It's easy to say what other people should do. It's harder to do what is appropriate.
[16:07] <niemeyer> rogpeppe: ping
[16:08] <rogpeppe> niemeyer: in a meeting. be with you in a bit
[16:08] <niemeyer> rogpeppe: Thanks
[16:32] <rogpeppe> niemeyer: meeting finished, but i've got another one now...
[16:57] <niemeyer> ... obtained string = "goamz-us-east-1-AKIAJK3W/multi1"
[16:57] <niemeyer> ... expected string = "multi1"
[16:57] <niemeyer> Something is seriously busted in S3.. :(
[16:58] <dimitern> jam: we can spin 3 machines in canonistack to test regexp filtering, but the test will be awfully slow
[17:35] <rogpeppe> niemeyer: pong
[17:35] <fwereade> rogpeppe, TheMue: can we call it a day please? that's been 2.5h solid of talking for me and rogpeppe...
[17:36] <rogpeppe> fwereade: +1
[17:36] <rogpeppe> fwereade: tomorrow morning?
[17:36] <fwereade> rogpeppe, TheMue: +1
[17:45] <TheMue> fwereade: +1
[17:46] <jam> dimitern: it is the sort of thing where I'm reasonably ok with passing multiple regex's against 1 server name
[17:46] <TheMue> rogpeppe, fwereade, mramm2: I appreciated the talk.
[17:46] <jam> but we have done a manual test across multiple names
[17:48] <dimitern> jam: actually, it won't take that much time on second though - I'm already half through a test spinning up 3 machines (and not waiting for them - no need to do anything to them)
[17:48] <dimitern> jam: but i'll continue tomorrow and call it a day now
[17:48] <jam> dimitern: k
[17:50] <niemeyer> rogpeppe: Yo
[17:50] <niemeyer> rogpeppe: Sorry, was on a call with Robbie
[17:50] <rogpeppe> niemeyer: hiya
[17:50] <niemeyer> rogpeppe: I just wanted to ping you about the comment, but I think I already sorted out
[17:51] <niemeyer> rogpeppe: "overview of" is fine, right?
[17:51] <rogpeppe> niemeyer: yeah
[17:51] <rogpeppe> niemeyer: depending on the context of course :-)
[17:51] <niemeyer> rogpeppe: The intent of mentioning that it was an overview of multipart uploads is that saying "See an overview at foo." would pass a wrong impression that this was about Multi.
[17:51] <niemeyer> rogpeppe: Yeah
[17:52] <rogpeppe> niemeyer: ah yes.
[17:52] <niemeyer> rogpeppe: Supe
[17:52] <niemeyer> r
[18:00] <rogpeppe> i've gotta go.
[18:01] <rogpeppe> g'night all
[18:02] <niemeyer> rogpeppe: Night