/srv/irclogs.ubuntu.com/2012/11/20/#juju-dev.txt

fssniemeyer: ptal https://codereview.appspot.com/6823060/01:12
niemeyerfss: Will do, but tomorrow! :)01:12
fssniemeyer: np01:12
fss:-)01:12
fssniemeyer: time to sleep01:12
niemeyerfss: Yeah, here too01:13
fssniemeyer: see you01:13
fssniemeyer: adios01:13
niemeyerfss: Have a good one01:13
fssniemeyer: thanks, you too01:13
wallyworld_jam: hi, got time for a chat?05:42
jamsure wallyworld_05:42
jamwallyworld_: here or on mumble?05:42
wallyworld_mumble easier05:42
TheMueMorning.07:17
fwereade_TheMue, heyhey07:18
TheMuefwereade_: Hello.07:18
fwereade_TheMue, how's it going?07:18
TheMuefwereade_: Fine, having first progress with LXC.07:19
TheMuefwereade_: And you?07:19
fwereade_TheMue, not bad, kinda still drawing together the threads of everything I have to do, but getting there07:21
TheMuefwereade_: Oh, reminds me of Marks mail. Have to continue with it.07:21
fwereade_TheMue, yeah, me too :)07:22
TheMuefwereade_: At least I already entered my vacation. But not yet my Copenhagen travel costs.07:22
rogpeppefwereade_, TheMue: morning07:58
TheMuerogpeppe: Hiya.07:59
fwereade_rogpeppe, heyhey08:03
rogpeppefwereade_: i saw niemeyer mention consolidate-entity-watcher last night. is that a branch of yours? i couldn't see it anywhere.08:04
fwereade_rogpeppe, yeah, it also went in last night08:05
fwereade_rogpeppe, unit/machine/service watchers are now all just EntityWatcher08:05
rogpeppefwereade_: cool08:07
rogpeppefwereade_: i searched for "consolidate-entity-watcher" and it didn't find anything08:07
fwereade_rogpeppe, hum, I think it's -watchers08:11
fwereade_rogpeppe, https://codereview.appspot.com/685606008:11
rogpeppefwereade_: yeah, that's my point - i found it just now, but i didn't find it last night08:11
rogpeppefwereade_: gmail isn't so good at approximate searches08:11
fwereade_rogpeppe, ah, got you08:12
rogpeppefwereade_: really nice to see that go in, thanks for doing it!08:13
fwereade_rogpeppe, cheers, a pleasure :)08:13
fwereade_bah, I said I'd take over a branch of aram's but it's got a prereq I didn't spot08:35
TheMuefwereade_: Which one?08:42
fwereade_TheMue, https://codereview.appspot.com/6814108/ depends on https://codereview.appspot.com/6820112/08:42
TheMuefwereade_: Will take a look.08:43
fwereade_TheMue, I think they may actually be independent enough that I can just focus on the one I need; we'll see08:43
fwereade_TheMue, I don't think they need anyone else to look, I'm just grumbling :008:44
TheMuefwereade_: Hehe08:44
TheMuefwereade_: I've been involved in discussions about the second one.08:44
TheMuefwereade_: The changing of the firewaller lead to a breaking test.08:45
TheMuefwereade_: It's the test for the global mode.08:46
fwereade_TheMue, ah, yes, I overheard some of them but wasn't following closely08:46
fwereade_TheMue, that just increases my determination to avoid that branch if I can ;p08:46
TheMuefwereade_: :D08:46
jamwallyworld_: we're on mumble whenever you're back around09:00
fwereade_ok, this is really just starting to drive me mad09:26
fwereade_can anyone think of any problematic consequences to just changing the type of machine and relation id to string?09:26
fwereade_rogpeppe, TheMue: ^?09:32
rogpeppe fwereade_: there are few places where the relationship between machine id and instance id might become less clear09:32
rogpeppefwereade_: but in general i'm +109:33
TheMuefwereade_: Do we use them numerical, e.g. by auto-incrementing it for new instances?09:33
fwereade_TheMue, ah, hmm09:33
fwereade_TheMue, yes, but that shouldn't be a problem09:34
TheMuefwereade_: Then I see no problem. Typically I prefer alphanumerical identifier.09:34
fwereade_TheMue, rogpeppe: cool, thanks, I think I'll give it a go then :)09:35
TheMuefwereade_: old school for me is, that numbers should only be used for calculating :)09:35
rogpeppefwereade_: it'll be a fairly substantial job - juju status might be awkward09:35
fwereade_TheMue, sounds like a solid rule to me :)09:36
TheMuefwereade_: cheers09:36
rogpeppefwereade_: i'd be tempted to add a prefix that indicates the machine-id-ness of the id09:36
rogpeppefwereade_: but that would be bad for backward compatibility09:36
fwereade_rogpeppe, yeah, I don't *really* like the pure-number id but at least it makes it easy to distinguish in the places where there's ambiguity09:37
fwereade_rogpeppe, eg juju status, actually :)09:37
fwereade_rogpeppe, (I don't think the type change should be a big issue there... biggest consequences seems to be that we'll drop the jsonify func, which feels like a hack itself)09:39
rogpeppefwereade_: yeah, i think it should end up cleaner09:39
fwereade_rogpeppe, (although I might hold off until I have a word with niemeyer...)09:40
rogpeppefwereade_: maybe a good plan09:40
niemeyerMorning all!10:16
TheMueniemeyer: Morning.10:17
niemeyerTheMue: Yo10:18
dimiternniemeyer: morning10:21
fwereade_niemeyer, heyhey10:26
fwereade_niemeyer, what would be your reaction to an attempt to just turn all machine/relation ids into strings?10:26
niemeyerfwereade_: Hmm10:30
niemeyerfwereade_: I'd of course resist before you actually explain the idea :-)10:30
fwereade_niemeyer, this was primarily motivated by observing that AFAICT the services and machines watchers are trying to do the same thing, but actually don't10:31
niemeyerfwereade_: Trying to do the same thing in which sense?10:31
fwereade_niemeyer, watch a collection for life changes10:31
niemeyerfwereade_: So you're saying that if we made them the same type, we'd get rid of another watcher?10:33
fwereade_niemeyer, yeah10:33
fwereade_niemeyer, I also suspect that anther couple *might* collapse into nothingness as well but it's not entirely clear whether that's a winning move10:34
fwereade_niemeyer, I'd prefer not to get ahead of myself there ;)10:34
niemeyerfwereade_: I'd be fine with that.. it's been suggested before, but it was more of a gut feeling than a practical advantage10:34
niemeyerfwereade_: Although, hmm10:35
niemeyerfwereade_: There's some reasonable benefit in using ids in the database too, I guess10:35
niemeyerI mean, ints10:35
fwereade_niemeyer, I wouldn't be too opposed to that in principle, but I'm not sure how significant the benefit will be in practice... would yu expand, I might be missing something?10:36
fwereade_niemeyer, if it's significant then ofc it beats local convenience10:37
niemeyerfwereade_: Well, it's indeed hard to say how relevant it will be in practice, taking everything else into account, but there's some nice benefits of using ints in fields and indexes10:38
niemeyerfwereade_: 4B machines in four well-aligned bytes10:39
fwereade_niemeyer, how about units? if the cost of string keys is significant, we should maybe be thinking about int ids for everything...10:44
fwereade_niemeyer, we'll have roughly the same number of units as we do machines (at a minimum)10:44
niemeyerfwereade_: Units need composed keys?10:44
niemeyerfwereade_: Agreed10:44
niemeyerfwereade_: But is your argument that we should use the lowest denominator for all? :)10:44
fwereade_niemeyer, my argument is that using different types for different entity ids is unhelpful at the state level, because we end up with unnecessary complexity that's almost certainly significant enough to harbour bugs10:46
niemeyerfwereade_: I was referring to this, specifically:10:46
niemeyer<fwereade_> niemeyer, how about units? if the cost of string keys is significant, we should maybe be thinking about int ids for everything...10:46
fwereade_niemeyer, it may be that some aspect of some entity is enough at odds with this to sink the whole idea, but if so I don't yet see it10:47
niemeyerfwereade_: I'm still playing devil's advocate10:47
niemeyerfwereade_: Maybe we should change, but it's important to acknowledge those differences and take them into account10:47
fwereade_niemeyer, my argument is that we should use any type we can find that has acceptable tradeoffs across the board, but that we should ideally go with a single id type10:48
fwereade_niemeyer, sorry, that was poorly stated, hopefully still clearish10:48
niemeyerfwereade_: Yes, but I haven't seen many positive tradeoffs so far10:49
niemeyerfwereade_: The MachineWatcher has ~30 lines10:49
niemeyerfwereade_: ~40 maybe10:49
niemeyerfwereade_: What else are we obtaining by changing it?10:50
fwereade_niemeyer, the Machine*s*Watcher has ~110 and Service*s*Watcher has nearly as much10:50
fwereade_niemeyer, that's the only significant direct benefit I can see at the moment10:50
fwereade_niemeyer, but I have a suspicion that it will also make it possible to consolidate ServiceRelationsWatcher, ServiceUnitsWatcher, MachinePrincipalUnitsWatcher and the forthcoming UnitSubordinatesWatcher10:52
fwereade_niemeyer, all of which are/will do very similar things and have differences in implementation that I suspect are suboptimal10:52
fwereade_er, is there a ServiceUnitsWatcher10:52
fwereade_niemeyer, ah, there is, it's just not used10:53
niemeyerfwereade_: Okay, if you think it's useful, it's fine with me10:54
niemeyerfwereade_: I think rogpeppe had already raised that argument before for other reasons as well10:54
fwereade_niemeyer, awesome, thanks :)10:54
niemeyerfwereade_: (reusing channels)10:55
fwereade_niemeyer, there have certainly been little irritations related to it in the past10:55
fwereade_niemeyer, ah, yes, nice10:55
fwereade_niemeyer, (and then it would actually be trivial to reinstate EntityWatcher ids and thereby allow them to share channels if necessary10:56
TheMuelunchtime, biab10:58
rogpeppe niemeyer: morning!11:00
niemeyerrogpeppe: Heya11:01
rogpeppeniemeyer: i think this should be good to go now: https://codereview.appspot.com/6846066/11:15
niemeyerrogpeppe: Cheers11:16
niemeyerIt's about meeting time11:57
niemeyerI'll fire the hangout11:58
jamniemeyer: thanks, can you link it here?12:00
niemeyerhttps://plus.google.com/hangouts/_/500aec429367cf0688b60916ad5b255544d9bef812:00
niemeyerjam: ^12:01
jamdimitern, wallyworld ^^12:01
rogpeppefwereade_: meeting?12:02
fwereade_rogpeppe, joining12:02
niemeyerfwereade_: Coincidently, Matt (mattyw) has been doing some questions about how subordinates work this morning13:20
niemeyerfwereade_: I suggested hanging around here so we can add some freshness to our real-world use cases :)13:20
mattywI'll try to remember to hang around here for the rest of the week as well13:22
fwereade_niemeyer, ah, cool13:22
niemeyerrogpeppe: CL looks good13:49
rogpeppeniemeyer: cool13:49
niemeyerrogpeppe: One question: it looks like the generation of certs doesn't match the use of certs now on the config side of things?13:49
rogpeppeniemeyer: i'm working towards reconciling the two13:50
niemeyerrogpeppe: Super13:50
rogpeppeniemeyer: but i'm interested what particular aspect you're thinking about there13:50
niemeyerrogpeppe: The single pem vs. multiple pems13:51
rogpeppeniemeyer: that's actually the same in both state info and config. the place it's different is in Bootstrap13:51
rogpeppeniemeyer: and cloudinit.Config13:52
rogpeppeniemeyer: i'm talking about Environ.Bootstrap, not juju.Bootstrap BTW13:52
niemeyerrogpeppe: That's what I was talking about.. it's Bootstrap that generates the certs, isn't it13:52
rogpeppeniemeyer: juju.Bootstrap currently generates two certs, but we're moving towards making it generate only one - the cert and key for the bootstrap instance13:53
rogpeppeniemeyer: the root cert and key are going to be generated in environs, i think13:53
niemeyerrogpeppe: That's not what I was talking about, but why?13:54
niemeyerrogpeppe: Why would we change the place the cert is generated?13:54
rogpeppeniemeyer: that's what we were talking about yesterday13:54
rogpeppeniemeyer: (or was it the day before?)13:54
niemeyerrogpeppe: I don't know13:54
niemeyerrogpeppe: I don't recall about either13:54
niemeyerrogpeppe: Why would we change the place the cert is generated?13:54
rogpeppe[13:46:25] <niemeyer> rogpeppe: Why is that different from Bootstrap?13:56
rogpeppe[13:47:04] <niemeyer> rogpeppe: The whole thing is starting to feel a bit hackish, to be honest..13:56
rogpeppe[13:47:21] <niemeyer> rogpeppe: We have a mechanism to read the environment data from disk abstracted away13:57
rogpeppe[13:47:34] <niemeyer> rogpeppe: and then we take that data, and go back to disk to look for more13:57
rogpeppe[13:47:46] * niemeyer looks at some code13:57
rogpeppe[13:48:18] <rogpeppe> niemeyer: we need to be able to save something to disk and then recover that, and that's what this is about13:57
rogpeppe[13:49:04] <rogpeppe> niemeyer: the thing that i think is most hackish is the interface in the juju package, which really shouldn't know about $HOME stuff really, probably.13:57
rogpeppe[13:49:12] <niemeyer> rogpeppe: This looks like the wrong place to be doing this13:57
rogpeppe[13:49:15] <niemeyer> rogpeppe: Exactly13:57
niemeyerrogpeppe: Indeed, thanks, the point is $HOME13:57
niemeyerrogpeppe: So, my original point wasn't about that, though13:57
niemeyerrogpeppe: I was referring to the fact Bootstrap seems to generate a single PEM file, while config uses two, of different names13:58
niemeyerrogpeppe: But I guess you'll sort that out at the same time13:58
rogpeppeniemeyer: yeah, that's because mgo uses a single one, and that's how the one in Bootstrap is used, but we can easily make bootstrap take two arguments and split the field in cloudinit.Config too13:58
rogpeppeniemeyer: then cloudinit will just join them together13:59
niemeyerrogpeppe: mgo doesn't do anything about either..13:59
rogpeppeniemeyer: sorry mongod13:59
rogpeppeniemeyer: mongod expects a single file with them both in13:59
niemeyerrogpeppe: That's irrelevant as well, I think.. all of that logic sits at the client13:59
rogpeppeniemeyer: the whole point of the cert that's passed to bootstrap is that it's used by mongod, no?14:00
rogpeppeniemeyer: (i'm not saying that we shouldn't split it up for consistency's sake, though)14:00
rogpeppeniemeyer: to cert that's passed to Environ.Bootstrap, i mean, just to be clear14:01
niemeyerrogpeppe: It's irrelevant.. mongod never ever sees whatever we do at the client side14:01
rogpeppes/to/the/14:01
niemeyerrogpeppe: And mongod never ever sees the CA certificates14:01
rogpeppeniemeyer: i'm not talking about the CA certificates14:01
niemeyerrogpeppe: The private key and the cert file are handled as separate files in the configuration14:01
rogpeppeniemeyer: i'm not talking about those either14:02
niemeyerrogpeppe: Yes, but that conversation started because of what I was talking about, I think :-)14:02
niemeyerrogpeppe: If you want to go in other directions we can do that too, but then we have to agree to change subjects :)14:02
niemeyer<niemeyer> rogpeppe: One question: it looks like the generation of certs doesn't match the use of certs now on the config side of things?14:02
rogpeppeniemeyer: sorry, i thought i'd confirmed that you were talking about Environ.Bootstrap14:04
rogpeppeniemeyer: i agree about juju.Bootstrap - that argument is going away14:04
rogpeppeniemeyer: and it'll come from the Environ14:04
rogpeppeniemeyer: so all those []byte(testing.RootCertPEM + testing.RootKeyPEM) will go away too14:05
niemeyerrogpeppe: environ.Bootstrap doesn't generate certificates, so the whole discussion wouldn't make sense14:05
niemeyerrogpeppe: But cool, I guess we're in sync now14:05
rogpeppeniemeyer: yup14:05
rogpeppeniemeyer: i'd like to have a chat about how we want the generation of certs and environments.yaml to work from the user's p.o.v.14:07
rogpeppeniemeyer: at some point, hopefully soon14:07
niemeyerrogpeppe: Cool14:07
rogpeppeniemeyer: here's one possibility: http://paste.ubuntu.com/1372497/14:13
niemeyerrogpeppe: I still prefer the plan we discussed yesterday14:13
niemeyerrogpeppe: On bootstrap, generate a sample file14:14
niemeyerrogpeppe: if it doesn't exist14:14
niemeyerrogpeppe: For now, ec2 info only, uncommented14:14
rogpeppeniemeyer: the problem i see with that is that the sample config is for one provider, which may not be the one that the user wants14:14
niemeyerrogpeppe: Some day, local uncommented, plus everything else commented14:14
niemeyerrogpeppe: There's only a single provider today14:14
rogpeppeniemeyer: and when they want another one, there's no way of getting that14:14
rogpeppeniemeyer: there will be many providers14:15
niemeyerrogpeppe: Either the user wants that, or she/he may go home14:15
niemeyer<niemeyer> rogpeppe: Some day, local uncommented, plus everything else commented14:15
niemeyerrogpeppe: We can have all of them14:15
niemeyerrogpeppe: Commented out14:15
niemeyerrogpeppe: Plus local uncommented14:15
niemeyerrogpeppe: Which is ubiquitous14:15
rogpeppeniemeyer: BTW the current python doesn't generate any commented lines14:15
niemeyerrogpeppe: Not sure how that's relevant14:16
rogpeppeniemeyer: just saying14:16
niemeyerrogpeppe: Me too :)14:16
rogpeppeniemeyer: what happens if a new provider is added and the user wants a sample config for that?14:17
rogpeppeniemeyer: it seems pretty hackish to require them to remove ~/.juju/environments.yaml in order to get a sample14:17
niemeyerrogpeppe: Jeshh.. can we please get something going?14:18
niemeyerrogpeppe: We have ONE PROVIDER TODAY14:18
niemeyerrogpeppe: WriteFile(sample)14:18
niemeyerdone!14:18
rogpeppeniemeyer: ok. i'm just wondering whether to have it as an entry point to EnvironProvider or not14:18
niemeyerrogpeppe: We can improve the situation ad-infinitum14:18
rogpeppeniemeyer: e.g. EnvironProvider.SampleConfig() *config.Config14:19
niemeyerrogpeppe: I could literally have implemented the feature we want today and pushed for review in the time we took to discuss this so far14:19
niemeyerrogpeppe: We can improve APIs and make it super fancy once we have 10 providers and 10 million users14:20
rogpeppeniemeyer: so you're happy with this behaviour happening on any juju command? (i thought it might be better if it was only done on bootstrap)14:20
niemeyer<niemeyer> rogpeppe: On bootstrap, generate a sample file14:21
rogpeppeniemeyer: ok. python version does it on any command.14:21
niemeyerrogpeppe: I'm happy with either, though.. whatever users find the most convenient14:21
niemeyerrogpeppe: Ask Jorge14:21
rogpeppeniemeyer: will do14:22
niemeyerAlright, lunch time here14:23
rogpeppeniemeyer: can you remind me of his irc nick?14:23
rogpeppeniemeyer: enjoy!14:23
niemeyerrogpeppe: jcastro14:23
rogpeppeniemeyer: thanks14:23
rogpeppeniemeyer: submitted, thanks. which means i can propose the next in line: https://codereview.appspot.com/685505414:34
rogpeppes/propose/re-propose/14:35
TheMue*: anyone interested in the first lxc steps? https://codereview.appspot.com/6852065/ and https://codereview.appspot.com/6853075/14:36
rogpeppeTheMue: looking14:39
TheMuethx14:39
rogpeppeTheMue: any particular reason that run returns bytes.Buffer rather than []byte ?14:43
TheMuerogpeppe: Oh, no, took it from the original command that I used before wrapping it. Yes, a change makes sense.14:44
dimiternwhy is an Instance Id string and a machine ID - int?15:06
TheMuedimitern: Can you scroll about 5h back? There's a discussion about this topic and possibly harmonizing them between fwereade_ and niemeyer.15:08
fwereade_dimitern, I'm just making machine IDs into strings as we speak :)15:09
dimiternTheMue: I see15:09
dimiternfwereade_: Cool! :)15:09
fwereade_it's rather uglier than I imagined, but hey ho15:09
dimiternfascinating! That seems like a massive simplification15:17
niemeyerdimitern, fwereade_: FWIW, having instance id and machine id having different types was actually a plus :)15:20
rogpeppeTheMue: you've got a review15:20
dimiternniemeyer: to define better, fine-grained architecture?15:20
niemeyerdimitern: No, because they're not interchangeable15:21
TheMuerocheers15:21
TheMuerogpeppe: cheers *grmpf*15:21
rogpeppeniemeyer: yeah, it's a pity. we *could* make instance ids have their own type actually. that might be better.15:22
dimiternniemeyer: I see. But nevertheless, the polymophism in this case still rocks..15:22
rogpeppetype InstanceId string15:22
rogpeppein environs15:22
rogpeppethen we'd get the best of both worlds15:23
dimiternrogpeppe: how about MachineId15:23
rogpeppedimitern: no15:23
rogpeppedimitern: machine != instance15:23
rogpeppedimitern: and that's why it's a good idea to keep the types separate - it's a very easy category error to make15:24
rogpeppefwereade_: what do you think?15:24
dimiternrogpeppe: like passing one instead of the other?15:24
rogpeppedimitern: yeah. thinking they mean the same thing15:24
dimiternrogpeppe: that's sounds very useful, Go-ish :)15:25
rogpeppedimitern: yeah, it's a useful thing to be able to do15:25
fwereade_rogpeppe, honestly, I'm not sure the problem is really in the types15:25
rogpeppefwereade_: why are you changing the types then?15:25
dimiternrogpeppe: my concern was the int/string distinction, while despite both being strings, having separate types is even better15:25
fwereade_rogpeppe, the problem is that we have instance and machine ids, and they sound like the same thing until you come to understand the model15:26
rogpeppefwereade_: exactly. which is why it's useful to distinguish them by giving them different types15:26
rogpeppefwereade_: even if the underlying type of both of them is string15:26
fwereade_rogpeppe, I dunno -- what's the distinction here between that and, say, giving a unit name its own type?15:27
fwereade_rogpeppe, that will prevent people passing service names when they mean unit names15:27
rogpeppefwereade_: because we want to be able to use entity ids in an interchangeable way15:27
dimiternfwereade_: probably it's not as easy to mix up unitids with others15:28
rogpeppefwereade_: otherwise why are you making machine id into a string?15:28
fwereade_rogpeppe, sorry [hone15:28
rogpeppefwereade_ has an alien phone :-)15:28
dimiternthe new iGotcha ]I[15:29
dimiternok, so in the environs/interface.go there is this comment: http://bazaar.launchpad.net/~gophers/juju-core/trunk/view/head:/environs/interface.go#L11315:31
dimiterncan somebody give me an example of the described inconsistency of the provider?15:31
niemeyerfwereade_: Slightly more sensitive in that case, since they both are seen as a "machine" in some senses.. not suggesting it's a show stopper at this point, though15:32
rogpeppeniemeyer: what do you think of giving instance id its own type?15:33
rogpeppedimitern: for example, if you launch a machine, you might not be able to see any information on that machine for a while15:34
dimiternrogpeppe: you mean, e.g. calling StartInstance successfully, then calling AllInstances won't return the new machine in the result set?15:35
rogpeppedimitern: or if you change something in a storage, that change might not be visible for a while. or it may be visible, then become invisible again.15:35
rogpeppedimitern: yup15:36
rogpeppedimitern: or it might15:36
rogpeppedimitern: no way to know15:36
rogpeppedimitern: it depends (presumably) on which server you're talking to.15:36
dimiternrogpeppe: but that's the eventual consistency thing of the cloud15:36
rogpeppedimitern: yeah15:36
niemeyerrogpeppe: It's an interesting idea, but I'd rather see how we feel about the machine id change on itself first15:36
rogpeppeniemeyer: i'd prefer to keep the types consistently separate actually15:37
rogpeppeniemeyer: i think that's easier to do than merge then separate.15:37
rogpeppedimitern: there's no way to get around it15:37
niemeyerrogpeppe: Let's please not change everything at once15:37
niemeyerrogpeppe: There's no reason to do that15:37
niemeyerrogpeppe: fwereade_ is suggesting a huge change15:37
rogpeppeniemeyer: i wasn't suggesting that15:37
niemeyerrogpeppe: Which doesn't require anything *else* in addition to it15:38
rogpeppeniemeyer: i'd do the int->InstanceId change first15:38
niemeyerLet's have a look at it, and ponder calmly15:38
niemeyerNo hurry there15:38
rogpeppeniemeyer: i mean string->InstanceId of course15:38
rogpeppeniemeyer: then int->string15:38
niemeyerrogpeppe: Yes, and I mean int=>string, *stop*, *think*15:38
rogpeppeniemeyer: the problem is that makes it harder to move on from there because then we've got instance id and machine id being identical15:39
niemeyerrogpeppe: They'd have the same type, which is not a show stopper at all15:39
rogpeppeniemeyer: sure, it's not hard. it's just a little harder.15:40
niemeyerrogpeppe: It's no harder.. instance id is completely independent15:40
niemeyerAnyway, unfortunately I need to step out now for the daily errand I mentioned over email15:41
niemeyerTomorrow is the last day15:41
niemeyerBack later to continue15:41
fwereade_rogpeppe, sorry, back, that took longer than expected15:50
fwereade_rogpeppe, I want to change ids to strings primarily so we can strip out some of the watcher duplication (within which bugs will lurk, I think)15:51
rogpeppefwereade_: that's what i thought15:51
fwereade_rogpeppe, I'm not necessarily opposed to a special InstanceId type but it is completely orthogonal AFAICT15:51
rogpeppefwereade_: yeah - i just wondered if it might be better to keep the two types rigorously separate through the change process15:52
fwereade_rogpeppe, and honestly it feels to me akin to having `type MaxInt int; type MinInt int; type Range{Max MaxInt; Min MinInt}`15:52
rogpeppefwereade_: i.e. leverage the type system to make sure we don't mix 'em up at some point in this large change15:52
fwereade_rogpeppe, they're two different things15:52
rogpeppefwereade_: it's totally different from that15:53
rogpeppefwereade_: we never want to operate on an instance id and a machine id together15:53
fwereade_rogpeppe, they're both numbers; they both define one end of a range; if people don't understand ranges they might get it wrong15:53
rogpeppefwereade_: which is not the case for MinInt and MaxInt15:53
fwereade_we'd better separate them15:53
fwereade_but people might get it wrong! ;p15:53
rogpeppefwereade_: bad analogy15:54
fwereade_rogpeppe, ok, GrossProfit and NetProfit?15:54
rogpeppefwereade_: those are both numbers that can be used in similar ways15:54
rogpeppefwereade_: instance id and machine id can never be used in similar ways15:54
rogpeppefwereade_: it's more similar to the difference between rune and int15:55
fwereade_rogpeppe, I dunno -- by that token, just about every string we use should actualy be typed15:56
rogpeppefwereade_: i don't think so15:56
rogpeppefwereade_: how many of the strings we use represent a distinctive thing that doesn't make sense to be combined with other strings?15:57
fwereade_rogpeppe, don't get the "combined" bit -- is that a consideration? if so we'd better untype a bunch of things :)15:58
rogpeppefwereade_: i think the main consideration should be: does it work well as a separate type?15:59
fwereade_rogpeppe, I guess it will be pretty much opaque to juju itself, and basically only want to be translated on the way in/out16:00
rogpeppefwereade_: exactly16:00
rogpeppefwereade_: outside of the provider, it could be anything - it's entirely provider-defined.16:01
dimiternrogpeppe: well, if it's type InstanceId string it's not exactly provider defined16:01
fwereade_rogpeppe, so, ok, we get a change at a small amount of extra safety if we add an InstanceId type; but this remains independent of entity id considerations, right?16:01
rogpeppedimitern: the contents are, but yeah16:02
fwereade_dimitern, (yeah, indeed, I was wondering about non-string ones, but they should be trivial to translate anyway)16:02
rogpeppefwereade_: it does. except that i *think* that keeping the types separate throughout the change will make things easier.16:02
fwereade_rogpeppe, ISTM that machine and instance IDs rarely actually come into direct contact, but you certainly know that stuff betterthan me16:03
rogpeppefwereade_: i suspect there are a fair few places where it's only the type that makes it clear what's being returned (machine id or instance id)16:04
rogpeppefwereade_: i'm sure i've written a few such things myself (i'm returning an int - it's obvious i must be returning a machine id not an instance id)16:04
rogpeppeafk for 10 mins16:09
rogpeppeback16:16
TheMuerogpeppe: Thx for your review, it has been very valuable and I simplified the whole stuff a lot.16:35
rogpeppeTheMue: cool16:35
fwereade_gents, I need to pop out for a while; calling it a day for now, but I'll probably be around again laterthis evening16:43
TheMueFunny, just detected that Sidney has DST but Brisbane not. So Dave and Ian have one hour difference.16:43
TheMuefwereade_: Enjoy.16:43
TheMuerogpeppe: Thanks again. ;)16:51
TheMueSo, I'm off for today, dinner time. CU tomorrow again.17:02
rogpeppeniemeyer: branch enabling on-demand certificate generation when certificate not found by config: https://codereview.appspot.com/6782094/18:06
rogpeppewhich brings me neatly to the end of the day18:07
rogpeppeg'night all18:07
rogpeppesee y's tomorrow18:07
=== rog is now known as Guest84948
=== negronjl` is now known as negronjl

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