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

hazmatjimbaker, you can do the encode/decode on the server00:57
hazmatjimbaker, the transport is irrelevant to maintaining the format00:57
hazmatie transfer in yaml, encode/decode cycle in json00:58
jimbakerhazmat, i will see if i can make that work03:07
jimbakerhazmat, in principle this makes sense, it just is the approach i first tried. however, the code is much more refactored, so it's possible this is simpler to do03:07
fwereademorning davecheney06:06
davecheneyfwereade: howdy06:15
fwereadedavecheney, how's it going?06:16
davecheneyfwereade: good; so we're back to lisbon in july i hear06:18
fwereadedavecheney, yeah, that's my understanding06:18
fwereadedavecheney, is that better or worse for you?06:18
davecheneyfwereade: probably better, although I dunno if mark will like the prices, 2700 euro06:19
davecheneywell, between 2000 and 270006:19
fwereadedavecheney, cool -- and, well, the cheapest I saw for me to POA was >2000 euros06:19
davecheneythat is what i decoded from the travel agent blather06:19
davecheneyfwereade: it was more the 45 hours travel that didn't do it for me06:19
* fwereade winces *hard*06:20
davecheneyi think it went SYD -> the frikken moon -> POA06:20
fwereadedavecheney, haha06:20
davecheneythen a return trip via saturn06:20
davecheneywhich is insane, because it's shorter to go SYD -> Perth -> POA, than SYD -> LAX06:20
davecheneygeographically speaking06:20
fwereadedavecheney, the longest I've had to deal with (without incorporating a bed, at least) is probably *just* over 24 hours door to door06:21
fwereadedavecheney, and that was bad enough06:21
fwereadedavecheney, if you have flights that long though it may well be worth checking with marianna if you can have an overnight break in an airport hotel06:21
davecheneyfwereade: yeah, save my back06:22
fwereadedavecheney, I wasn't expecting that, but my very first trip had what would otherwise have been 8 hours on the floor of an airport06:22
davecheney16 hours LAX -> SYD06:22
fwereadedavecheney, swapping that for 5 hours in an actualy bed was very much a good move06:22
davecheneywas pretty sore by the end of it06:22
fwereadedavecheney, I bet06:22
davecheneyoh, and a return trip to POA was > 5,000 AUD, which was the 'piss off, we don't want to do it price'06:23
fwereadedavecheney, crikey06:26
fwereadeheya TheMue06:31
TheMuefwereade: Morning06:41
fwereaderog, TheMue: I would welcome opinions on https://codereview.appspot.com/6317043 (which, in hindsight, reads somewhat passive-aggressively, but I don't really know what to do about that :/)07:32
TheMuefwereade: Passive-aggressively?07:32
fwereadeTheMue, http://en.wikipedia.org/wiki/Passive%E2%80%93aggressive_behavior07:33
fwereadeTheMue, the problem is perhaps that I didn't express the issues I had with that approach in those terms during the discussion07:34
fwereadeTheMue, in my mind, the assumed context was "it's obvious that this is a lot more work", but that may in fact not have been obvious to all participants07:35
TheMuefwereade: Understand07:36
=== TheRealMue is now known as TheMue
TheMuefwereade: From a technological perspective LGTM.07:42
TheMuefwereade: But I need more background to understand the problem you want to solve.07:43
TheMuefwereade: Best in some simple words for a "newbie". ;)07:43
rogfwereade: i see what you mean :-)07:44
rogfwereade, TheMue: mornin' BTW07:45
TheMuerog: Morning07:58
roghmm, my computer just crashed07:58
rogif anyone said anything after my "mornin' BTW", i missed it07:58
TheMuerog: Only my greeting after you re-entered the channel08:01
rogTheMue: cool08:01
fwereadeTheMue, rog: rewritten; is it more helpful now?08:05
fwereadeTheMue, btw, wrt what you said earlier, that CL is IMO entirely unnecessary, and that's the reason I was whining so extravagantly in the description08:07
fwereaderog, TheMue: btw, do you have a moment to discuss how I should test charm store access, from outside the charm package, without hitting the real charm store?08:08
rogfwereade: sure08:09
fwereaderog, ok... short of screwing up /etc/hosts, what *can* I do? :)08:10
rogfwereade: is the charm store address hard-coded into the charm package?08:11
fwereaderog, yeah08:11
rogfwereade: well, one possibility would be to make it an exported variable that could be changed by testds08:11
fwereaderog, sure; it just feels last-resorty08:12
rogfwereade: of course then you've got to run some kind of your own server08:12
TheMuefwereade: After reading the changed description it's more clear, thx.08:12
fwereaderog, AIUI niemeyer is rather against exposing that at all08:12
fwereaderog, as it is it's a const (because that was my understanding of niemeyer's perspective on the charm store)08:13
TheMuefwereade: If the address is returned by a function we could introduce a package local variable switch by a function SetTestMode(bool).08:14
rogfwereade: so what functionality are you needing to test exactly?08:14
TheMuefwereade: When setting it to true the function returns localhost.08:14
fwereaderog, that we can deploy a charm from the charm store08:14
fwereaderog, I think there *may* be a case to be made that InferRepository is properly tested, and both local repos and the charm store are properly tested08:15
fwereaderog, and that therefore hitting just one of the InferRepository code paths is actually adequate08:16
fwereaderog, but my go-testing-fu is not adequate to determine whether this is defensible08:16
rogfwereade: that sounds like it may be reasonable.08:16
rogfwereade: there's no point in testing the same functionality in two different places08:16
fwereaderog, yeah, that's what my heart says08:17
fwereaderog, but it was hard work forcing myself to test everything a million different times in python when I joined the project08:18
fwereaderog, and I haven't quite figured out how the prevailing rules have changed08:18
fwereaderog, ok, I'll propose it as-is with an explanation08:19
rogfwereade: seems reasonable.08:19
TheMuerog, fwereade: Different topic, did you already booked you flights?08:46
rogTheMue: yes, i've booked. arriving late sunday evening.08:46
fwereadeTheMue, ah yeah, I crash-stopped the booking the other day and haven't redone it yet08:47
fwereadeTheMue, ty for reminder08:47
TheMuefwereade: np ;)08:47
TheMuerog: Yes, I'll arrive at 21:45 and depart on Sat at 9:10.08:48
* TheMue only hopes he's now right with location and date :D08:50
rogfwereade: when you say "we discard the actual data and retain only the version." which code are you referring to?09:21
rogfwereade: or is this stuff as yet to be written?09:21
fwereaderog, the python, and the proposed code09:21
rogfwereade: so, in your view, it would be better to have a ConfigNodeWatcher or something like that?09:22
rogfwereade: that passes the settings along as they change09:22
fwereaderog, well, I don't think we need anything other than a map[string]interface{}09:22
fwereaderog, except hmm no09:23
rogfwereade: no?09:23
fwereaderog, blast, I haven't fully thought through the cross-relation settings-settings09:23
rogfwereade: that, i think, might have been part of gustavo's point09:24
TheMueSo, added the flight data to the wiki page.09:24
rogfwereade: but explain, please.09:24
fwereaderog, I'm just mainly thinking that there is no reason whatsoever for settings of relations of *other* units to be writable at all09:24
fwereaderog, offering the opportunity to do do so can only lead to bugs and confusion09:24
rogfwereade: why does setting *writing* make any difference to what we're talking about, which is *reading* settings, no?09:24
fwereaderog, maybe it's just a slight discomfort with ConfigNodes used in read-only contexts09:25
fwereaderog, (and a ConfigNode can be refreshed, too, which doesn't fit my idea of what we should be doing)09:26
rogfwereade: you could return a ConfigNode with a nil zk :-)09:26
fwereaderog, heh, that could work :)09:26
rogfwereade: but tbh, why does it matter? we're not going to use it to set values.09:27
TheMuerog: Not nice, better an own type.09:27
fwereaderog, but actually, it's not an issue anyway -- you'll never see changes of your own unit's relation settings09:27
rogfwereade: a config node represents a node with settings. we can choose not to write to it.09:27
fwereaderog, so nothing we are ever watching ever has any reason to be anything other than read09:27
rogfwereade: i'd be happy if it was <-chan map[string]interface{} too.09:28
rogfwereade: is there a problem with that?09:29
fwereaderog, and IMO we shouldn't even offer the opportunity to write it or update it, for similar reasons to those people use to justify public/private distinctions in code09:29
fwereaderog, I'd like that09:29
fwereaderog, ok, people can still write to a map[string]interface{} but at least they have no way of screwing up Zk state by doing so09:29
TheMuefwereade: Otherwise just do a little type struct { data map[string]interface{} } with a Get(string) interface{}. So there's no chance.09:30
fwereadeTheMue, indeed, that would work nicely09:31
rogTheMue: nah, let them use the map directly.09:31
rogTheMue: there's no harm in writing to it.09:31
rogTheMue: and then it's easy to range over, etc09:31
fwereaderog, in general my problem is simply with discarding well-sequenced information just so we can approximately reconstruct it later, with additional code to make sure the sequence breaks are less common than they might be09:32
rogi'd say either use a map, or a ConfigNode, but not something in between09:32
TheMuerog: No harm to ZK, yes. OK, and the range may be an argument.09:32
rogTheMue: an argument?09:33
fwereaderog, I'm not even saying this leads to perfect consistency (config-get is still out of sequence), but it's more consistent with less code and I just don't see the downside09:33
TheMuerog: For using the map directly.09:33
rogfwereade: i definitely don't see the point in a version watcher.09:33
fwereaderog, ok, there is a downside: we will store more data locally on the nodes09:33
rogfwereade: we've got to get that data anyway, right?09:34
fwereaderog, that doesn't seem to me to be a strong argument for all the extra complexity :)09:34
fwereaderog,  indeed09:34
TheMuerog: The ssh.go in state is by you, isn't it?09:35
rogfwereade: and the version watcher is fetching all the content anyway.09:35
fwereaderog, yeah09:35
rogTheMue: no, that's me09:35
fwereaderog, this is rather my point :)09:35
TheMuerog: You *are* the ssh.go? ;)09:36
* rog blushes09:36
fwereadeTheMue, ssh, we don't want reporters involved09:36
TheMue;)09:36
rogTheMue: i think you meant to say "You are *the* ssh.go?" :-)09:37
TheMuerog: There are several fmt.Printf() in it, are they still needed?09:37
rogTheMue: erp09:37
rogTheMue: i don't see any fmt.Prints09:37
rogTheMue: i see log.Printfs09:38
TheMuerog: Oh, my mistake, just seen log. Sh**!09:38
TheMuerog: So here the prefix "state:" is also still ok.09:38
rogTheMue: they're probably a little excessive tbh, but i find them useful for the time being. perhaps they should be log.Debugf's09:38
rogTheMue: yeah.09:39
TheMuerog: I'm adding the errorContextf() so I found them and thought it would be debugging code. But in the log it makes sense.09:40
* rog goes downstairs to get a bowl of cereal09:40
fwereaderog, I was just wondering some more about MachineUnitsWatcher10:02
rogfwereade: uh huh?10:02
fwereaderog, as you point out, we can't make a *Unit from a deleted unit10:02
fwereaderog, but how are we keeping track of the things on the other end? might unit names be a better thing to pass around than units?10:03
rogfwereade: i suggested that originally, but gustavo didn't like it10:03
fwereaderog, isn't that how the client will be referring to the units in the first place?10:03
rogfwereade: and actually, he's right10:03
fwereaderog, bah, ok10:03
fwereaderog, go on10:03
rogfwereade: because if you look at the container API, it's phrased in terms of *Units10:04
rogfwereade: which seems nice10:04
fwereaderog, ah, ok, that does make sense10:04
rogfwereade: although actually it might only use 'em for their names10:04
fwereaderog, I kinda suspect it would ;p10:05
fwereaderog, I have an analogous situation I would welcome input on10:05
fwereaderog, ServiceRelationsWatcher10:05
rogfwereade: yup. but... it's entirely possible that it might use more info from the unit for deployment in the future.10:05
fwereaderog, yeah, could be10:06
rogfwereade: although then we've got the out-of-date info problem, potentially.10:06
rogfwereade: similar thing with ServiceRelationsWatcher, presumably?10:07
fwereaderog, yeah; specifically I suspect we'll have a map[something]*RelatedUnitsWatcher that I'll want to remove watchers from (and stop them) as the service leaves relations10:08
rogfwereade: so the ServiceRelationsWatcher is maintaining several watchers?10:09
fwereaderog, I don't *think* it makes sense to use actual *Relations as keys (I should probably reread the spec and find out exactly what it takes to be usable as a map key)10:09
rogfwereade: any pointer can be a map key10:10
rogfwereade: (anything that defines equality can be a map key)10:10
fwereaderog, no, the unit agent is maintaining several watchers which it starts/stops in response to the ServiceRelationsWatcher's changes10:10
fwereaderog, ok, so actually I should be doing exactly what you're doing10:10
fwereaderog, and define equality on Relations10:11
rogfwereade: equality is defined on any pointer10:11
rogfwereade: (the pointers are compared)10:11
rogfwereade: you can't "define equality" on something10:11
fwereaderog, ok, then that's surely not what I want10:11
fwereaderog, so I had thought, my misinterpretation of your comments gave me hope10:12
rogfwereade: what defines a relation in this context?10:12
fwereaderog, the endpoints10:12
rogfwereade: i.e. what information would you put in a key?10:12
fwereaderog, hold on a sec10:12
fwereaderog, what do you do in the machine agent when it comes up after an unexpected exit and wants to take down a container for a unit that no longer exists?10:13
fwereaderog, how do you create the *Unit in that case?10:13
fwereaderog, I have to solve the same problem in the unit agent with *Relations, I think10:14
rogfwereade: there's no *Unit in that case10:14
fwereaderog, how do you deal with it then?10:14
rogfwereade: i have to look at running containers10:14
rogfwereade: and see which of them do or don't correspond with current *Units10:14
fwereaderog, and somehow find out what *Units... hmm, ok10:14
rogfwereade: when we come up after an unexpected exit, we will never see units deleted.10:15
fwereaderog, and how do you determine correspondence? by name, I presume?10:15
rogfwereade: yeah, probably.10:15
fwereaderog, yeah, I'm talking about purely at the agent level, when it has to diff last-known state against what the watcher says is current10:15
fwereaderog, hold on10:16
rogfwereade: depends how you store last-known-state10:16
fwereaderog, can you give me an example of when we might want to know anything other than unit name to set up a container?10:16
rogfwereade: perhaps the unit's service might have settings that influence how the LXC container is allocated10:17
fwereaderog, isn't it a matter of setting up a named container, and poking in an upstart script to run `jujud unit foobar/17 ...`?10:18
fwereaderog, the unit agent itself should surely be responsible for everything else10:18
rogfwereade: i think things are a bit more involved when we're starting stuff within LXC containers10:18
rogfwereade: but yeah.10:18
fwereaderog, hmm, I fear I forsee another discussion-heavy afternoon :/10:19
rogfwereade: for your ServiceRelationsWatcher, what would you use that corresponds to the use of unit names in MachineUnitsWatcher?10:20
fwereaderog, that's what I'm asking10:20
rogfwereade: for the record, i'm off on holiday at the weekend for two weeks. so good to get the discussions in now...10:20
fwereaderog, I'm inclined to tweak describeEndpoints to sort the endpoints before joining them with " " and using that as a key10:20
fwereaderog, very good to, I'm off thu/fri10:21
rogfwereade: ah, so this is last day we're online together before ages away...10:21
fwereaderog, one of those irritating situations where, really, I love to spend time with my family but right now feels rather inconvenient10:21
rogfwereade: yeah10:21
fwereaderog, I suspect I'll be sneaking away to work at night occasionally, but I probably won't coincide with you10:22
rogfwereade: we'll be in the camper van in cornwall. almost entirely offline.10:22
fwereaderog, cool, have fun :)10:23
rogfwereade: you can use a struct as a key BTW10:23
rogfwereade: e.g. map[struct{e1, e2 string}] *Relation10:23
rogfwereade: so no need to join with " "10:23
fwereaderog, number of endpoints is abritrary10:24
fwereaderog, and I'm pretty sure I can't use a slice as a key, right?10:24
rogfwereade: that's right10:24
rogfwereade: number of endpoints is arbitrary pending more relation kinds than provides/requires/peer10:25
rog?10:25
rogfwereade: or is it not to do with that?10:25
fwereaderog, ATM only possibilities are 1 and 210:25
fwereaderog, that's exactly what it is10:25
rogfwereade: why can't you use the relation key as a key?10:26
fwereaderog, because I'm pretty certain maintaining the watchers is the unit agent's responsibility, and it doesn't feel like state is the right package10:27
fwereaderog, ahhhh hmmm maybe I could use the relation ident10:28
rogfwereade: we could add a Key method to Relation, i suppose.10:28
fwereaderog, we expose that to users, even though it's just a thinly-disguised key10:28
rogfwereade: relation ident?10:28
fwereaderog, I'd prefer not to go down that path unless we have to10:28
fwereaderog, for relation-0000000001, it's "relation-1"10:29
rogfwereade: that seems like a fine thing to use for a key10:29
rogfwereade: especially if it's exposed to users10:29
fwereaderog, we export JUJU_RELATION_IDENT in foo-relation-* hooks so the charm can distinguish between the different runtime relations using the foo charm relation10:30
rogfwereade: so maintaining a map of that to *Relation seems ideal to me10:30
fwereaderog, I was thinking more a map of that to RelatedUnitsWatcher10:31
rogfwereade: ok, sure.10:31
fwereaderog, which might hold a *Relation, but I'm not even sure that's needed past construction time10:31
* fwereade slopes off for cig/think time10:32
Aramhello everyone10:56
fwereadeAram, heyhey11:02
rogAram: hiya11:10
fwereaderog, fwiw, I was wrong: it's JUJU_RELATION_ID, not IDENT, and it's not relation-1: it's relation-name-according-to-service-111:40
rogfwereade: well, maybe that's a reasonable form for the unit agent to key it on too. because it's not going to hold any relations for any other services, right?11:41
fwereaderog, yeah, agreed, I just wanted to corrcet the misconceptions that might right now be burrowing through your brain :)11:42
rogfwereade: rooted out!11:42
fwereaderog, btw, should I do a quick CL for the MustErr watcher stuff we discussed yesterday?12:08
rogfwereade: sounds good12:08
fwereaderog, or are you on that?12:08
fwereaderog, cool12:08
rogfwereade: nope, i'm on unit agent tests currently12:08
fwereaderog, ah cool, what sort of thing?12:09
rogfwereade: oops, i meant machine agent12:09
rogdoh12:09
fwereaderog, ah rigt :)12:09
rogboring :-)12:09
rogfwereade: i'm just looking at cmd/juju/deploy.go BTW12:13
rogfwereade: i wondered if unpacking the charm in memory is a good idea12:13
rogfwereade: perhaps it would be better to store in a temp file instead12:13
fwereaderog, hmm, maybe so12:13
rogfwereade: and then for *charm.Bundle you could use the raw file as is12:14
rogfwereade: (no need to read twice, even)12:14
rogfwereade: 'cos charms could potentially be arbitrarily big12:15
fwereaderog, indeed so12:15
rogfwereade: i wonder if the charm.Charm interface should support BundleTo.12:18
fwereaderog, possibly, I'd have to think about it a bit :)12:19
rogfwereade: yeah, there may well be a good reason it's not there12:20
rogfwereade: at the very least, charm.Bundle could implement BundleTo :-)12:21
rogfwereade: although that kinda loses the point12:22
Aramrog: a new inferno fan: http://debu.gs/entries/inferno-part-2-let-s-make-a-cluster12:29
rogAram: not new - this is the guy that did the post about my shell.12:30
Aramah, yes.12:30
rogAram: but it's really nice to see him get excited about it all12:30
rogAram: it still excites me actually, but i've kinda left it behind12:30
rogAram: it's always great to see people play with toys you've made yourself.12:32
Aramyes, indeed.12:32
Aramhi niemeyer.12:32
niemeyerHello!12:33
rogniemeyer: yo!12:33
fwereadeniemeyer, heyhey12:36
fwereadeniemeyer, quick check: rick spencer is the head of my business unit, right?12:41
niemeyerfwereade: yep12:41
fwereadeniemeyer, cool, tyvm12:42
niemeyerfwereade: That reminds me of a guy back at Conectiva12:45
fwereadeniemeyer, oh yes?12:45
niemeyerfwereade: He ranted with someone online on an internal mailing list12:45
niemeyerfwereade: A couple of months after joining the company12:46
niemeyerfwereade: Then, right after sending his last email to the rant, he asks "Who's that silly guy!?"12:46
niemeyerfwereade: "It's your direct manager, dude.."12:46
fwereadeniemeyer, haha12:46
fwereadeniemeyer, in this case it's just because the travel agent wants to know12:47
niemeyerfwereade: Good thing you're not fighting with him yet! ;-D12:47
fwereadeniemeyer, but I hope this guy called "sabdfl" I've been insulting isn't anyone in particular ;p12:47
niemeyerLOL12:47
fwereadeniemeyer, btw, https://codereview.appspot.com/6298097 should be very quite, it's the mustErr stuff we discussed yesterday12:49
fwereades/quite/quick/12:49
niemeyerfwereade: Looking12:49
niemeyerI intend to to a good pass on everything now, btw12:49
niemeyerAram: Specially on yours long standing12:50
fwereadeniemeyer, cool, thanks :)12:50
Aramniemeyer: great, I have charms and units in the queue.12:51
=== TheRealMue is now known as TheMue
niemeyerfwereade: Done12:59
TheMueGrrr, router had a problem.13:00
fwereadeniemeyer, cool, thanks13:00
rogfwereade: did you run all tests before submitting https://codereview.appspot.com/6298097/ ?13:11
rogfwereade: i suspect it may have broken other packages13:12
fwereaderog, oh, crap, I may have just done state/...13:12
rogfwereade: yeah, i think it breaks cmd/jujud13:12
rogfwereade: though i haven't checked13:12
fwereaderog, I saw a ... in history, and...13:12
* fwereade hangs head in shame13:12
fwereaderog, you're absolutely right :(13:13
* rog goes for lunch in the blessed sunshine13:15
fwereadeniemeyer, observe screwup above; now I've fixed that and really truly properly verified it's unbroken, what would happen if I were to just lbox propose/submit again in the same branch?13:17
Arammeh, how can flight search technology be so bad.13:18
AramI mean, it's a trivial problem to solve.13:18
niemeyerfwereade: Won't work13:19
niemeyerfwereade: Just branch it over with "bzr checkout -b <original name>-fixup"13:19
niemeyerfwereade: and then "lbox propose; lbox submit"13:19
fwereadeniemeyer, cheers, will do13:19
Aramhmm, lbox propose (without -cr) uses the previously created cr on rietveld if it exists?13:20
fwereaderog, it appears to me that there's something up with the container tests as well...13:31
niemeyerAram: Yep13:31
Aramgreta13:31
Aramgreat13:31
niemeyerAram: The previous CL/merge proposal/whatever.. it updates whatever was done13:32
fwereaderog, http://paste.ubuntu.com/1050880/13:32
niemeyerAram: Well, almost.. it won't touch existing bugs13:32
TheMuefwereade: When I now start with ServiceRelation.AddUnit(), would I conflict with you?13:33
fwereadeTheMue, yes, please don't touch ServiceRelation, it's gone13:33
fwereadeTheMue, what are you planning?13:33
TheMuefwereade: I'm thinking of continuing with the relation methods, but I know you're doing some changes there.13:34
TheMuefwereade: Relation is gone, but ServiceRelation not yet.13:34
fwereadeTheMue, I would very much prefer if it we didn't step on each other relation-wise13:35
TheMuefwereade: That's why I asked before. ;)13:35
fwereadeTheMue, I have one CL out and a whole *bunch* of stuff waiting in the wings that wants only for agreement and go-ahead on the current bits13:35
fwereadeTheMue, there's a missing thing for state.Service though... we don't have any way to set service config13:36
fwereadeTheMue, and I think that then implies the whole format 2 business13:36
TheMuefwereade: OK, so I'll concentrate on other parts.13:36
niemeyerAram: Review sent13:36
Aramthanks13:36
niemeyerAram: Please let me know if you'd like to talk13:36
TheMuefwereade: OK, I'll take a look.13:36
niemeyerAram: Most points should be straightforward, though13:37
niemeyerAram: Glad to see this moving!13:37
Aramyes!13:37
TheMuefwereade: Todays code only has a get_config. What would you exactly expect from a SetConfig()? Isn't it normally done by retrieving the config, even if it's empty and then do changes and write it again?13:41
fwereadeTheMue, huh, you're perfectly right13:42
fwereadeTheMue, maybe a look at the format 2 stuff then if you're not too much averse to it?13:43
fwereadeTheMue, I had it planned but I seem to have got rather caught up in these bits, and I think it'll take me a few days to burn it down again13:43
TheMuefwereade: No problem, but where do I find infos about the format 2 stuff?13:45
fwereadeTheMue, just a mo; I'll collect what I can find for you13:46
TheMuefwereade: Thx.13:47
Aramniemeyer: right now in ZK we use incrementing integer id's for some thing, this has the property of making nice names (/machine-0, /unit-1-0, etc), but in MongoDB incrementing integers are nasty: http://www.mongodb.org/display/DOCS/How+to+Make+an+Auto+Incrementing+Field13:55
Aramso so we still want to go with incrementing integers in mongodb, or are random numbers fine?13:55
rogAram: flight search is actually turing complete: http://research.swtch.com/ita14:00
niemeyerAram: A machine id is an integer.. this isn't about MongoDB or ZooKeeper this is the API itself14:00
Aramniemeyer: I'm not debating whether it should be an integer or not, but whether should be an incrementing integer or a random one :)/14:01
niemeyerAram: It should remain an incrementing integer14:01
niemeyerAram: 9879872198729831 won't be great :)14:01
rogfwereade: ah! i see the problem. i've got jujud in my path, but you haven't.14:03
rogfwereade: i think the test should probably create a fake jujud14:03
rogfwereade: and set the path to point to it14:03
fwereaderog, sounds sensible14:03
Aramrog: I know the problem is computationally hard, my issue is that nobody publicly exports the flight data so people could build better 3rd party software than the crap software flight agencies provide.14:04
rogAram: true too14:04
niemeyerAram: Btw, how is it nasty to increment an integer in MongoDB?14:04
niemeyerAram: It's a trivial inc operation14:05
niemeyerAram: I suggest adding a "sequence" collection, where the _id is the collection name14:06
niemeyerAram: and having a sequence(name string) (int, error) helper in State14:06
Aramniemeyer: so in that link I sent you, you prefer option #1 to option #2?14:06
Aramthat's perfectly fine by me.14:07
niemeyerAram: I prefer to have a scheme as suggested above14:08
niemeyerAram: So we can reuse this next time we need a sequence number14:08
Aramyes, it's great.14:09
Aramok.14:09
Aramniemeyer: is it possible to create a new bzr branch, but use the same CR as an existing branch?14:18
niemeyerAram: nope14:18
Arambummer14:18
niemeyerAram: Well, maybe yes14:18
niemeyerAram: But why?14:18
Aramniemeyer: I did the mistake of using my trunk for the changes you reviewed, I ported them to a different branch, but that also created a new CR...14:19
niemeyerAram: I think it can be made to work:14:20
niemeyerWell, you already created a new CL, right?14:20
Aramyes14:20
niemeyerAram: Edit the description in the *new* merge proposal, and change the very last link of codereview to point to the proper place14:20
Araminteresting14:21
niemeyerAram: Then, mark the last branch as Rejected14:21
niemeyerAram:  and run "lbox propose" again14:21
niemeyerAram: It's not great to be doing this because the merge proposal will lose part of the history14:21
Aramok.14:22
niemeyerTheMue: Reviewed https://codereview.appspot.com/6300098/ again14:30
TheMueniemeyer: Just seen, thx14:30
niemeyerTheMue: please ping me if you repush soon and I'll have an immediate look so we can integrate14:30
niemeyerAram: Yeah, so we need to do something with this, since it's a copy of the last branch: https://codereview.appspot.com/6295103/14:31
TheMueniemeyer: Should be only a few moments.14:31
niemeyerAram: Are you doing the trick mentioned?14:31
Aramniemeyer: yes14:31
niemeyerAram: Super14:31
Aramniemeyer: how do I mark a branch as rejected?14:33
niemeyerAram: Sorry, not the branch, the merge proposal14:33
Aramsame question, where do I do that? :)14:33
niemeyerAram: I've marked it as Work In Progress14:34
niemeyerAram: In the merge proposal page itself14:34
* niemeyer finds14:34
niemeyer"Sorry, there was a problem connecting to the Launchpad server."14:35
Aramheh14:35
Aram"Delete proposal to merge"?14:35
Aramthis onw14:35
Aramone14:35
Aram?14:35
niemeyerAram: Done14:36
niemeyerAram: No need to delete14:36
niemeyerAram: It has some history there14:36
niemeyerAram: I've marked it as Rejected14:36
niemeyerAram: and added a note pointing out to the new MP14:36
Aramniemeyer: I think it worked, https://codereview.appspot.com/6304099 shows the correct branch.14:40
Aramniemeyer: but the issue is closed, is that expected?14:40
niemeyerAram: No, this doesn't happen automatically.. have you closed it by hand?14:46
niemeyerAram: lbox will only close on submit, which hasn't happened14:46
Aramniemeyer: ah, yes, sorry, my fault, forgot I closed it yesterday.14:46
Aramso I can open it again14:46
Aramdone14:46
Aramgreat14:46
niemeyerSuper14:46
Aramthanks again niemeyer14:47
TheMueniemeyer: So, had a text conflict to resolve first, but now it's in again.14:50
hazmatbcsaller, ping14:58
niemeyerAram: np!15:15
niemeyerfwereade: you've got a review on https://codereview.appspot.com/6312048/15:15
niemeyerfwereade: Let me know if you'd like to talk about it so we can get this in soonish15:15
niemeyerfwereade: I'll be stepping out for lunch in a moment15:15
niemeyerTheMue: Super, will look15:16
fwereadeniemeyer, I'd be happy to, reading now15:17
niemeyerTheMue: LGTM15:18
TheMueniemeyer: Thx, will submit it now.15:18
fwereadeniemeyer, ok, I think I agree with what you have there15:19
fwereadeniemeyer, sorry about the Id, it seemed like a good idea at the time :/15:19
niemeyerfwereade: Actually, LGTM with that in.. doesn't seem to be controversial in any way.15:19
niemeyerfwereade: No worries, I actually find the value of JUJU_RELATION_ID a good user-facing feature15:20
niemeyerfwereade: When sitting within the unit, that relation id makes perfect sense15:20
niemeyerfwereade: In state not so much15:20
fwereadeniemeyer, well, I'd love to get this in... but I guess I'm not sure what in particular differentiates the review from a LGTM-with-these-fixes one15:22
fwereadeniemeyer, most of your suggested changes seem sane and simple15:23
fwereadeniemeyer, which ones are subtler than I think at first glance?15:23
niemeyer<niemeyer> fwereade: Actually, LGTM with that in.. doesn't seem to be controversial in any way.15:23
niemeyerfwereade: ?15:23
fwereadeniemeyer, ah, ok, I see15:23
fwereadeniemeyer, so, you're OK with the implementation of Id as it is?15:24
niemeyerfwereade: Nope, with the suggested change15:24
fwereadeniemeyer, just the int then, cool15:24
niemeyerfwereade: func (r *Relation) Id() int15:24
fwereadeniemeyer, great15:24
niemeyerfwereade: (no error even.. we have the key)15:24
fwereadeniemeyer, indeed15:24
fwereadeniemeyer, ok, I'll fix those and submit15:25
fwereadeniemeyer, tyvm15:25
niemeyerfwereade: Thanks a lot15:25
fwereadeniemeyer, a pleasure :)15:25
niemeyerfwereade: I'm afraid I don't have enough time to cover it before lunch, but maybe we should talk about the VersionWatcher stuff afterwards15:38
niemeyerfwereade: I'm missing the context15:39
fwereadeniemeyer, I would be very keen to15:39
niemeyerfwereade: You seem unhappy with it, and I don't even know why we need it, which means we should talk :)15:39
fwereadeniemeyer, definitely -- I was trying to talk about it yesterday, but in hindsight I was framing the discussion all wrong15:39
fwereadeniemeyer, I'm not sure precisely when I'll be around this evening15:40
niemeyerfwereade: No worries15:40
niemeyerfwereade: We can talk whenever15:40
niemeyerfwereade: We have enough overlap for this to not be an issue15:41
fwereadeniemeyer, and I'm off after that until the end of the week -- *but* this is a subject dear to my heart atm so I will definitely track you down at some point before the weekend15:41
niemeyerfwereade: Oh, I didn't know that, ok15:41
fwereadeniemeyer, (it is a pleasure to see my family... but curse the timing)15:41
niemeyerfwereade: Take a good rest and enjoy their presence15:42
fwereadeniemeyer, I *think* I mentioned it a while ago but I forgot to actually book it...15:42
fwereadeniemeyer, cheers :)15:42
fwereadeniemeyer, after that I think I'm saving my holiday for post 12.10 :)15:43
niemeyerfwereade: It will be quite a walk towards it :)15:43
fwereadeniemeyer, it feels like we're doing ok so far :)15:43
niemeyerfwereade: Indeed, very happy with how we've been pushing things forward15:44
niemeyerfwereade: Real momentum15:44
fwereadeniemeyer, absolutely, it makes even a short holiday feel quite the unwelcome intrusion ;)15:46
niemeyerfwereade: Hehe :)15:49
niemeyerAlright!15:49
niemeyerTime to find some nice lunch15:50
rogfwereade: is it possible for a service to be subordinate to more than one other service?16:07
fwereaderog, hmmm16:10
fwereaderog, I wouldn't swar you couldn't write a charm that implied such a relationship :/16:10
rogfwereade: it certainly seems possible in the state API.16:10
fwereaderog, but I don't think such an arrangement makes any sense16:10
fwereaderog, how so?16:11
fwereaderog, ah, wait, reparsed: I think it makes perfect sense16:12
fwereaderog, deploy wordpress; deploy mysql; depoy logging; add-relation logging mysql; add-relation loggin wordpress16:13
rogfwereade: you can d1 = AddService("wordpress"); d2 = AddService("wordpress"); sub1 = AddService(subord); d1.AddUnit(); sub1.AddUnitSubo .... you got it16:13
fwereaderog, sorry, I have units on the brain at the moment, ahd totally wrong context16:13
rogfwereade: ok, so that's fine. good16:13
rogfwereade: thanks16:16
Aramniemeyer: did all the requested changes including monotonically increasing integer ids and state compatible errors.16:52
rogniemeyer, fwereade: machine agent implementation: https://codereview.appspot.com/6294096/16:55
fwereaderog, cool17:00
rogfwereade: if you manage to give some feedback today, that would be marvellous, as it would be nice to polish it tomorrow & friday.17:01
fwereaderog, I'll do what I can :)17:01
rogfwereade: ta! :-)17:01
imbrandonwhere should this be filed http://15.185.100.228/out.charmload17:02
rogimbrandon: juju-core, i think17:03
imbrandonk17:03
rogniemeyer: looks like your schema checking isn't quite sufficient...17:05
imbrandonhttps://bugs.launchpad.net/juju-core/+bug/1015700 :)17:09
fwereaderog, initial thoughts posted17:11
rogfwereade: thanks. BTW the fact that the watcher returns subord units too was decided after fairly extensive debate with niemeyer.17:12
rogfwereade: that change was why i ended up adding the isPrincipal field to state.Unit17:12
rogfwereade: which makes the current behaviour more or less cost-free17:12
fwereaderog, cool, I'm always open to counterarguments/being overruled :)17:12
fwereaderog, in that narrow context it seems like a slightly odd decision, but I'm sure there's context I'm not seeing17:13
rogfwereade: and it's nice if status commands could potentially use Machine.Units to pull out stuff for a status, for example.17:13
fwereaderog, I'm ok with that, but less sure that Units and WatchPrincipalUnits aren't both sensible methods for their particulat uses17:14
rogfwereade: i don't see the extra four lines of code as particularly onerous17:14
fwereaderog, it's the *indentation*! the horror, the horror! ;p17:15
rogfwereade: oh well, if *that's* what you don't like, i'll do: if !u.IsPrincipal() {continue} :-)17:15
fwereaderog, haha :)17:15
Aramwhat the hell does bzr want from me this time: http://paste.ubuntu.com/1051236/17:16
AramI only did a bzr pull17:16
Arambzr revert fixed it17:17
Arambut... what's the procedure with these things?17:18
fwereadeAram, was that a pull from a branch which included mate into a branch that had mstate but hadn't yet added it?17:18
fwereadeAram, but I'm not sure it's any nicer when it has been added17:18
Aramfwereade: I pulled from lp:juju-core into my mstate branch.17:19
fwereadeAram, why merge rather than pull?17:19
fwereadeAram, er vice versa17:19
Aramhm? I should have done bzr merge instead of bzr pull?17:19
fwereadeAram, I basically never pull, but I can't claim to have anything more than a vague intuitive understanding of bzr in the first place17:20
Aramhmm, this is strange. in hg/git you always pull, there's no other way.17:21
Aramso here pull does soemthing else...17:21
fwereadeAram, my workflow is almost always `bzr branch <prereq-or-trunk>`, followed by regular `bzr merge`s to keep the local branch up to date17:21
Aramok, I'll try that.17:21
Aramfwereade: thanks, it worked.17:23
fwereadeAram, excellent :)17:23
Arambasically I never have to use pull.17:23
Aramstrange.17:23
fwereadeAram, IME messing around with checkouts and pulls inevitably causes me pain17:23
fwereadeAram, branch, merge, and push do basically everything I need17:24
fwereadeAram, with ocasional judicious use of --remember on merge or push17:24
rogfwereade: do you think all watchers should implement Err()? it seems to me like calling Stop is enough.17:34
Aram"TOO LONG (>50)" change summaries are limited to 50 chars?17:41
rogfwereade: no more substantial comments?17:44
rogfwereade: actually, publish them on the CL if you have some. i've gotta go!17:44
rogfwereade: thanks a lot for the review BTW17:44
rogfwereade: have a great long weekend, and i'll see you in a little over 2 weeks' time17:45
* rog is off. see y'all (william excepted) tomorrow!17:45
rogfwereade: i think i fixed that container test bug BTW. it'd be good if you could test it on your machine.17:46
rogfwereade: https://codereview.appspot.com/6302103/17:46
Aramrog: fwereade: TheMue: trivial one liner: https://codereview.appspot.com/630512117:49
* niemeyer waves17:51
niemeyerAram: LGTM17:51
niemeyerAram: Just in time ;)17:52
niemeyerrog: LGTM too17:53
Aramniemeyer: what do I do now, lbox submit? why does it want to update the description again?17:53
TheMueAram: LGTM, I prefer this style of durations.17:54
niemeyerAram: It's a chance for you to adjust it before committing, if necessary17:54
Aramniemeyer: ah, ok17:54
Aramniemeyer: I updated the mstate CR with everything you said17:55
AramTheMue: yes, indeed.17:55
niemeyerAram: Cool, will have a look now17:55
niemeyerAram: Hmm.. your branch is not in the queue18:02
niemeyerAram: Did you run lbox propose again?18:03
Aramyes18:03
fwereadeniemeyer, I'm around for a bit; are you free for a quick talk about VersionWatcher and related affairs? say in 10 mins perhaps, if you're in midflow with Aram?18:04
niemeyerAram: So something isn't right18:04
Aramniemeyer: maybe I should click on "resubmit proposal" on the lpad website?18:04
niemeyerAram: Nope.. just "lbox propose" on the right branch should do it18:04
niemeyerfwereade: Yeah, sounds good18:04
fwereadeAram, the fantastic thing about lbox is you basically never need to visit launchpad ;)18:04
fwereadeniemeyer, cool, off for a ciggie then, bbs, ping me when you're free18:05
niemeyerAram: Change *summaries* are limited to 50 chars.. change descriptions are not18:05
Aramniemeyer: yes, I figured.18:05
niemeyerAram: These summaries end up in emails etc18:05
niemeyerAs in, subjects18:05
Aramniemeyer: what about now, is it in th queue?18:05
AramI did lbox propose again18:06
niemeyerAram: It is18:06
niemeyerAram: Thanks18:06
Aramniemeyer: ah, I did -wip before.18:06
niemeyerAram: Ah, that'd explain it18:06
AramI didn't want to spam you all with emails while I was doing experiments.18:07
Arampersonally I get enough email already.18:07
niemeyerAram: Did you change the branch name a third time?18:07
Aramniemeyer: I did change it three times, yes, but all the hacketry we did today was with name it has now...18:08
niemeyerAram: Okay, please don't keep changing branch names as it spreads references around18:08
niemeyerAram: The note I added to the previous MP is broken, for example18:09
AramI'll try to.18:09
niemeyerAram: There's something wrong in your setup still18:10
niemeyerAram: "Aram Hăvărneanu (aramh) wrote 4 minutes ago:"18:10
niemeyerhttps://code.launchpad.net/~aramh/juju-core/juju/+merge/11092018:10
niemeyerAram: This means a local branch is being pushed onto the old location still18:11
Aramhmm? how can I check/debug?18:11
niemeyerAram: try "bzr info" on the branch itself18:13
niemeyerAram: Well, maybe lbox is actually picking the wrong one18:13
niemeyerAram: Let's just delete the old MP18:14
niemeyerAram: Done.. please delete this branch too: https://code.launchpad.net/~aramh/juju-core/juju18:14
Aramdone18:14
Aramniemeyer: now what?18:14
niemeyerAram: Okay, now run "bzr info" on bzr.. let's make sure it's not referring to the old name18:14
niemeyeron the branch, I mean18:15
Aramniemeyer: http://paste.ubuntu.com/1051331/18:15
niemeyerAram: Okay, I suppose you're not using cobzr18:15
AramI am18:15
Aramwhite:mstate$ cobzr branch18:16
Aram  master18:16
Aram* mstate-machine-basic18:16
Aram  store-mgo-timeconsts18:16
niemeyerAram: Oh, sorry, I misread18:16
niemeyerAram: What "bzr nick" tells you?18:16
Aramwhite:mstate$ bzr nick18:16
Arammstate-machine-basic18:16
niemeyerAram: Looks good18:17
niemeyerAram: Try lbox propose again then, with -v please18:17
Aramok18:17
Aramniemeyer: http://paste.ubuntu.com/1051334/18:19
niemeyerAram: Yay, looks good18:19
niemeyerAram: Aha, I know what's wrong18:20
Aramniemeyer: what is? is it on my side?18:20
niemeyerAram: The email of the Launchpad MP on the CL is outdated18:20
niemeyerAram: Can you please edit it as you're the only one with permission?18:20
niemeyerAram: It should say 111235 rather than 11092018:21
Aramok, let me try it18:21
Aramdone18:22
niemeyerAram: Outstanding.. should all be in sync now18:22
niemeyerfwereade: Do you wanna talk before I dive into the review?18:24
fwereadeniemeyer, please18:24
niemeyerfwereade: Cool, so what's up.. tell me about a VersionWatcher :)18:24
fwereadeniemeyer, so... it seemed to me that we discussed the python style of related-unit watching18:25
fwereadeniemeyer, in which we track settings version changes18:25
niemeyerfwereade: Ok18:25
fwereadeniemeyer, and then, when we come to execute hooks, we grab the latest settings for a given unit relation and then cache them for the duration of the hook18:26
fwereadeniemeyer, this feels to me like unnecessary extra work -- we have the node data, we reduce it just to a version, and then later we grab the node data again and do extra work to make it appear constant18:26
niemeyerfwereade: Kind of.. I think you know it, but just to be super clear, it's cached at the time of first query18:26
niemeyerfwereade: Right?18:26
fwereadeniemeyer, yes, first query per unit relation per hook, AIUI18:27
niemeyerfwereade: Ok18:27
fwereadeniemeyer, it seems to me that this is an awful lot of work to go to when we could just grab the settings as they change18:27
niemeyerfwereade: Okay, can we please have a step back.. you seem to be assuming an implementation18:27
niemeyerfwereade: Where does that assumption comes from?18:28
niemeyercome18:28
niemeyerfwereade: Then, as a follow up question, what does "as they change" mean in the last sentence18:28
fwereadeniemeyer, well, I was trying to suggest that that implementation, despite the fact that it's what we do in python, is an awful lot of work for little benefit, when we have all the data available anyway18:28
niemeyerfwereade: What does grab the settings as they change mean?18:29
fwereadeniemeyer, it means we should, IMO, record the actual contents of the node (in one form or another... I kinda favour plain ol' map[string]interface{}, but that's by the by)18:30
fwereadeniemeyer, rather than just the version of the node18:30
niemeyerfwereade: Okay, so..18:30
fwereadeniemeyer, I don;t think I'm assuming an implementation -- I'm comparing a proposed one with the existing python one18:30
fwereadeniemeyer, and trying to get buy-in on the idea that it is worth pursuing18:31
niemeyerfwereade: I meant it assumes an approach already, when it wasn't clear what this was about18:31
niemeyerfwereade: I'm not judging, just trying to understand the background18:31
fwereadeniemeyer, I understand, I clearly haven't communicated this especially well18:31
niemeyerfwereade: I think I have a better idea now18:31
niemeyerfwereade: As I understand it, there are two different problems, and they are being conflated in a single piece, which confuses the problem statement a bit more18:32
fwereadeniemeyer, I definitely took the wrong approach yesterday -- "this leads to a more consistent hook execution environment" is fundamentally not interesting, but "this saves us a bunch of work" hopefully leads to a more interesting discussion18:32
niemeyerfwereade: The first problem is caching18:33
fwereadeniemeyer, ok, yes;18:33
niemeyerfwereade: Caching is done so that we can implement more manageable data visibility for hooks18:33
niemeyerfwereade: So in effect, it's about *not showing changes*18:34
niemeyerfwereade: Slightly ironic, as the other problem is on the opposite end18:34
niemeyerfwereade: The second problem, is related to restarts18:34
fwereadeniemeyer, yes: during the execution of a single hook, we don't want the environment to visibly change18:34
niemeyerfwereade: (at least the settings data)18:35
niemeyerfwereade: So, with the second problem, we have the issue that we may lose events18:35
niemeyerfwereade: Because there's of course zero guarantee that we'll be permanently connected to whatever the backend turns out to be18:35
fwereadeniemeyer, indeed so18:36
niemeyerfwereade: So in that sense, we're interested in knowing whether things have changed since we last looked18:36
niemeyerfwereade: where "last looked" may be a process restart ago18:36
niemeyerfwereade: For that, we don't really care about what the content was18:37
fwereadeniemeyer, AIUI, though, the losing-events problem is always potentially in play... ZK doesn't guarantee I'll see 2 changes to a node that changes twice, does it?18:37
niemeyerfwereade: Because we just wanna know if we're supposed to tell the charm implementation that the data has changed, via a hook execution, or not18:37
fwereadeniemeyer, sure18:37
niemeyerfwereade: It doesn't, but that's fine. We offer at-least-once semantics18:37
fwereadeniemeyer, but the actual data tells us that just as well as the version does18:38
fwereadeniemeyer, in fact, it tells us better18:38
niemeyerfwereade: Without taking into consideration any implementation suggestions,18:38
fwereadeniemeyer, if there's a change followed by a revert while we're offline, diffing the settings reveals that there are no changes we care about18:38
fwereadeniemeyer, sorry, yes, go on18:38
niemeyerfwereade: it's a bit strange to cache a blob of, say, 64kb, when the text "42" would do18:39
fwereadeniemeyer, ok, so this is an optimization?18:39
niemeyerfwereade: It's not an optimization.. I'd call it non-silliness, from that specific perspective18:39
fwereadeniemeyer, ok, that is indeed a reasonable perspective18:40
niemeyerfwereade: But go on, you seem to have more detials18:40
niemeyerdetails18:40
niemeyerfwereade: This was just background18:40
fwereadeniemeyer, I'm not certain that perspective is worth the extra complexity involved in throwing away data and then reconstructing and caching it, when caching from the get-go leads, in my mind, to a much simpler model18:41
niemeyerfwereade: Sorry, but you're again jumping on a bit18:42
niemeyerfwereade: Why do we need to reconstruct and cache anything?18:42
niemeyerfwereade: This data is old.. we don't use it anymore.18:42
fwereadeniemeyer, well, distributed system, the data is always old18:42
niemeyerfwereade: No, that's not what I mean18:43
fwereadeniemeyer, ok; sorry to be dense; please restate18:43
niemeyerfwereade: In the scenario I just described, we track the version so that, in case of restarts, we know whether we must run a hook or not18:43
niemeyerfwereade: If we do detect an out-of-date situation, we run the hook18:43
niemeyerfwereade: We don't care about what the *data* used to be.. that 64kb fromt the old version is trash18:44
fwereadeniemeyer, ok, and that is a slightly eager but reasonable heuristic for rerunning hooks18:44
niemeyerfwereade: Eager?18:45
fwereadeniemeyer, a newer version does not necessarily imply that the data we care about has changed18:45
niemeyerfwereade:18:45
fwereadeniemeyer, but that's not a flaw worthy of the term flaw, let alone worth arguing over18:45
niemeyerfwereade: Does it generally change or not when we bump a version?18:45
niemeyerfwereade: We shouldn't be bumping the version of settings nodes without changes18:46
niemeyerfwereade: I'd consider that a bug18:46
fwereadeniemeyer, sure, understood, but versions don't revert when the data does -- but regardless, can we drop this? it's a derail18:46
niemeyerfwereade: Okay, yes, agreed regarding reverts, and agreed regarding derail.18:47
niemeyerfwereade: Okay, now, should we talk about VersionWatcher in that context, or is there some background that is missing in that brainstorm?18:48
fwereadeniemeyer, ok, that sounds interesting18:48
fwereadeniemeyer, if there's some that's relevant it will no doubt become apparent18:49
fwereadeniemeyer, my reading was that *if* we're tracking settings node versions, a VersionWatcher is just the ticket18:49
niemeyerfwereade: Well, I'm not sure, and that's what I'd appreciate gaining more insight into18:49
fwereadeniemeyer, I'm hoping that you have some insight I've missed here ;)18:50
niemeyerfwereade: When the agent *is* running, we're interested not only in the version but also in the data, since as we've discussed it may be queried and cached18:51
fwereadeniemeyer, ...ok, wait, I thought you were just arguing against caching the data outside of indivdual hook executions18:51
niemeyerfwereade: I'm arguing against saving it persistently18:52
niemeyerfwereade: and trying to understand whether we should be caching it in memory or not18:52
niemeyerfwereade: to solve problem *1*18:53
fwereadeniemeyer, ah-HA, this is a distinction that had entirely escaped me18:53
fwereadeniemeyer, ty for clarification18:53
niemeyerfwereade: Problem 2 doesn't require data.. problem 1 does18:53
fwereadeniemeyer, this is true; I maintain that the same data *could* be used to solve problem 2 as well, but I agree that it is not necessary when one considers problem 2 in isolation18:56
niemeyerfwereade: It could. It's just misoptimization. :)18:57
fwereadeniemeyer, that may well be so :)18:57
fwereadeniemeyer, although what I was trying to optimize when I thought of it was simplicity of implementation, which is IMO a pretty good candidate for first-thing-to-optimize18:59
niemeyerfwereade: Comparing two integers counts highly in my simplicity-meter19:01
niemeyer:)19:01
niemeyerfwereade: You may have further information that reveals why it is simpler to do something else, though19:01
fwereadeniemeyer, it's simply that we don't need to get and cache individual relation settings in a hook context if we already have them available19:02
niemeyerfwereade: I agree!19:03
niemeyerfwereade: That's about problem 1, though.19:03
niemeyerfwereade: And we get a version every time we get data out of ZooKeeper19:03
niemeyerfwereade: So there's a relationship between them19:04
niemeyerfwereade: We can solve both problems with a single watcher, cache the data for problem 1, and keep the version around for problem 2.'19:04
fwereadeniemeyer, ok, I did think of just extending ContentWatcher to include the version19:05
niemeyerfwereade: +119:05
fwereadeniemeyer, and let the clients discard what they will19:05
fwereadeniemeyer, I think I have to go now; I think I'll want to talk about this some more over the next couple of days though19:06
niemeyerfwereade: Sounds good. Hopefully that was useful.19:07
fwereadeniemeyer, thank you, I think we;re making progress :)19:07
niemeyerfwereade: Glad to hear it, and you're welcome19:07
fwereadeniemeyer, I'm not quite there yet though ;)19:07
fwereadeniemeyer, cheers19:07
fwereadeniemeyer, happy evening :)19:07
niemeyerfwereade: Have a good one19:15
niemeyerAram: So, back to your branch19:18
Aram2right19:21
=== Aram2 is now known as Aram
niemeyerAram: Had another pass: https://codereview.appspot.com/630409919:32
niemeyerAram: Probably the last one19:32
niemeyerAram: It's looking great19:32
Aramniemeyer: thanks for the review.23:08
niemeyerAram: My pleasure23:08
davecheneyhowdy, anyone seen mark23:14
davecheneyhttps://twitter.com/campoy83/status/21525568659299533123:19

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