=== bigjools-afk is now known as bigjools [07:37] fwereade: goat moaning [07:37] wrtp, baaaaa [08:27] mornin' [08:28] heya TheMue [08:29] fwereade: Today St Peter does his work to not make Roger jealous. It's raining here. [08:29] TheMue, haha [09:17] TheMue: yo! [09:17] TheMue: it's dry here, at least [09:17] TheMue: but still grey [09:17] and cold [09:18] wrtp: Temperature dropped by about 10° and rain has replaced sun. [09:24] wrtp, good advice last night, I think it's much better: https://codereview.appspot.com/6163044/ [09:26] fwereade: cool. yeah, i think that does look cleaner, thanks. [09:58] wrtp, btw, I think it *is* a getCommand not a command -- but do you have a better name in mind? [09:58] wrtp, maybe commands should be commandGetters [09:58] * wrtp has another look [09:59] wrtp, alittle voice from my misspent youth is telling me I should use the word "factory", but I'm trying to pretend I can't hear it ;) [09:59] lol [10:00] fwereade: perhaps the word "new" should come into it somewhere [10:00] wrtp, not so sure, I feel that "new" binds too weakly [10:01] wrtp, "newCommands" sounds to me like it's doing something diferent [10:01] fwereade: newc ? cmdMaker ? plain "new" ? [10:01] cf ? :-) [10:01] wrtp, "constructors"? [10:02] fwereade: i don't mind the name "commands". it's just "getCommand" that reads oddly to me. [10:03] fwereade: it sounds more like it's getting a command that already exists rather than constructing a new one [10:03] wrtp, a method called "GetCommand" that chooses a "getCommand" helper and returns its result feels pretty natural to me [10:03] wrtp, hmm, yeah [10:03] fwereade: or that it's an actual command that gets something [10:03] wrtp, maybe the method itself should be NewCommand(string name) [10:04] fwereade: +1 [10:04] wrtp, then "newCommands" and "newCommand" feel good [10:04] wrtp, cool [10:04] thanks :) [10:04] fwereade: tbh in such a local context, a short variable name would read well, i think. [10:05] fwereade: then you have to look elsewhere for context, and you'll see the type of commands etc [10:05] wrtp, "c" it is then :) [10:05] fwereade: or "f"? given it's a function not a command. [10:05] wrtp, +1 [10:06] * wrtp likes "NewCommand" [10:18] fwereade: LGTM [10:18] wrtp, cheers === TheMue_ is now known as TheMue [12:17] wrtp, TheMue: should be utterly trivial: https://codereview.appspot.com/6184044 [12:18] *click* === asavu_ is now known as asavu [15:57] morning niemeyer [15:57] fwereade_: Hey man! [15:57] fwereade_: Good timing, I was "talking to you" :-) [15:58] niemeyer, dammit, is my astral projection wandering again? [15:58] niemeyer, what can I do for you? [15:58] fwereade_: Was just answering https://codereview.appspot.com/6124051/ [15:59] * fwereade_ reads... [15:59] niemeyer, fair enough :) [16:00] niemeyer, although I'm not sure how to communicate exit codes with that model [16:03] fwereade_: Hmm [16:04] fwereade_: I almost suggested before that the Main function in cmd should actually return an error instead, precisely for that reason [16:05] niemeyer, I'd kinda prefer to keep the exit codes meaningful really [16:05] fwereade_: Maybe that's what we should do.. there's a single situation we return an error different than 1, right? [16:06] niemeyer, Init errors return 2 [16:06] niemeyer, which could really be caused by anything under the general heading of parsing [16:06] fwereade_: Ok.. anyway.. we can easily get going by merely returning the code from Main [16:07] niemeyer, ok, sounds good [16:07] fwereade_: I've used both of these schemes in other applications before [16:07] fwereade_: Both the early dying and the return err [16:08] fwereade_: Returning errors generally ended up producing better code [16:08] niemeyer, except, hmm again: a code of 1 could come either from the "real" command, or from jujuc, and I think we only want to print jujuc help in the latter case [16:09] fwereade_: Let's please never print help unless the user asks for it [16:11] niemeyer, in practice I think that means either "never print help" or "complicate things an irritating amount to detect the cases in which the user asked for help and didn't get it from the real command" [16:11] fwereade_: I don't understand.. [16:12] fwereade_: If the user asked for help and didn't get from the real command, that's a bug in the real command [16:12] niemeyer, I'm thinking of the case in which we couldn't talk to the agent for whatever reason [16:12] fwereade_: "error: couldn't talk to the agent"? [16:13] niemeyer, that was the original intent: that the various things that can go wrong at this end print an appropriate error *and* an explanation of what's going on; otherwise everything is handled through the stuff returned by the agent [16:15] fwereade_: I understand, but I don't think explaining how things work every single time is necessary, or even nice [16:15] fwereade_: an error message explaining what went wrong should be good enough [16:16] fwereade_: ssh => invalid password; vs. ssh => invalid password + ssh is an application that requires a password to be set blah blah blah [16:18] niemeyer: so I should change this everywhere? [16:18] fwereade_: Do we have other locations doing the same thing? [16:18] fwereade_: I recall making the same comment elsewhere before [16:18] niemeyer, parse errors print help; others don't [16:19] fwereade_: I'm personally less concerned about those, but I don't mind if you decide to change them to behave that way as wel [16:19] l [16:19] niemeyer, jujuc seemed to me to be a special case in that an error out of jujuc itself implies extreme brokenness [16:20] niemeyer, personally I like getting help when I type utter gibberish [16:21] niemeyer, but that's by the by [16:21] fwereade_: Sure, if you want to keep showing help on parse errors, I personally don't mind either. That said, I don't *miss* the help, even in those cases [16:21] niemeyer, assumed context for printing help when jujuc is run in a bad environment is "users should only actually see this when they try to run jujuc on its own" [16:22] fwereade_: I prefer a one-liner error saying "error: you mistyped --gibberush" than "blah blah blah blah blah blah blah.. and you mistyped --gibberush" [16:23] fwereade_: "error: jujuc must be called from its symlinks"? [16:24] niemeyer, hmm, ok, how about printing that iff filepath.Base(os.Args[0]) == "jujuc" [16:25] niemeyer, and otherwise not offering help (except as supplied by remote commands ofc) [16:25] fwereade_: Sounds good [16:25] niemeyer, cool, thanks [16:29] fwereade_: Thank you, and sorry for not being very clear about those ideas before [16:36] niemeyer: hiya [16:36] niemeyer: any chance of a review of https://codereview.appspot.com/6159044/ ? [16:37] wrtp: Ah, sorry.. I half-reviewed it already but forgot to finish yesterday [16:37] niemeyer: np. i'm working on another s3 branch which i'd hoped would be independent but turns out it's not. [16:38] wrtp: LGTM [16:38] niemeyer: cool, thanks. [16:39] * TheMue will next propose the relation methods of topology. The code is even more compat than Py. Nice. [16:40] TheMue: Sweet [16:41] niemeyer: Yes, indeed. But I still would like you to tell me a bit more about the relations concept next week. Inside topology it's simple, but I'm still feeling unsecure regarding the relation manager etc. [16:45] TheMue: SOunds good [16:45] niemeyer: Thx [16:51] hazmat, were you able to take a look at lp:~jimbaker/juju/unit-rel-lifecycle-start-invoker ? (https://codereview.appspot.com/6131061/) [16:52] jimbaker, checking it now [16:52] hazmat, thanks [16:52] gn all [16:53] fwereade_: see ya tomorrowq [16:53] niemeyer: just discovered a slight oddity in the s3 package [16:53] niemeyer: is it right that the ETag has double-quotes around it? [16:54] niemeyer: the tests check that, but it seems odd [16:59] wrtp: I don't really have memories about that anymore, but if it's there, it means I've probably seen somewhere at least [16:59] niemeyer: yeah, it seems weird, but i'll add a bit of documentation for others to note. [17:00] wrtp: Worth testing [17:00] niemeyer: yeah, it bowled out an error in my test server. [17:05] Hmm, today my net is pretty unstable. [17:17] niemeyer: https://codereview.appspot.com/6185044 [17:18] niemeyer: sorry about the gofmt noise, but i think it's easy to see when a file has only changed white space [17:24] right, good moment to stop. [17:24] see y'all tomorrow [17:29] wrtp: Cool [17:29] wrtp: have a good time [17:42] jimbaker, sorry got de-railed for scale test demo of juju on 10k nodes.. [17:54] hazmat, no worries [18:29] niemeyer, if you have a moment, I'm not sure what the issue is with contexts [18:30] fwereade_: I'm not sure either, so happy to talk if you're not sleeping yet :) [18:30] niemeyer, there is server.Context and cmd.Context which are entirely distinct [18:30] fwereade_: The basic question is: how come we have two contexts, and one of the is completely ignored? [18:31] fwereade_: Yes, and that's confusing.. why there are two contexts and why is one of them getting into the function without being used? [18:31] niemeyer, the cmd.Context isn't used if we happen not to use stdout/stderr/working-dir [18:31] fwereade_: It's quite possible that it's totally fine, but the fact I'm confused is at least an indicator that it'll not be obvious why that exists in a bit [18:32] niemeyer, I think/hope that the source of the confusion is the fact that we have 2 different typs in different packages whih have the same name and end up being used close to one another [18:33] fwereade_: It's more than that.. we have two different types, in different types, used for the same thing, and getting to the context in two different ways, with one of them being entirely ignored at times [18:33] s/in different types/in different packages/ [18:33] niemeyer, how are they being used for the same thing? [18:33] niemeyer, one of them is about th ee [18:33] fwereade_: Maybe I'm just confused then [18:33] * niemeyer looks at the code [18:33] niemeyer, ...the execution environment, and one of them is about the state we're working against [18:35] niemeyer, I haven't found it confusing myself *but* that's no doubt because I'm in an extremely privileged position there [18:36] niemeyer, the name "Context", now I think of it, is not much better than "DataManager" [18:36] fwereade_: DataManager is as good as Struct :-) [18:36] niemeyer, I had hoped the cmd.Context/server.Context distinction would be considered appropriately gotastic, but clearly that's not the case ;) [18:37] fwereade_: and the issue may come out of the naming indeed.. by definition, a thing executing in two contexts at the same time is unexpected [18:37] niemeyer, part of me wanted to call server.Context something like server.State, but then we hit the same issue with state.State [18:38] fwereade_: Their name is ok in isolation, but the moment you have two contexts at once, something feels wrong [18:39] fwereade_: The issue is partly in my head indeed, anyway [18:41] fwereade_: Don't worry about it.. the issue is less important than I though [18:41] fwereade_: We can find a better name later if necessary [18:41] fwereade_: I'll review the code again in light of your explanation, thanks [18:41] niemeyer, cool, thanks -- I was toying with explicit cmdCtx/serverCtx throughout, but that felt painful too [18:42] niemeyer, suggestions appreciated :) [18:42] fwereade_: I don't have any good suggestions either right now.. if I come up with something that you might like I'll post in the review [18:42] fwereade_: Thanks, and sorry for the noise [18:42] niemeyer, cheers [18:42] niemeyer, and no worries :) [18:43] ttyl [19:05] fwereade_: Ok, got a more concrete suggestion that might take away the minor confusion [19:05] fwereade_: Review is up, with an associated LGTM assuming you're happy with it too