/srv/irclogs.ubuntu.com/2014/09/24/#juju-dev.txt

menn0waigani: yep thanks. I changed parseTag during the meeting and those annotator tests started parsing00:03
menn0waigani: and I knew about the megawatcher change00:03
waiganimenn0: sweet00:03
menn0waigani: from reviewing the services change00:03
waiganimenn0: okay, i *think* they are the only spots that will need progressive updating as we migrate00:03
waiganiother than dealing with collection specific quirks of course00:04
menn0waigani: that sounds right00:06
menn0waigani: and then there's all the queries that need to be updated to filter by env uuid00:06
menn0waigani: but we should get the collections in shape first00:06
hazmatout of curiosity.. anyone using gooracle00:07
hazmatdavecheney, pong00:07
waiganimenn0: largely mechanical00:07
waiganihazmat: I wrote a sublime text plugin: https://github.com/waigani/GoOracle00:07
waiganihazmat: I use it most days, has really helped :)00:08
hazmatwaigani, nice.. i've got sublime.. but emacs users myself.. currently resurrecting my go editor conf.. oracle seems pretty sweet00:09
waiganihazmat: menn0 uses emacs with oracle00:09
waiganiI couldn't keep up with him, so a wrote the plugin for sublime ;)00:10
hazmatwaigani, solid.. i'm currently pimping my ride following along to http://yousefourabi.com/blog/2014/05/emacs-for-go/00:12
davecheneyhazmat: are you coming to paris on friday ?00:12
hazmatdavecheney, unclear.. its not sold out it is it?00:12
hazmatnope.. still avail00:12
hazmatoh.. crap.. super late bird only now00:13
davecheneyhazmat: well, you are super late00:13
hazmatdavecheney, its like SO next month :-)00:13
davecheneyhazmat: its like so 15 days away00:13
hazmatif i get through a day i'm on top of the world00:14
hazmatdavecheney, noted.. i'll have it sorted this week00:14
davecheneyhazmat: ok, if you get stuck I can ask the organisers00:15
davecheneyi won't be a free ticket00:15
davecheneybut we might be able to get you into the overflow00:15
hazmati gotta coordinate with sidnei he'll come out as well if i go00:15
davecheneyis sidnei still in zurich ?00:15
hazmatyup00:15
davecheneycool00:15
davecheneywell, let me know00:15
hazmatwill do00:16
hazmatheading out latter this week to surgecon.. aka disaster porn00:16
hazmathah.. twitter feed on that topic.. "Bryan Cantrill @bcantrill  ยท  8h Does systemd have you #illumos-curious? "00:17
davecheneylol00:47
davecheneysystemd-make-me-a-sandwich00:47
menn0hazmat, waigani: the oracle emacs integration is pretty good. I use go-oracle-referrers and go-oracle-implements fairly often.00:57
menn0thumper, davecheney: is the first line of this method a little crazy?01:10
menn0http://paste.ubuntu.com/8414641/01:10
menn0or is that intentional for some reason?01:11
menn0thumper, davecheney: actually I can understand why it might be making a copy, but assigning the copy to u seems a little sketchy01:13
* thumper looks01:13
thumpermenn0: where is the assigning to the copy?01:14
thumperoh01:14
thumperew01:14
menn0first line01:14
thumperwha...?01:14
thumperI'm guessing the reciever is effectively a value type01:15
thumperassigning to it means nothing other than saving declaring another value?01:15
thumperseems a bit esoteric01:15
menn0it would be clearer if done like this: u2 := &Unit{st: u.st, doc: u.doc}01:16
thumperagreed01:16
menn0ok.01:16
thumperor... unitCopy01:16
menn0as long as it's not a bug or pure evil01:16
thumperor whatever01:16
thumperI don't think it is either of those01:17
thumperjust a bit confusing01:17
thumperdavecheney: do you agree with that assessment?01:17
menn0thumper: using a longer than 2 character variable name??? That's crazy talk! This is Go!01:17
thumper:P01:17
menn0:)01:18
thumperaxw: you around?01:19
thumperaxw: two things, I just noticed that we have a ci blocker, see topic ^^^01:20
thumperaxw: secondly I want to chat to you about the gridfs storage stuff01:20
axwthumper: I am here now, sorry, bit late01:21
* axw looks at topic01:22
axwgah01:22
axwok, will get onto it01:22
axwthumper: what about gridfs?01:22
thumperaxw: I'm munch on lunch and then catch up01:24
axwokey dokey01:25
thumperaxw: mostly about how we store stuff in the paths and what impact multiple environments will have01:25
thumperif any01:25
* thumper is hoping for no impact01:25
axwmkay01:25
axwpaths already encode env UUID01:25
axwwe do need some modifications to pass in env-specific UUIDs though, atm it's just using State.Environment() to get the one and only UUID01:26
thumperaxw: hangout? https://plus.google.com/hangouts/_/gupglu6np5t3logeqtcab2praua?hl=en01:37
axwthumper menn0 davecheney: trivial review please: http://reviews.vapour.ws/r/91/ (fixes CI blocker)02:05
* menn0 looks02:06
thumperaxw: what happens if we run this test on arm or power?02:09
thumperaxw: should it work?02:09
thumperor do we mock out the architecture elsewhere?02:10
axwthumper: it's uploading fake tools, should work still02:10
axwthe UploadArches just tells the fake-tools-uploading code which arches to upload for02:10
thumperok, but uploading fake tools for only i386 and amd6402:10
axwit's ec2, there is only i386 and amd6402:10
thumperah, ok02:11
menn0thumper, axw: i've already given it a Ship it (looks through the code to figure out the above)02:11
thumperaxw: can I get you to add just a comment before the UploadArches?02:11
axwsure02:11
axwmenn0: thanks02:11
thumperaxw: just to say that if ec2 expands it architectures, we should add extra tools here?02:11
axwthumper: will do02:12
thumperthanks02:12
* thumper goes to rubber stamp menn0's review02:12
* thumper goes to make a coffee02:13
davecheneythumper: /me reads02:15
davecheneyhmm, that is some complex code02:15
davecheneysuch side effect02:15
davecheneymuch impurity02:15
menn0thumper, waigani: this units env UUID change has been tough, especially the unit watcher02:25
menn011 failing tests in state left02:25
menn0then the megawatcher change02:25
menn0and then the migration02:25
thumpermenn0: yeah, I thought it would be pretty shitty02:25
davecheneymenn0: i *think* that line 2 on that paste does not update u02:26
davecheneywell, it updates the copy of the pointer passed to WatachSubUnits02:26
davecheneybut that is fine02:26
menn0davecheney: that's the conclusion that thumper and I came up with too02:26
davecheneybut it's confusing code and should be rewritten02:26
menn0but it's not especially clear02:26
* menn0 nods02:26
menn0since finding that one I've found a few other methods that do the same thing02:27
davecheney*u = &Unit would update the caller's copy02:27
davecheneyactually02:27
davecheney*u = Unit02:27
menn0yep02:27
davecheneyu = &Unit changes the pointer value passed to you to point to something else02:27
davecheneyit's just a bit nuts02:27
thumperI'm pretty sure it is explicitly creating a copy as there will be a go-routine accessing it02:27
thumperand this way, they avoid extra mutexes02:28
thumperdavecheney: I agree, unclear code02:28
thumpermenn0: I suggest you create a new variable, not reusing 'u' :)02:28
menn0davecheney: as I said earlier something like u2 := &Unit{...} would have been much clearer02:28
davecheneyit updates u in the scope of that method02:28
davecheneybut to point to a new value02:28
davecheneynot the valye that u points to02:29
waiganiwhat code are you lot talking about?02:29
davecheneywaigani: http://paste.ubuntu.com/8414641/02:30
waiganithanks02:30
=== Ursinha-afk is now known as Ursinha
* thumper makes a sad face02:35
thumpersel := bson.D{{"_id", bson.D{{"$regex", "^" + regexp.QuoteMeta(ensureActionMarker(prefix))}}}}02:35
thumperiter := actionsCollection.Find(sel).Iter()02:35
thumperbodie_: you around?02:35
jcw4thumper: I may have been responsible for that code02:38
thumperjcw4: hey02:38
jcw4hey :)02:38
thumperjcw4: I'm looking at the collections working out what is needed for the multi-environments02:38
thumperwhat makes up the id for an action?02:38
thumperalso, what is the prefix normally in the above code?02:38
thumperas a general rule, I don't like encoding values into an id field that need to be decoded later02:39
jcw4thumper: the prefix of an action id is the id of the unit to which it has been queued02:39
jcw4thumper: agreed02:39
thumperjcw4: is an action always for a unit?02:39
jcw4thumper: at this point yess02:39
jcw4thumper: the intent is to allow prefixes of service id's too02:40
thumperjcw4: can you concieve of a time where it won't be?02:40
thumperhmm...02:40
jcw4thumper: although even in the case that an action is queued for a service I think it will ultimately end up queued for a unit02:40
jcw4thumper: so maybe not02:40
thumperjcw4: right, so the idea that the CLI says run this action for this service, and we create an action for each unit02:41
jcw4thumper: the main rationale for the prefix is so that the watcher can easily filter02:41
thumperthat exists at that time02:41
jcw4thumper: right02:41
thumperjcw4: was there pushback from someone about having a Unit field explicitly and independently from the id?02:42
jcw4thumper: long story - I think fwereade may have a strong opinion on it02:42
* thumper chuckles02:42
jcw4(but I don't want to put him on the spot)02:42
jcw4:)02:42
jcw4thumper: when I talk to you, my initial feeling that the id should not encode the unit id is re-inforced02:43
thumperthis may be a situation where fwereade and I both hold strong and opposing points of view02:43
jcw4thumper: however when I talk to fwereade he makes compelling case too02:43
thumperwhat is the case to keep it in the id,02:44
thumperapart from saving a few bytes?02:44
jcw4thumper: I beleive the primary reason is to make the watchers efficient02:44
thumperah fark02:44
thumperthat's wright02:44
thumpermost of the watchers only see the id field right?02:45
jcw4thumper: exactly02:45
thumperwright?02:45
thumperright!02:45
jcw4haha02:45
thumperfudge cake02:45
jcw4thumper: that being said, I think env UUID prefix on the unit would transparently flow through to the action?02:46
thumperI hate designing our system around problems that we have made for ourselves02:46
davecheney*cough* mongo02:46
thumperjcw4: no...02:46
davecheneywhere is wallyworld when you need him02:46
thumperjcw4: not exactly02:46
thumperjcw4: the way we are dealing with the environment uuid is as follows02:47
* jcw4 leans forward02:47
thumperjcw4: and we may want to tweak the actions collection too02:47
thumperjcw4: we read the full document02:47
thumperjcw4: and then prefix the existing _id field with "<env-uuid>:"02:48
thumperjcw4: also adding "env-uuid": <env-uuid>02:48
thumperjcw4: and changing the existing _id field to something meaningful02:48
thumperlike "name" or "foo"02:48
thumperjcw4: I think it would be worthwhile also adding in "unit"02:49
thumperjcw4: when we do the schema migration for actions02:49
jcw4thumper: prefixing the existing _id field and then adding something meaningful?02:49
thumperjcw4: the service document changes are now in master02:49
thumperjcw4: do you have an up to date master as of about 18 hours ago?02:49
thumperjcw4: I'll explain02:49
jcw4thumper: yep02:49
jcw4thumper: lemme look02:49
thumperhangout?02:49
jcw4sure02:49
thumperjcw4: who do I add?02:50
jcw4johnweldon4@gmail.com02:50
thumperkk02:50
thumperhttps://plus.google.com/hangouts/_/g424bdmxb7yrh4awwwarvkuw7ia?hl=en02:50
thumperjcw4: this commit: 59cfe5aff287b46de440e45dfc2aa25b34dac57103:10
thumperjcw4: git diff 3c0b77b..59cfe5aff03:11
jcw4thumper:  git diff 59cfe5aff^..59cfe5aff03:16
thumperjcw4: ah, that works too? I'm assuming it takes the first parent if a merge?03:21
jcw4thumper: yeah I think so03:49
jcw4thumper: http://git-scm.com/book/ch6-1.html#Ancestry-References03:53
thumperjcw4: cheers03:54
menn0thumper, waigani: almost done with the units env uuid work04:13
thumpermenn0: awesome04:13
waiganimenn0: nice04:13
menn0thumper, waigani: just saw this in TestAddEnvUUIDToServicesIDIdempotent:04:13
menn0serviceResults[0].DocID = s.state.docID(serviceName)04:13
menn0}04:13
menn0that's supposed to be an assertion04:14
menn0thumper, waigani: we all missed it :(04:14
waiganiyikes04:14
thumperhaha04:14
thumperyep04:14
* menn0 fixes04:14
waiganithank you04:14
menn0waigani, thumper: fixed. thankfully the tests pass with the assert in place04:15
thumper:)04:16
waiganifew04:16
thumperphew?04:16
waiganitrue04:17
* thumper whimpers04:29
* thumper head desks04:30
thumpermenn0: is the upgrades collection used solely by the state servers to synchronise updates?04:32
menn0thumper: yep04:33
menn0thumper: although Will and I were thinking of using it to report the status of the last upgrade in the juju status output04:33
thumpermenn0: so, about env-uuid, should we add it?04:34
menn0thumper: probably not... since the upgrade isn't environment specific04:34
thumperwell... it sis04:34
thumperis04:34
menn0thumper: the status thing isn't planned for any time soon04:34
menn0thumper: well it is sort of04:34
thumperyeah, sort ov04:34
thumperof04:34
menn0thumper: the state server upgrade aren't04:34
thumperugh04:34
menn0thumper: the whole upgrades with MESS thing needs to serious thought. Maybe a good topic while we're in Brussels?04:35
thumperprobably04:35
menn0thumper: for your current planning I would lean towards not including the env UUID in the upgrades doc04:38
thumpermenn0: that is what I have decided too for now04:38
menn0thumper: k04:39
menn0thumper, waigani: the tests for adding env uuid to services and units are now each one line04:45
menn0the test implementation is generic and works for units and services04:45
thumperwoot woot04:46
menn0it should now be much easier to add more env UUID migration steps04:46
menn0about to try a similar refactoring for the upgrade steps themselves04:46
thumpermenn0: we also need to talk about what backup means for other environments04:49
menn0thumper: definitely04:49
=== thumper is now known as thumper-cooking
jcw4thumper-cooking: http://reviews.vapour.ws/r/92/ (fwereade and TheMue too)04:58
menn0thumper-cooking: env UUID change for units here: http://reviews.vapour.ws/r/93/diff/05:27
axwwaigani: if you're still working, can you please take a look at my response to your review?05:46
waiganiaxw: done05:50
axwwaigani: thanks!05:50
axwdavecheney: you too, if you don't mind - there's two issues you raised that I didn't resolve, but commented on05:51
davecheneyaxw: /me looks05:54
davecheneyaxw: which link ?05:54
=== uru_ is now known as urulama
axwsec05:54
axwdavecheney: http://reviews.vapour.ws/r/82/05:55
davecheneyaxw: i can't see your comments05:56
axwdavecheney: nothing shows up next to your comments on the front page?05:57
axwdavecheney: there were two things unresolved: you asked if RB screwed up the formatting; looks fine to me on RB, and go fmt is happy anyway05:58
axwthe other was whether we should return an error from StartInstance if we can't record the instance-id05:58
axwand I said no, because (a) we never recorded instance-ids for non-bootstrap machines before (known deficiency), and (b) if we fail to do it for bootstrap ,we'll have other issues anyway and bootstrap will tear down05:59
davecheneyaxw: nope, can't see your comments06:08
davecheneydid you publish them ?06:08
davecheneynah, RB is screwing up the indentation of some blocks06:09
davecheneyit's happened on other reviews as well06:09
axwdavecheney: yes, I did publish. weird, looks fine on my end06:09
davecheneygreat, it's not even showing me my comments uinless i'm on the review screeen06:20
davecheneyit won't show them on the diff screen06:20
davecheneywhat the f06:20
axwdavecheney: thanks. comments on the diff screen show up as a little box on the LHS, which you need to hover over06:28
davecheneyyup, couldn't see them06:28
davecheneyhonestly given up06:28
davecheneyyour change is good06:28
davecheneyno need to sweat the small stuff06:28
axwhrm, yeah not showing up for me either. maybe because I uploaded a new changeset? I dunno06:29
=== thumper-cooking is now known as thumper
axwwoot, once more step till Environ.Storage() is no more06:29
axwone*06:29
thumper\o/06:30
* thumper looks at the reviews06:30
* thumper takes a deep breath06:30
davecheneyaxw: i've no fucks left to give rb06:31
axwheh :)   I must say I'm not overwhelmed by it, I'd gotten used to GitHub reviews06:32
* thumper headdesks06:34
thumperfwereade: have you started?07:11
thumperguess not07:13
mattywmorning folks07:46
dimiternmorning mattyw07:49
dimiternmattyw, you're OCR today, right? have a look at http://reviews.vapour.ws/r/95/ please?07:50
mattywdimitern, be happy to07:51
rogpeppedoes anyone know if it's ok to have a non-subordinate relation to juju-info ?08:35
rogpeppefwereade: ^08:35
rogpeppedimitern: ^08:37
dimiternrogpeppe, why not? it's not bound to subordinates afaik08:39
rogpeppedimitern: i *thought* it's probably ok, but i'm just writing some relation-verification code in the charm package and wanted to check08:39
rogpeppedimitern: i'll assume it's ok for now. the code in the state package doesn't look as if it complains08:40
dimiternrogpeppe, but in general, using juju-info is frowned upon08:40
rogpeppedimitern: frowning isn't relevant here :-)08:40
dimiternrogpeppe, :) just saying08:41
mattywdimitern, LGTM09:08
dimiternmattyw, cheers!09:08
fwereaderogpeppe, sorry I missed that -- but yeah I think it's fine09:16
rogpeppefwereade: cool, thanks09:16
fwereaderogpeppe, pretty sure that if it wasn't we would have scoped it differently09:16
rogpeppefwereade: yeah09:16
fwereaderogpeppe, I think one of the possible use cases was a penetration testing charm :)09:18
rogpeppefwereade: nice idea09:18
mattywreviewboard seems slow today - anyone else seeing that?09:19
jamaxw: aren't you supposed to link your RB review back to the original branch somehow? (like via a github PR? )10:03
axwjam: could be helpful I guess - I didn't think anyone would care about the PR10:38
axwI can do that tho10:38
jamaxw: so *I* occasionally like to actually download the code, and that is hard to do from just RB10:41
axwfair enough10:42
jamaxw: in this case, I trolled github and found your PR and your branch, but it would be nice to have a direct link (though even just to the git branch would be fine for my purposes)10:42
* axw nods10:43
jamthough I don't think github makes it easy to see what PR's a given branch is involved in10:43
jamI can see what PRs are proposed to go into a branch, but is there an obvious "this branch is proposed in these PRs" ?10:43
axwnot that I'm aware of10:43
jammattyw: it seems intermittent, and I'm seeing slowdown elsewhere, so I'm wondering if it is "Internet" or RB10:45
mattywjam, it feels like it's just slower on the larger reviews10:46
jamdimitern: standup ?10:47
dimiternjam, omw10:47
perrito666morning10:54
dimiternfwereade, jam, mattyw, axw, please take a look http://reviews.vapour.ws/r/96/11:16
mattywdimitern, looking11:17
dimiternmattyw, ta!11:18
mattywdimitern, one thing from me, might be something we need to discuss11:29
dimiternmattyw, I haven't changed the behavior what's allowed and what's not, I just converted the check already in place to use AuthFuncs11:30
* mattyw looks again11:31
mattywdimitern, I see it now - that's a great point - and a potential bug - thanks very much11:32
dimiternmattyw, sure, np11:33
mattywfolks, just wanted to say I've landed some code that fails the go vet test because I forgot to enable the pre push hook - this is me saying I'm sorry, it won't happen again11:55
jammattyw: I'm thinking mgz should be aware that the bot should be running go vet if we want to require it11:56
perrito666mattyw: we love you anyway11:57
jammattyw: I don't hold people to very high "you must be very careful doing X", but I do hold our *process* to that standard. So if something happened that shouldn't have, that is more a sign that we're missing a step.11:58
jamespecially something like 'go vet' which is highly automatable11:58
mattywperrito666, I have to assume you love me because of all this ;)11:58
mattywjam, in that case think of me as a part time - "problem in process finder"11:58
axwfwereade: if you have any time today, I'd appreciate if you could weigh in on http://reviews.vapour.ws/r/94/ -- just to make sure I've not veered wildly off course11:59
jammattyw: everybody makes mistakes in process, which is why I don't feel bad.  Anytime the design of something is "as long as we're careful" that's a sign of something brittle that should be done differently.11:59
jammattyw: we wouldn't need a test suite if we were just careful enough to not make mistakes :)12:03
mattywjam, sounds awesome - let's do it!12:09
rogpeppejam: what state is charm.v4 in? is it ok to move the charm store to use it?12:09
jamrogpeppe: the only change there (to my knowledge) is updating the gocheck dependency, so it will still need to have v3 merged into it12:09
rogpeppejam: cool, thanks12:09
rogpeppejam: i have actually been applying v3 patches to v4 too, so all should be ok12:10
wwitzel3jam: any idea why I would still be getting the, ERROR unknown object type "RunCommand", error from the rpc reflection, even though I've defined an init, registered a common facade 'RunCommand', and added that import to allfacades?12:50
perrito666wwitzel3: not using upload tools?12:51
wwitzel3using upload-tools12:53
perrito666wwitzel3: facadeversions?12:57
perrito666with capital V12:57
wwitzel3perrito666: ?12:58
wwitzel3perrito666: isn't facadeVersions built from registered facades?12:58
perrito666I am checking Backups facade to see what other steps are required12:58
perrito666wwitzel3: I see a map of strings and numbers12:59
wwitzel3perrito666: I do too :/12:59
wwitzel3first time noticing it, le sigh12:59
perrito666it would be nice to have a facade todo list :p13:00
wwitzel3I even read through TheMue's API implementation doc, and I don't recall it mentioning facadeversions, but I probably just missed it.13:01
TheMuewwitzel3: the current proposal? pushed it yesterday again.13:03
jamwwitzel3: I'd have to see your code to give you any hints13:04
wwitzel3TheMue: yeah, current version, I didn't see any mention of api/facadeversions13:05
wwitzel3jam: well perrito666 pointed me at facadeversions which has me getting a different error now, but it is progress :)13:05
TheMuewwitzel3: ah, ok, currently I only cover the server-side13:05
jamwwitzel3: sure, but I'll help you with it if you point me to code.13:06
wwitzel3TheMue: I'll write some notes so I can help fill out the client side13:06
perrito666wwitzel3: backups is very cool for that, its a very uncommon word so it makes easy to find what must be done for a faade13:06
TheMuewwitzel3: great, thanks13:07
wwitzel3jam: https://github.com/wwitzel3/juju/blob/ww3-juju-run-with-context/apiserver/runcmd/runcmd.go13:07
wwitzel3jam: and the client is https://github.com/wwitzel3/juju/blob/ww3-juju-run-with-context/api/runcmd/client.go13:08
wwitzel3jam: the new error is ERROR no such request - method RunCommand(1).Run is not implemented .. that is after adding RunCommand, 1 to api/facadeversions.go13:09
jamwwitzel3: your Run() function takes a slice13:10
jamyou're only allowed to put structs13:10
jamso if you need a slice, then you need a struct that has a slice13:10
jamwwitzel3: I *think* if you run at the right debug level the RPC code will tell you that it is discarding certain functions (and hopefully why)13:11
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: see calendar | Open critical bugs: None
jamwwitzel3: make sense?13:11
wwitzel3jam: yep, makes sense13:12
jamwwitzel3: so without setting facadeversions, it was probably using BestAPIVersion to then request version 0 of the facade, which didn't (and shouldn't) ever exist13:13
jamwwitzel3: and Run() just wasn't being exposed because it was taking a slice.13:13
wwitzel3jam: thank you13:14
wwitzel3perrito666: thank you13:14
perrito666wwitzel3: np13:14
mattywdimitern, http://reviews.vapour.ws/r/96/ ship it13:23
mattywcan I get a quick review from someone? I'm OCR today but I don't trust myself: http://reviews.vapour.ws/r/97/13:28
rick_h_mattyw: that's a decent excuse I suppose :P13:29
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: see calendar | Open critical bugs: 1373424
sinzuifwereade, can you comment on bug 1372016. We either have a bug in the API or we need to document that clients cannot assume that the error information is in a consistent place14:02
mupBug #1372016: api errors coming back in response instead of envelope <api> <juju-core:Triaged> <https://launchpad.net/bugs/1372016>14:02
* fwereade looks14:02
jamsinzui: fwereade: I think the statement there is "if your whole request is invalid, Error is on the overall scope", if one of the pieces of your request is invalid, then that piece gets the error.14:03
jamsince EA now takes a slice of machines, right?14:03
=== kadams54_ is now known as kadams54
jam(most bulk apis work this way, just because 1 entry of a slice is bad, we don't error on the whole request)14:04
sinzuijam, fwereade, thank you. since we don't have a time machine to fix old envs, it might be true that all API clients need to check for the error in many locations14:04
fwereadejam, sinzui: yes, the top-level errors are not the primary way of discovering problems at all -- if things are so bad that we can't give you the usual response, that's where the error will be14:04
natefinchgsamfira: can you join #juju? someone is having difficulty deploying a windows charm14:08
gsamfiranatefinch: joined14:19
sinzuinatefinch, can you ask someone to look into bug 1373424. I think the issue has been in the code for a long time14:22
mupBug #1373424: method Client.AddMachinesV2 is not implemented <api> <ci> <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1373424>14:22
natefinchsinzui: will do.14:23
wwitzel3is there a good way to check the type of error? in this case I want to check if the error is one of the ERROR from the rpc, so I can attempt to call the old API client.14:30
wwitzel3ahh found it, in apiserver/params/apierror14:32
natefinchif v, ok := err.(SomeErrorType) ; ok {  // it's that type, v is the value of that type }14:36
natefinchwwitzel3: standup?15:06
gsamfiraheya guys. This PR: https://github.com/juju/utils/pull/27 has been reviewed. Can we merge it?15:09
=== arosales_ is now known as arosales
=== fabrice is now known as fabrice|family
katcomattyw: can i get a (hopefully) final review and "Ship It!" (if appropriate) on http://reviews.vapour.ws/r/66/?16:22
mattywkatco, of course16:23
katcomattyw: thanks :)16:24
=== jheroux_away is now known as jheroux
=== urulama is now known as urulama-afk
mattywkatco, done, not quite "Ship it" from me I'm afraid16:45
katcomattyw: no worries, doing a good job.16:46
katcomattyw: i struggle with the split comments however. all that does is just shift the functions to a broader scope and possibly introduce new parameters due to lack of closure16:46
katcomattyw: defining several functions within a function is a pattern, and it's a bit like defining a class w/o the boilerplate.16:47
mattywkatco, I'm fine with the functions being unexported and only being used in FormatSummary. For me it's all about how much I can keep in my head. I don't mind a function having a number of inputs as long as I can quickly work out what it's doing. When functions get long I start getting confused. There's the rule of thumb that a person can remember about 7 "things". With closure I have to remember what they do but also work16:52
mattywout what parts they're closing over16:52
mattywkatco, if it's all split out that I can usually look at a single function, work out what it does then only need to remember the one thing it does when I go back to what's calling it16:52
katcomattyw: can't you do that within the scope of a function?16:53
katcomattyw: closures are exactly equivalent to classes, except you can't modify the member variables they close over.16:53
katco(outside the scope of what they close over)16:54
mattywkatco, yes, but the larger the scope the harder is is to do16:54
katcomattyw: which is equivalent to "the more member variables, the harder..." i think16:54
katcomattyw: well, you're the second one to bring it up, so i'll move one scope-level higher and make it a class16:58
mattywkatco, sorry - I wasn't ignoring you I was just thinking16:58
katcomattyw: no worries at all16:58
mattywkatco, I don't think you need to go that far, I agree with you that it adds boiler plate16:58
mattywkatco, and as you say the more fields the harder it is to work out what's going on16:59
mattywkatco, I think if you just turned the closures in that function into seperate functions that would be a good start - conceptually nothing much would have changed, but the FormatSummary function would be shorted and I think easier to read17:00
katcomattyw: i guess i just don't like the idea of them floating around when they're only hyper-specific to the summary formatter17:00
mattywkatco, I sort of know what you mean17:01
mattywkatco, I agree. But the reason they are floating around is because people are weak. They're floating around to make a function with lots of things to do look smaller17:02
katcomattyw: mmm... like if this were java, and the summary function were a class, this would look exactly the same indentation-level wise17:03
katcomattyw: i am trying not to be too obstenant, but i'm struggling with why it's easy to refer to top-level functions, but not variables which are functions17:04
wwitzel3katco: it is about the noise ratio, with the variables, I have to stop reading. with extracted methods, I can read to the end, I don't have to remember to stop.17:06
wwitzel3katco: so as I'm reading through format summary, I am getting bogged down with the implementation specifics of each step17:06
wwitzel3katco: when what I really want to read is each step, then go see the specifics, when/if/should i care to17:07
katcowwitzel3: i guess i just scan over closures unless i care what they do. sounds like i'm a weirdo ;)17:08
=== ev__ is now known as ev
wwitzel3no you're just a lisp programmer / emacs user17:08
katcowwitzel3: rofl17:08
wwitzel3oh right, you said weirdo .. correct17:08
wwitzel3:P17:08
=== JoshStrobl is now known as JoshStrobl[AFK]
katcobam!17:08
katcoand to be fair, i think i can only barely claim to understand lisp. i've not used it that much. but i am trying to change that ;)17:12
mattywkatco, you are an emacs user though right?17:21
katcomattyw: absolutely17:21
mattywwwitzel3, vim?17:22
katcomattyw: i make fun of myself, but i love that editor17:22
mattywkatco, I moved from emacs to vim I'm afraid17:23
katcomattyw: the only thing i argue vehemently to people is that they learn 1 editor deeply17:23
katcomattyw: i think it's unproductive to argue over what works for you hehe17:23
mattywkatco, +100017:24
wwitzel3mattyw: yeah, vim :)17:25
wwitzel3katco: +1 on learning one editor really well17:27
katcowwitzel3: it's like right above your brain on the programming stack. really important.17:28
wwitzel3katco: yep, I try to go through some commands so I don't forget them, even if I haven't needed some of them in a while.17:29
wwitzel3katco: I hate the context switch of .. oh how I do do that?17:29
katcowwitzel3: see in emacs, that's just C-s (get up and flush the toilet) M-` 1 2 3 Q17:30
katcowwitzel3: do you do vimgolf?17:30
wwitzel3katco: haha, I did for a bit, it makes you faster for a while17:31
wwitzel3then it makes you slower trying to find obscure ways to avoid keystrokes17:31
wwitzel3until eventually vim is a regex parser17:31
katcorofl17:31
wwitzel3natefinch: heading to moonstone17:32
natefinchI like thinking about my code not my editor.  That's why I use "dumb" gui editors like sublime :)17:32
natefinchwwitzel3: omw too17:32
natefinchI know like 3 hotkeys that are specific to sublime and that's it17:32
mattywcalling it a day folks, see you all tomorrow17:35
katcomattyw: ty for the review, i'll make those changes17:36
mattywkatco, ping me when you want to take another look17:37
katcomattyw: will do17:37
mattywnight all17:37
natefinchhazmat: HA meeting?18:02
hazmatyup18:03
sinzuinatefinch, this job is failing. I changed the test to help juju pass http://juju-ci.vapour.ws:8080/job/functional-ha-backup-restore/759/console I see (error: cannot re-bootstrap environment: restore does not support HA juju configurations yet) and it worries me. this looks like a policy change that breaks a test18:34
perrito666sinzui: :| what?18:35
perrito666that has always been there and I never in my life saw it triggered18:35
=== mup_ is now known as mup
perrito666ok, so suddenly environs.Environ StateServerInstances is returning something differnet18:45
sinzuiperrito666, All three tries with the revised test consistently show "error: cannot re-bootstrap environment: restore does not support HA juju configurations yet" I recall the rule is that the restore returns a single state-server and the user can run --ensure-ha again18:54
sinzuiperrito666, there was traffic on one the mailing lists where we recommend to backup the state-servers in HA because it is always a last restore in a catastrophe18:56
perrito666sinzui: the thing is, what restore does not support is to restore while other state servers are up and running19:01
sinzuiperrito666, right, and the test shows they were deleted using nova.19:02
=== jog_ is now known as jog
perrito666sinzui: I do see the deletion taking place after the error19:05
sinzuiperrito666, the console logs are out of order because the error is reported last. when I see http://juju-ci.vapour.ws:8080/job/functional-ha-backup-restore/760/console, I see the 3 state-servers deleted, then the restore is started, but it fails, then the status/destroy-env cleanup code is run, then we see the error message from rstore19:10
* sinzui changes test to print the error immediately so that the older of events is clear19:11
natefinchkatco: do you know if your team has scheduled time to make the debug-log fix from the pain points document?19:13
natefinchkatco: (that the filter requires using the internal juju identifier, not the CLI-style unit/0 identifier)19:13
katconatefinch: um, i know ian sent out some bugs to work on while he was out if we ran out of things to do19:16
katconatefinch: let me check those19:16
* sinzui re-runs test with better output19:16
perrito666sinzui: tx19:17
katconatefinch: are you referring to the customer pain points doc?19:18
natefinchkatco: correct19:21
katconatefinch: he prioritized the apt-related bugs for axw and i19:21
natefinchkatco: ok19:21
katconatefinch: and for me, that was prioritized behind the status work (also in that document)19:21
natefinchkatco: ok, cool.  I was thinking of having one of the people on my team tackle the debug-log change and didn't want to overlap.  Sounds like there wouldn't be overlap, so that's good.19:22
katconatefinch: yeah i think you're gtg.19:22
katconatefinch: i am half-remembering that i thought someone was looking at this already. for some reason voidspace comes to mind19:23
natefinchkatco: ok, I'll just email out on the list, then.  no big rush19:23
perrito666sinzui: lemme know when you have logs19:24
sinzuiperrito666, I am watching http://juju-ci.vapour.ws:8080/job/functional-ha-backup-restore/761/console, and it think we are 45 minutes away from completion19:26
perrito666sinzui: :( ok, ill take a look in 4519:26
sinzuiperrito666, It is failing at this minute: http://juju-ci.vapour.ws:8080/job/functional-ha-backup-restore/761/console19:50
perrito666sinzui: very odd, I do see something different20:02
perrito666WARNING: Could not find the instance_id in output20:02
perrito666which comes from assess_recovery.py line ~9420:02
hazmataxw, ping re https://bugs.launchpad.net/juju-core/+bug/137359220:02
mupBug #1373592: When bootstrapping select-zone could retry if the instance-type is full in the region <papercut> <juju-core:New> <https://launchpad.net/bugs/1373592>20:02
perrito666sinzui: and it suggests that at that point restore failed with the HA error once20:03
perrito666and then you delete and after that it fails again with the same20:03
sinzuiperrito666, your script is old.20:04
sinzuiperrito666, update to pull the test changes20:04
sinzuiperrito666, the failure you are seeing is because the test wanted to get the instance_id that was rejected. It isn't used, so I change the test to just warn that juju no longer tells us what was rejected.20:06
perrito666sinzui: my script? I am copying that from jenkins20:15
sinzuiperrito666, sorry, more ambiguity. the error is note the test, the test is showing why juju refused to restore to a working state-server (juju-restore correctly refused to restore because the state-server was still up.). That is correct. The test once looked for the instance_id in the text. Once we are certain juju wont do something dangerous, the script will remove all 3 state-servers, then we see "starting restore", followe20:18
sinzuid by "Restore Failed"20:18
perrito666sinzui: so the test should no longer look for the instance_id_20:19
perrito666?20:19
sinzuiperrito666, that is right. the test is correct. Why is juju showing a message that contradicts what CTS advises when we restore (error: cannot re-bootstrap environment: restore does not support HA juju configurations yet)20:21
perrito666sinzui: what I am trying to clarify is, if the test no longer looks for the instance_id is why jenkins still shows the error as if the test was looking for it20:22
sinzuiperrito666, because I wanted a warning in place. I think the missing instance_id means juju's has intentionally introduced a regression20:23
perrito666sinzui: ok, since restore has not changed I will guess that this is an unrelated regression that broke restore by accident, ill try to find it20:24
perrito666btw something else the description on the jenkins job is odd20:25
perrito666the revision for the first failure is 0fafcd986aa7501e9796519a2c432c16fe5b231f20:25
perrito666yet it says: gitbranch:master:github.com/juju/juju r0fafcd9820:26
perrito666shouldnt the hex be the shortform for the sha?20:26
perrito666bbl20:28
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: see calendar | Open critical bugs: 1373424 1373611
sinzuiperrito666, I need to remove the 'r' the 'r' is from the days of testing bzr revnos20:35
fwereadenatefinch, if thumper wasn't fixing the debug-log mess I don't think anyone else was20:47
fwereadenatefinch, I would be most grateful if you would unfuck that20:47
natefinchfwereade: heh ok20:47
thumperfwereade: ping?21:38
perrito666sinzui: back21:38
=== jheroux is now known as jheroux_away
fwereadethumper, heyhey, just having a ciggie, with you in 521:54
thumperfwereade: ack21:54
perrito666sinzui: ping me when you have a moment21:55
sinzuiperrito666, I am about21:55
perrito666ok just if you can resolve my doubt about the commit hash so I know where to start looking21:58
sinzuiperrito666, I will arrange for that annoying 'r' to be removed tomorrow from future hashes. Maybe I can also get the branch and hash added to the tests that are missing that info22:02
perrito666sinzui: duhhh22:03
perrito666sorry I hadnt noticed the r22:03
perrito666my apologies22:03
* perrito666 prepares coffee22:03
perrito666sinzui: well Iam looking at the offending commit.. as usual, does not seem to change anything relevant... such is life22:05
sinzuiperrito666, no need to apologise. Humans should work with Jenkins. We are adding links to the s3 data now. next week, engineers can go to pages like this to download everything that the tests collected http://reports.vapour.ws/releases/187122:05
sinzuiperrito666, there are three suspects https://bugs.launchpad.net/juju-core/+bug/137361122:05
mupBug #1373611: cannot restore a HA state-server <backup-restore> <ci> <ha> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1373611>22:05
sinzuiperrito666, and I agree non look like they wanted to change restore22:06
perrito666whyy whyyy always something breaks the commit is so long22:08
waiganiOn ReviewBoard, is there a way/place to see a list of review requests that you are involved in?22:13
waiganior a list or your reviews?22:15
ericsnowwaigani: 2 places: "Outgoing" and via some of the columns22:16
perrito666sinzui: it does not really matter that filter should be removed since I made restore HA compatible, pushing a fix22:17
waiganiericsnow: what I'm actually after is a list of my reviews - is that possible?22:17
waiganiI did a bunch yesterday and now I need to follow up22:18
ericsnowwaigani: one of the columns is "My Comments" (it shows a colored square with a curly right edge)22:19
waiganiericsnow: right, just found that, thanks22:19
ericsnowwaigani: np22:19
perrito666who is OCR?22:24
perrito666http://reviews.vapour.ws/r/101/22:24
perrito666or who would be so nice to R this anyway, it is extremely trivial22:24
perrito666sinzui: that patch fixes the issue22:25
perrito666I am not sure if this is a regression or what in the universe22:25
sinzuithank you perrito666. I really appreciate your fast response22:26
thumperperrito666: if it works in HA, I'm +122:48
perrito666thumper: sinzui my theory is that a bug that had environs.Environ StateServerInstances returning the wrong number of instance ids was fixed and that is why that condition triggered23:30
perrito666after I finish to put the groceries I just bought Ill merge it tx for the review thumper and ericsnow23:31
menn0thumper: can you remind me of how to get a State connected to another env in tests? you mentioned something recently.23:50
thumpermenn0: st.ForEnviron(tag)23:50
menn0thumper: cheers. I had been searching but it wasn't jumping out.23:51

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