/srv/irclogs.ubuntu.com/2013/11/22/#juju-dev.txt

* thumper is losing the will to finish this bit of work01:18
* thumper takes a look at that critical bug that fwereade suggested01:19
thumpertime to step back and look at the pending reviews...01:46
axwwallyworld_, thumper: what are your thoughts on doing `strings.HasSuffix(os.Args[0], ".test")` for changing default behaviour when running tests?02:00
thumper?!02:00
axwmy gut feeling is that it's bad, because it's adding test logic into non-test code02:00
thumperhorrible02:00
wallyworld_context?02:00
* thumper school run02:00
axwwallyworld_: disabling the finish-bootstrap stuff02:00
axwI was thinking we could just disable it always when running tests by doing something hackish like that02:01
wallyworld_yeah, go to agree with thumper on that one. i hate adding TestFoo() stuff but Go sucks in that it doesn't allow a better way to do it02:01
wallyworld_TestingFoo() even02:01
axwwallyworld_: how would you do it with, say, Python?02:02
axwI guess you'd just monkey patch02:03
wallyworld_yeah02:03
axwbut that's what I'm doing here...02:03
wallyworld_but the test code has to be in the production code02:03
axwwell, we could expose the finishBootstrap var02:04
axwthe TestingX thing isn't strictly necessary02:04
wallyworld_we could, and that has been done elsewhere eg var FinishBootstrap = finishBootstrap02:04
wallyworld_i'd prefer the above02:05
axwwhich above?02:05
axw:)02:05
wallyworld_with a suitable comment, saying "exposed for testing"02:05
wallyworld_ var FinishBootstrap = finishBootstrap02:05
axwhmmkay. I didn't do that to cut down on duplication02:05
wallyworld_what duplication?02:05
axwdefining a replacement function. I guess I could just put that in another package tho02:06
wallyworld_maybe i'm missing something02:06
wallyworld_i'm just suggesting introducing anj exported var02:07
wallyworld_so the testing stuff can live inside the _test file02:07
axwwallyworld_: and then remove the Testing functions, right?02:07
wallyworld_yes02:07
axwwallyworld_: so the contents of those are either duplicated, or moved02:07
axwno big deal I suppose02:08
wallyworld_there's also a pattern where a testing package is introduced02:08
axwyeah, I'll probably go with that02:08
wallyworld_and all the callers over various other packages call the stuff in the testing package02:08
axwprovider/common/testing or so02:08
wallyworld_yeah02:08
wallyworld_still messy compated with python etc al02:08
thumpernot entirely surprising that02:10
thumpergiven that go is compiled and strictly typed02:11
wallyworld_and it doesn't have friends like C++ or access to "private" methods like python02:13
axwI never liked friends in C++02:15
thumperI didn't like friends in C++ either02:15
thumperfriendship isn't really that useful02:16
thumperbecause you have to give it02:16
thumperand it tightly couples things together02:16
thumperit would be nice though if you had the ability to say "i know what I'm doing" in go02:16
thumperanyway...02:17
abentleyaxw: For a minute I thought you were using "like" and "friends" in the Facebook sense.  My mind may be permanently warped.02:31
axwabentley: :) I don't Like my facebook Friends either02:32
axwthumper: you added a whole lot of stuff to the CL you just updated03:05
axwthe local provider rsyslog one03:05
thumperreally?03:05
* thumper grunts03:05
thumperI merged trunk03:05
thumperand lbox shits itself03:06
axwah03:06
axwbecause of the prereq maybe?03:06
thumperin all honesty there is nothing interesting in that diff, just questions around the interface...03:06
thumpermaybe03:06
axwthumper: I mean the other one - but anyway, LGTM03:07
axwI didn't realise rsyslog was "Important"03:07
thumper:)03:07
axwshould've checked03:07
thumpereven on my vanilla precise box we have /etc/rsyslog.d03:07
thumperI was trying to do a reverse depends on rsyslog03:08
thumperbut not sure how to drive dpkg03:08
axwnot sure, but the Priority=Important, so it's in the base system03:09
thumperaxw: ok, so ubuntu-minimal depends on rsyslog03:09
axwokey dokey03:09
thumperalthough03:09
thumpertechnically, we should add it as a depends to juju-local03:10
thumperapt-cache rdepends pkg-name FWIW03:10
axwthumper: thanks for the comment on tagOffset, the 1-indexing was the bit that confused me03:11
thumper:)03:11
thumperyeah, who indexes from 1?03:11
axwnot sure, maybe the same people who say Monday is the first day of the week03:11
axwanyway... /me gets back to synchronous bootstrap03:12
axw_wallyworld_: I've updated the synchronous bootstrap CL. There's now no upper limit on DNS/SSH wait, and it can be cancelled with SIGINT. Also added the output as you suggested, and better progress reporting06:05
axw_haven't tested against the other providers yet06:06
wallyworld_axw_: ok, looking, thanks06:09
wallyworld_axw_: you were going to introduce a testing package for those test helpers?06:25
axw_doh06:25
axw_I was06:25
axw_wallyworld_: I'll update again later with that06:27
wallyworld_yeah, i'm not going ti blokc on that06:27
* wallyworld_ -> walk the dog06:48
rogpeppeaxw__, wallyworld_, TheMue: mornin' all07:21
axw__morning rogpeppe07:22
rogpeppewallyworld_: thanks for the review07:22
wallyworld_rogpeppe: np. nice to see that add machine stuff get some lovin'07:26
rogpeppewallyworld_: glad you're ok with it07:27
wallyworld_why wouldn't i be? :-)07:27
rogpeppewallyworld_: it took me a full day to understand the old code :-)07:27
wallyworld_i have had a had in it but a lot of the code predated my time :-)07:27
wallyworld_/had/hand07:27
rogpeppewallyworld_: i ended up manually simulating each path through it and writing down the trace07:28
wallyworld_i sorta just added to it, without refactoring07:28
wallyworld_i like it that the top level methods reflect each business case07:28
rogpeppewallyworld_: you're right about the machine doc duplication BTW - i'm just adding a machineDocForTemplate function07:28
wallyworld_\o/ thanks :-)07:28
rogpeppewallyworld_: i plan on losing AddMachineParams entirely BTW and exporting machineTemplate07:29
wallyworld_any code that takes a day to understand needs refactoring :-)07:29
rogpeppewallyworld_: well, perhaps it was just my small brain...07:29
wallyworld_that would be good cause that but of duplication will disappear with it07:30
wallyworld_bit07:30
wallyworld_i have a small brain too, smaller than most :-)07:30
rogpeppewallyworld_: yeah. and the code that digs around in it to work out what the caller is actually trying to do.07:30
wallyworld_i think the final outcome will be good07:31
rogpeppewallyworld_: i hope so. i feel that it should be straightforward to do the next modifications that i need to do.07:35
wallyworld_i'm always up for a good refactoring :-)07:35
rogpeppewallyworld_: BTW the logger.Info lines about transaction hooks will only ever happen in tests - transaction hooks are explicitly only there for testing07:38
wallyworld_ah ok07:38
wallyworld_maybe a comment in the code so the reader knowns the hooks are only run in tests?07:39
wallyworld_just as an fyi?07:39
rogpeppewallyworld_: will do07:39
wallyworld_thanks :-)07:40
rogpeppefwereade, axw__: your reviews of https://codereview.appspot.com/30390043/ would be appreciated too, as it's a significant change08:00
axw__rogpeppe: ok, will take a look08:00
rogpeppeaxw__: thans08:00
rogpeppeks08:00
fwereaderogpeppe, looking08:00
fwereadeaxw__, I haven't followed up on your CL -- did what I said yesterday make sense?08:01
axw__fwereade: are you talking about the state changes?08:01
fwereadeaxw__, yeah, the environment life stuff08:02
axw__fwereade: yup, makes sense - I checked with frankban about the tag usage08:02
axw__I sent you an email about it. but yes, they do use it08:02
fwereadeaxw__, great, thanks08:02
axw__so I guess we'll have to not validate them for now08:02
* fwereade tries to keep up to date with mail :/08:03
axw__fwereade, rogpeppe: if you're interested, I've got a synchronous bootstrap CL up for review here: https://codereview.appspot.com/30190043/08:03
rogpeppeaxw__: looking08:03
axw__wallyworld_ has given it a once over, but this is a non-trivial change, so more eyes the better08:04
axw__well, a thrice over I think08:04
axw__:)08:04
axw__fwereade: with the environment life CL, I still have a question about how we signal state servers to kill themselves08:06
axw__fwereade: that was the reason for Remove (and EnsureDead before it)08:06
fwereadeaxw__, off the top of my head: would it make sense to have a path that ties it into the Remove of a manually provisioned machine? current schema might not accommodate that, though08:09
fwereadeaxw__, might require per-provider provisioned-machine refcounts08:09
fwereadeaxw__, so forget that for now :(08:09
axw__fwereade: refcounts for what sorry?08:10
fwereadeaxw__, the number of manually provisioned machines in existence08:10
axw__I don't understand how that'd be used here08:11
fwereadeaxw__, possibly broken down by role -- we can kill the environment (or the manual state servers) once all the manual normal nodes have been killed08:12
axw__fwereade: ok. I think we're thiinking the same thing, but you want transactional guarantees on mongo?08:12
fwereadeaxw__, yes08:12
fwereadeaxw__, they're tedious to work with but they're a lot better than nothing08:13
axw__fwereade: sure. I was going to put all the logic inside apiserver/client, but you probably gathered that already08:13
axw__(hence the env Dying -> prevents machine addition)08:14
fwereadeaxw__, I feel that an env being set to Dying should set things in motion in itself08:16
fwereadeaxw__, the dying preventing machine addition is necessary regardless, isn't it?08:16
fwereadeaxw__, assume multiple clients08:16
fwereadeaxw__, it's a little bit thin, but have you read doc/hacking-state.txt? and the various other lifecycle related docs?08:17
axw__fwereade: no, but I will now :)08:18
fwereadeaxw__, I'm afraid the lifecycle stuff has not entirely kept up with reality (I might get around to fixing them in my Copious Free Time) but things haven't diverged that much -- most of them should still be actually true08:19
rogpeppefwereade: how strongly do you feel about Machine.doc.TxnRevno, and in particular how important is it that AddMachine do a refresh immediately after creation to pick up an accurate txn-revno?08:22
rogpeppefwereade: i've just realised that it's racy, and it seems unnecessary.08:23
fwereaderogpeppe, IIRC it's necessary for the watcher -- but I think I'd be fine with Machine.Watch grabbing a fresh TxnRevno before we start watching08:24
fwereaderogpeppe, Ican't think of any cases where the API server calls Watchon a freshly-added machine08:25
rogpeppefwereade: it's not really necessary for the watcher tbh08:25
fwereaderogpeppe, fwiw the point is not that it be accurate, specifically, but that it have a value that corresponds with reality08:25
rogpeppefwereade: you'll get an extra event if txn-revno is too low, but otherwise the watchers work fine08:26
rogpeppefwereade: and that extra event might happen anyway, if someone's made a change since you last refreshed08:26
fwereaderogpeppe, I recall niemeyer got really irritated when I tried to write watchers that just treated the last-known-revno as -1, so I internalised it as something necessary, but I don't recall the details-- yeah, that had been my initial supposition08:26
rogpeppefwereade: i'm thinking that just leaving it as zero when adding a machine should be fine08:27
fwereaderogpeppe, ha!08:27
fwereaderogpeppe, I factored that stuff out anyway08:27
fwereaderogpeppe, have a look around, see if *anyone* uses that field08:27
fwereaderogpeppe, I'd love it if we just dropped it08:27
rogpeppefwereade: the machineUnits watcher does08:27
rogpeppefwereade: but tbh i don't think it needs to08:28
rogpeppefwereade: the only problem is the test that specifically tests that txnrevno is correct after AddMachine (TestAddAndGetEquivalence)08:30
fwereaderogpeppe, I think that really I'd prefer not to have watchers that potentially start with double-events signifying no change08:31
rogpeppefwereade: i don't think any extra event will be emitted, but... let me check08:32
fwereaderogpeppe, but equally that txn-revno lookups should probably be secreted away inside the watcher code08:32
fwereaderogpeppe, the TxnRevno fields then become useful only when doing ultra-pedantic txn assertions and can in generalbe dropped08:32
rogpeppefwereade: i finally gave in and did it. what do you think of this? https://codereview.appspot.com/3077004310:19
fwereaderogpeppe, if it's what we were talking about above, I love it already, but I've got to go to laura's school right now :(10:20
fwereade(not emergency but appointment)10:20
rogpeppefwereade: it's not quite10:20
rogpeppefwereade: but it was prompted by it10:20
rogpeppefwereade: it's a  DeepEquals checker that treats empty slices == nil slices10:20
rogpeppeaxw_, dimitern, wallyworld_: would appreciate your thoughts too10:21
dimiternrogpeppe, looking10:22
* wallyworld_ has had several drinks, being friday evening and all10:22
wallyworld_but in general i don't agree empty == nil10:22
wallyworld_well, maybe go likes to think they are equal, but that i disagree with10:23
wallyworld_since nil should be a distinct value with a different semantic meaning to empty10:23
wallyworld_at least that's the case in all other languages i have used10:24
wallyworld_and it allows you to distinguish between "i don't know" and "empty"10:24
mattywfwereade, rogpeppe who would be best to talk to about the juju deploy command - how it works currently and how it might work in the future (I know there are some changes coming at some point)10:36
rogpeppewallyworld_: go doesn't think they're equal, but in many cases we do treat them as the same10:37
dimiternrogpeppe, reviewed10:37
rogpeppedimitern: thanks10:37
wallyworld_rogpeppe: that i find an issue with10:38
wallyworld_since nil is semantically different to empty10:38
rogpeppewallyworld_: it's actually only an issue for DeepEquals10:38
rogpeppewallyworld_: because otherwise you can't compare slices10:38
rogpeppewallyworld_: (except against nil, which we almost never do)10:38
wallyworld_i think is an unfortunate Go idiom or some such10:39
wallyworld_usually, nil = "i don't have a value for this thing"10:39
rogpeppemattyw: i'm happy to chat about it; fwereade probably has the best bird's eye view of where things might be going10:39
rogpeppewallyworld_: luckily in go we don't need to use in-band signalling so much10:39
mattywrogpeppe, ok - so the way it works now - it actually does a bzr branch locally (more or less)10:40
rogpeppewallyworld_: lots of things *can't* be nil (ints, strings, etc)10:40
wallyworld_rogpeppe: yeah, i'm not sure if that's a cause or a consequence10:40
wallyworld_in a true oo world everything can be nil10:40
wallyworld_which sadly go is not10:40
rogpeppewallyworld_: i'm glad that we don't have nil everyewhere10:41
rogpeppewallyworld_: value types are ace10:41
rogpeppemattyw: go on10:41
* TheMue thinks back of his smalltalk time *sigh*10:41
mattywrogpeppe, that's right is it - more or less a bzr branch happens on the machine you run juju deploy on?10:42
rogpeppemattyw: i'm not sure it does; let me check10:42
rogpeppemattyw: no i don't think it does10:43
rogpeppemattyw: it pulls a charm bundle from the charm store (if the charm's not local)10:43
rogpeppemattyw: the charm bundle is a tgz file10:43
mattywrogpeppe, ok - and I believe that might be changing so that it happens on the state server instead of locally?10:44
rogpeppemattyw: if you do a deploy through the api, that already implements that logic, so nothing is created locally10:44
rogpeppemattyw: yes. except for local charms, which must be pushed up to the server10:44
mattywrogpeppe, ok - that's probably all I need for know - thanks very much - don't leave the country though10:46
* rogpeppe puts his passport down10:46
natefinchfwereade: standup?10:48
mattywrogpeppe, when would you have a spare few minutes for a quick hangout?10:58
natefinchmattyw: we're in a hangout right now, but should be done soon11:05
mattywnatefinch, no problem I thought that was the case - just getting my booking in early ;)11:07
rogpeppemattyw: i'll just look at a review, have a bowl of cereal and then we'll do that11:11
mattywrogpeppe, ok - no particular hurry11:15
jamespageanyone around with an azure account who could confirm https://bugs.launchpad.net/juju-core/+bug/1246320 with the juju-core package that's in saucy proposed? (details on how in the bug report)11:26
_mup_Bug #1246320: Azure bootstrap fails: versioning header is not specified <azure> <bootstrap> <verification-needed> <Go Windows Azure Client Library:Fix Committed by wallyworld> <juju-core:Fix Committed by wallyworld> <juju-core 1.16:Fix Released by wallyworld> <juju-core trunk:Fix Committed by wallyworld> <juju-core (Ubuntu):Fix Released> <juju-core (Ubuntu Saucy):Fix Committed> <juju-core (Ubuntu Trusty):Fix Released> <https://launchpad.net/bugs/1211:26
rogpeppemattyw: you got a hangout location?11:28
natefinchjamespage: I have an azure account, but limited time.  I could share my azure creds with you if that's helpful11:29
jamespagenatefinch, please11:29
jamespage(its the last bug needing verficiation)11:29
natefinchjamespage: sent11:33
rogpeppedimitern: responded to your review.11:49
dimiternrogpeppe, i'm not entirely convinced11:51
dimiternrogpeppe, if we're going to copy/paste stuff from the go source into our codebase, it should be consistent in formatting11:52
rogpeppedimitern: if we're copy/pasting something, it should be as identical as possible with the original so that when the original changes there are as few conflicts as possible11:52
dimiternrogpeppe, if otoh we're going to follow possible go source changes and use/patch as needed when it changes, it doesn't belong in juju-core, but in an external package11:52
rogpeppedimitern: we've already got one precedent, in thirdparty/pbkdf211:53
rogpeppedimitern: i don't want to add an external dependency for this11:53
dimiternrogpeppe, which was done before we decided on the current rules of consistency11:53
rogpeppedimitern: i don't think that vendored code should be subject to the same rules11:54
dimiternrogpeppe, I don't believe making our code messier is helpful for long-term maintenance11:54
dimitern;)11:54
rogpeppedimitern: it's not really our code11:54
rogpeppedimitern: it's their code + minimal patches to make it do what we need11:54
dimiternrogpeppe, then what's wrong with an external dependency?11:54
rogpeppedimitern: it seems overkill to make a whole new project just for this. and i don't think it solves anything.11:55
dimiternrogpeppe, call it code.google.com/rog/deepequals or something11:55
rogpeppedimitern: i don't see what issue it solves11:55
dimiternrogpeppe, use an existing project then11:55
dimiternrogpeppe, consistency11:55
dimiternrogpeppe, that's what it solves11:56
rogpeppedimitern: i don't believe that consistency is an iron rule, particular in this kind of case11:56
natefinchrogpeppe: I agree with dimitern... I think we put way too much under juju-core that should be independent projects11:56
dimiternnatefinch, +111:56
dimiternrogpeppe, we should be going leaner and more consistent, not the other way around11:56
natefinchrogpeppe: this has nothing to do with juju specifically. It just happens to be useful for us.11:57
rogpeppedimitern: i'd prefer us to have less dependencies not more11:57
rogpeppenatefinch: true, but i don't think that's a bad thing11:57
dimiternrogpeppe, complex projects like juju are composed of many dependencies11:57
dimiternrogpeppe, nothing wrong with that, it's a better design, cleaner11:57
natefinchrogpeppe: dependencies shouldn't be a problem.  If they are, we should address that, but I don't think they are.11:57
rogpeppedimitern: the less dependencies, the less fragile IMO11:57
dimiternrogpeppe, i disagree11:58
natefinchrogpeppe: true for dependencies not controlled by us.  But we do control this one.11:58
rogpeppedimitern: it's a fundamental truth11:58
rogpeppedimitern: even if we do control the dependency, it's one more entity to manage11:58
dimiternrogpeppe, smaller, better organized chunks that are internally consistent and do best one or a few things is better than a monolithic whole11:59
dimiternrogpeppe, what's wrong with managing more?11:59
rogpeppedimitern: it's not monolithic - we're organised into independent package within juju-core. i really don't see the problem here.11:59
rogpeppedimitern: more work to do11:59
jamespagenatefinch, thanks12:00
dimiternrogpeppe, we're coming the the old discussion of "why having a huge package like state with no internal substructure is worse than smaller, well-defined packages"12:00
dimiternrogpeppe, less is more in this case12:00
rogpeppedimitern: i think that's a different issue actually12:01
natefinchrogpeppe: for this particular case in question... it's a very well-defined project that does one thing and does it well and is unlikely to see a lot of churn.  in this case, the overhead of creating and maintaining a project should be minimal.12:02
dimiternrogpeppe, it's true we were not always following the principle of "what's in juju-core is juju related", but we can improve on that by not making it worse12:02
rogpeppenatefinch: that's an argument for moving all of testing/checkers into an external package12:03
rogpeppenatefinch: which might be a reasonable thing to do12:03
natefinchrogpeppe: I was actually just thinking that12:03
dimiternrogpeppe, i'm not arguing just for the sake of it - this specific case is a trivial example, but shows a fundamental design issue with many parts of the codebase, which have not place in the main code base12:03
dimiternrogpeppe, i agree to moving checkers outside12:03
rogpeppedimitern: for me, it depends if some other project might want to use those parts12:04
dimiternrogpeppe, it doesn't really matter12:04
dimiternrogpeppe, what matters is to make our life easier by removing reusable chunks like that, not specific to juju, even if noone else uses them12:04
rogpeppedimitern: there *is* overhead in maintaining an external project dependency12:04
rogpeppedimitern: i don't see how it makes *anything* easier12:05
dimiternrogpeppe, and doing so will make them more likely to be reused, than if there are in juju12:05
rogpeppedimitern: perhaps we don't want them to be reused12:05
dimiternrogpeppe, what's the overhead of maintaining a set of reusable, well-defined helpers, like the checkers, which certainly do not change often12:05
rogpeppedimitern: because if something is reused by external code, then we're not nearly as free to change if if our requirements change12:06
rogpeppedimitern: non-zero12:06
dimiternrogpeppe, we can't stop them from being reused, even now, but it's not obvious12:06
dimiternrogpeppe, not true - we still control the external project12:06
rogpeppedimitern: that's true12:06
natefinchrogpeppe: that is an interesting point, about having to worry about external use.... keeping stuff in juju-core means we can hack at it any way we like, since no one in their right mind would link against anything under juju-core12:06
dimiternrogpeppe, by your logic goose should've been part of juju-core12:07
rogpeppenatefinch: well, i kinda hope that people will in time, but that's a different issue12:07
dimiternrogpeppe, or the gomaasapi - who else uses them?12:07
rogpeppedimitern: goose should be useful by other people wanting to use openstack, just like goamz is useful by other people wanting to use aws12:07
rogpeppedimitern: same there12:07
natefinchrogpeppe: only for juju-specific stuff.  Anything else could break at any time, since it's so deep in our codebase12:07
dimiternrogpeppe, right, and a set of comprehensive checkers, that have nothing to do with juju in particular, also12:08
natefinchrogpeppe: I think this and the checkers are a good example of prime subjects for extraction.... because they're well defined and no going to have their interfaces change12:08
rogpeppedimitern: except i don't want us to depend on 100 external projects, each created just because it was possible to factor them out12:08
dimiternrogpeppe, why?12:09
dimiternrogpeppe, that's the main issue of argument12:09
rogpeppedimitern: because i don't think it helps anything12:09
dimiternrogpeppe, i don't think we're getting anywhere here12:09
dimiternrogpeppe, ;)12:10
rogpeppedimitern: yeah, i guess12:10
natefinchdimitern: I think it's valid to say that there is an expectation of API compatibility in independent projects that we don't have under juju-core.  Stuff under juju-core is sort of assumed to be part of a larger project and not intended for independent consumption12:10
rogpeppenatefinch: +112:10
rogpeppenatefinch: *particularly* for stuff under testing...12:10
dimiternrogpeppe, you're generalizing a specific case where using an external dep is a good thing12:11
natefinchrogpeppe: but that being the case, the checkers and your lax deepequals are still things that probably are fine and good to have as independent packages12:11
dimiternrogpeppe, i'm not saying "let's have 100 deps", i'm saying let's apply some common sense12:11
rogpeppedimitern: i haven't seen a single argument as to *why* using more external deps is a Good Thing12:11
dimiternnatefinch, exactly12:11
natefinchrogpeppe: it makes us better open source citizens and helps out fellow go programmers, including people from Canonical12:12
dimiternrogpeppe, code describes linked concepts and abstractions, all related12:12
rogpeppenatefinch: ok, that's a good argument12:12
rogpeppedimitern: that's too abstract for me12:12
dimiternrogpeppe, if they're not related, they shouldn't be coupled together12:12
rogpeppedimitern: that sounds like a statement of belief, not an actual practical reason12:13
dimiternrogpeppe, would you put a wordprocessor and a database in the same codebase, if they just happen to connect sometimes, but can operate totally independently?12:13
natefinchrogpeppe: definitely we have to be pragmatic. We can't sacrifice our own flexibility... but we're not saying that... just saying, if it's not going to cause much pain and someone else might want to use it, then make it an external project12:13
rogpeppedimitern: quite possibly12:13
dimiternrogpeppe, ok, no point to argue further12:13
dimiternrogpeppe, you simply refuse to see my point :)12:14
rogpeppedimitern: i see that you strongly believe in that principle12:14
rogpeppedimitern: but i believe in pragmatism, not principles12:14
dimiternrogpeppe, yes, i do, because of experience (bad usually) - what happens with large projects with fuzzy boundaries, things that shouldn't be together but historically are kept like that and coupled even further, which makes refactoring difficult12:16
rogpeppenatefinch: i definitely buy that argument. by that argument, we could easily factor out the checkers, cloudinit, maybe the rpc package and some others too12:16
rogpeppedimitern: i'm not sure those historical arguments apply here, as the go package system is strongly boundaried and non-circular12:16
natefinchrogpeppe: seems like the good open source thing to do12:17
dimiternrogpeppe, putting independent things together, just for the sake of convenience, in my experience ever so slightly tends to couple them more and make them less independent12:17
rogpeppedimitern: there's nothing about having something in an external project that means that things are easier to refactor12:17
rogpeppedimitern: decoupling is good, no question12:17
rogpeppedimitern: but whether two packages are in the same project is orthogonal to how coupled they are12:18
dimiternrogpeppe, no it's not - because they can change together and that's a temptation too big to resist to couple them over time12:18
dimiternrogpeppe, anyway, we veered of way off track12:19
rogpeppedimitern: goose is way too strongly coupled with the openstack provider12:19
rogpeppedimitern: the fact that they're in separate projects doesn't really help in that refard12:19
rogpepperegard12:19
rogpeppedimitern: conversely the rpc package isn't strongly coupled with any other package outside rpc. we can maintain dependency hygiene inside juju-core too, and we really should.12:20
dimiternrogpeppe, lgtm, just to have it landed, even with these minor inconsistencies12:21
rogpeppedimitern: thanks12:21
* TheMue => lunch12:21
rogpeppedimitern: i hope you can see where i'm coming from, even if you might not agree :-)12:21
dimiternrogpeppe, I see, I hope you can see my point as well12:22
* dimitern gets hungry when arguing like that :)12:23
* dimitern -> lunch as well12:23
rogpeppedimitern: i hear it, but i can't *feel* it in the same way as you...12:23
rogpeppedimitern: enjoy!12:24
dimiternrogpeppe, thanks :)12:26
rogpeppehmm, this has some test failures i've never seen before: https://code.launchpad.net/~rogpeppe/juju-core/467-checkers-deepequals/+merge/19624712:53
rogpeppe... Panic: Couldn't create temporary directory: mkdir /tmp/gocheck-5074209722772702441: file exists (PC=0x413D01)12:53
rogpeppehow could that happen?!12:53
jamrogpeppe: gocheck is broken12:58
rogpeppejam: oh, that's not good12:59
jamrogpeppe: it doesn't seed its random number generator12:59
jamso after 100 temp directories get created, it "runs out"12:59
rogpeppejam: ha ha12:59
jamrogpeppe: I'll clean it up, I would say gocheck should be fixed, but it keeps us from leaking *too* many12:59
rogpeppejam: is that actually a problem with ioutil.MkTempDir() ?12:59
jamrogpeppe: so MkTempDir wouldn't run out after 100 tries like gocheck's internals13:00
jambut we would still be leaking dirs (I think)13:00
jamrogpeppe: and filling up /tmp with dirs is a good way to slowly kill your machine13:00
jamso I haven't "fixed" gocheck13:00
rogpeppejam: ioutil.TempDir does seed properly anyway13:01
rogpeppejam: could you clean up those tempories please then, before my branch dies again? (perhaps you have, in which case thanks!)13:02
jamrogpeppe: i did13:03
rogpeppejam: cool13:03
jamrogpeppe: ideally we'd figure out why we're leaking dirs, fix that, end then fix gocheck to use ioutil.TempDir13:03
rogpeppejam: that would indeed be good13:03
rogpeppejam, dimitern, fwereade, TheMue, wallyworld_, mattyw: FYI i'm going to be travelling this afternoon. i'll be working on the train, but probably with only partial internet connectivity13:05
fwereaderogpeppe, cool, enjoy your travels13:06
rogpeppei leave in about 2 hours13:06
TheMuerogpeppe: ok, enjoy13:06
rogpeppefwereade: did you manage to take a look at https://codereview.appspot.com/30390043/ BTW?13:06
rogpeppefwereade: i've also got https://codereview.appspot.com/30900043 which does the txn-revno changes we discussed13:07
fwereaderogpeppe, not enough of it yet13:07
rogpeppefwereade: (please ignore the testing/checkers changes in that branch - i don't know why they're there, as i included the other branch as a prereq)13:07
rogpeppefwereade: ok, np13:07
fwereaderogpeppe, no worries13:07
=== gary_poster|away is now known as gary_poster
mattywrogpeppe, going anywhere nice?13:40
rogpeppemattyw: up to edinburhg13:40
rogpeppegh13:40
mattywrogpeppe, that is nice - enjoy13:40
rogpeppemattyw: there's a fiddle festival on. lots and lots of trad tunes!13:40
mattywrogpeppe, excellent! going for the weekend?13:41
rogpeppemattyw: aye13:41
mattywrogpeppe, scotsfiddlefestival.com?13:42
rogpeppemattyw: that'll be the one13:42
mattywrogpeppe, who are you looking forward to seeing most (which ones should listen to)13:43
rogpeppemattyw: Frigg are excellent, though I've seen 'em before13:44
rogpeppemattyw: mostly i'm going for the crack13:44
rogpeppemattyw: lots of sessions and late nights13:44
* rogpeppe goes to lunch13:47
rick_h_morning sinzui, can I get a few min hangout time today at your leisure?14:26
sinzuisure14:26
sinzuiI am free at the top of the hour rick_h_14:27
rick_h_sinzui: sounds good, thanks14:27
jcastrosinzui, for your consideration sir! https://bugs.launchpad.net/juju-core/+bug/125406114:47
_mup_Bug #1254061: Add bash completion for OSX  <juju-core:New> <https://launchpad.net/bugs/1254061>14:47
sinzuioh, I might be able to to that mysel14:47
sinzuif14:47
natefinchniemeyer: just wanted to mention I got that code working yesterday.  Thanks for the help.14:51
rick_h_sinzui: hit me up with an invite when you're free. Thanks.15:06
sinzuirick_h_, https://plus.google.com/hangouts/_/7ecpigc90pv2nkor675dm9p9oo?hl=en15:10
natefinchhey rogpeppe, I don't think I can go through with making the public struct for replica set members and a private one for marshaling.  It just complicates the code too much, plus we lose information in the translation about what values are actually set in the database versus which are being defaulted.  The code is so much cleaner and easier to understand just using pointers to the optional values.15:19
rogpeppenatefinch: i actually think that not providing that information could be considered a positive thing15:31
rogpeppenatefinch: it means that the user doesn't have to know what a missing value means15:31
rogpeppenatefinch: but i do appreciate what you're saying.15:33
rogpeppenatefinch: i can't decide which comes first: a package that's easy and intuitive to use, or one that's simpler maps closely to the underlying transport15:34
natefinchrogpeppe: I actually think that the pointers are simpler to use. You don't have to use some default value struct to create new members15:38
rogpeppenatefinch: but you do have to create variables for all your fields so you can make pointers to them...15:39
natefinchrogpeppe: yes, but most of the optional fields aren't going to be used often, and it's not really that hard to make a f := false and use &f for the value15:40
rogpeppenatefinch: is it really that awkward to have a couple of functions for each type, doing the translation in each direction?15:43
rogpeppenatefinch: but if you really feel strongly, as it seems you do, then do it the way you feel like15:45
natefinchrogpeppe: it's not the translation that is awkward, it's the fact that we lose whether or not a value was intentionally set.... also the zero value of Member is then a generally broken value, so we need AddressToMembers and DefaultMember.  All that can go away if we just make people deal with the fact that there are some optional values on Member15:45
rogpeppenatefinch: but the other side of the coin is that when reading a value, the package needs to know that a nil vote count actually means 1, for example15:47
rogpeppenatefinch: and it won't print out very nicely, because it'll just print pointer values for all the fields15:47
natefinchrogpeppe: we could make accessor methods that do the translation internally.  I know it's not ideal.15:47
rogpeppenatefinch: and people will need to be careful with pointer aliasing15:48
rogpeppenatefinch: gotta go right now, back in 5 when i'm on the train15:48
natefinchrogpeppe: ok15:48
rogpeppe1natefinch: sorry, intermittent connection here15:53
rogpeppe1natefinch: last thing i saw was:15:53
rogpeppe1[15:45:56] <natefinch> rogpeppe: it's not the translation that is awkward, it's the fact that we lose whether or not a value was intentionally set.... also the zero value of Member is then a generally broken value, so we need AddressToMembers and DefaultMember.  All that can go away if we just make people deal with the fact that there are some optional values on Member15:53
niemeyernatefinch: Sweet15:56
=== bjf is now known as _bjf
natefinchrogpeppe1: no problem.  That was pretty much it... we could make accessor methods that return the right defaults, but you're right about printing it out16:03
natefinchrogpeppe2:  (retype of my last message) no problem.  That was pretty much it... we could make accessor methods that return the right defaults, but you're right about printing it out.  Seems like there's no real great way to do it while maintaining information about values that are unset.16:08
* rogpeppe3 has reached end of journey.17:16
rogpeppe3i can say definitively that east coast wi-fi is terrible...17:16
rogpeppe3happy weekends all17:16
hazmat? -> Copyright 2013 Joyent Inc.18:46
natefinchhazmat: ?18:47
hazmatnatefinch, joyent provider has that, pretty sure that's not the intent for cla18:47
hazmatcontributor license agreement18:48
natefinchhazmat: hah, I see.  Yeah, probably just old habit for them18:48
=== gary_poster is now known as gary_poster|away

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