/srv/irclogs.ubuntu.com/2013/01/25/#juju-dev.txt

mrammbar/cafe in 15 min?00:02
=== slank is now known as slank_away
wallyworlddavecheney: there's no easy way for me to call unexported functions on a struct from a test in different package is there? i want to be able to poke the internal state of something to set it up for a test but not have to use the public api which is insufficient00:30
davecheneywallyworld: var F = f()00:35
davecheneyput that in export_test.go00:35
davecheneyif they are methods then you can extend the struct in export_test.go and forward the methods00:35
davecheneyhang on, i'll find you a good example00:35
davecheneywallyworld: juju-core/environs/export_test.go is a good example of the former00:36
davecheneyjuju-core/environs/ec2/export_test.go is an example of the latter00:36
wallyworlddavecheney: but what about if the test code is in a different package to the unexported stuff00:37
davecheneyunpossible00:37
wallyworld:-(00:37
wallyworldthat's quite a limiation00:37
davecheneyit is the way it is00:38
davecheneystuffs either exported or not00:38
wallyworldso now we have to go and make a whole bunch of stuff public sadly00:38
davecheneyyup, Go has no concept of Protected or Friend00:38
wallyworldnp, thanks for clarifying00:38
wallyworldI keep running into such limitations with Go00:39
davecheneythere is a long and boring explanation that justifies it00:39
davecheneybut the short version is, it is what it is00:39
wallyworldfair enough00:40
davecheneywallyworld: one possibility00:43
davecheneyadd exported methods to your type00:44
davecheneybut return an interface to 'filter' those methods00:44
davecheneythen ou can type assert back to the original type00:44
davecheneythat may or may not be applicable00:44
wallyworlddavecheney: thanks, will look into that. the use case is that we have service doubles for nova etc, and want tests to be able to poke the internal state00:45
rogpeppe1davecheney: mornin'07:47
rogpeppe1wallyworld, jam: review of a trivial environs/openstack change? https://codereview.appspot.com/719605408:30
TheMueMorning09:28
rogpeppe1TheMue: hiya09:58
rogpeppe1TheMue: good conference?09:58
TheMuerogpeppe1: Yes, many interesting talks there (typically mostly not about our business but still good).10:09
TheMuerogpeppe1: And my own talk has been good, the people have been very interested (many questions).10:10
rogpeppe1TheMue: what did you talk about?10:10
TheMuerogpeppe1: Additionally my publisher and I had a possible idea for my next book. ;)10:10
TheMuerogpeppe1: I talked about world-wide distributed development of open-source software. Guess why. :D10:11
rogpeppe1:-)10:11
rogpeppe1TheMue: and your book idea?10:11
TheMuerogpeppe1: It's this time not technological, but about how to present or give talks from very small groups like in a pre-sales presentation over stuff like trainings or lightning talks in the own company up to talks on conferences.10:13
rogpeppe1TheMue: interesting.10:13
TheMuerogpeppe1: I like this topic since a longer time and we found, that many IT people have problems in present their ideas or products.10:15
TheMuerogpeppe1: Many are introverted, but after they visited a training they shall present it to the rest of the team. Or they shall support the sales team. Those are the people we wonna address.10:17
rogpeppe1TheMue: yeah.10:18
TheMuerogpeppe1: Yesterday I had to write my first obituary, Andreas Raab, a Smalltalk developer died. Has been a hard job.10:21
rogpeppe1TheMue: yeah, very hard to get right10:21
TheMuerogpeppe1: And how has the Juju week been?10:22
rogpeppe1TheMue: pretty quiet with william and yourself away10:22
TheMuerogpeppe1: OK, right now Daves timezone is really bad. So you only have been three.10:23
rogpeppe1TheMue: yeah10:23
rogpeppe1TheMue: i did manage to have a chat with dave for the first time this year a couple of days ago :-)10:23
rogpeppe1TheMue: 10pm for me, 9am for him...10:23
TheMuerogpeppe1: Hehe, yes, sometimes when I'm still in the net I see him starting his day.10:24
mgzdimitern: these bootstrap tests taking this long isn't normal, right? <http://paste.ubuntu.com/1569225/>10:33
mgz...no dimitern10:34
mgzoh, and rogpeppe has a branch up that looks pertinent10:35
mgzrogpeppe1: taking 12 seconds on that test still seems unreasonable, but your branch is an improvement10:38
rogpeppe1mgz: it was the first immediate cause that i could see10:39
rogpeppe1mgz: starting and stopping mongo is fairly slow and often accounts for quite a bit of time10:39
rogpeppe1mgz: 6s is spent compiling the juju source10:42
rogpeppe1mgz: that will probably drop when we move to using a single binary (linking is the slowest part of go compilation)10:45
rogpeppe1mgz: please respond to the review if you approve of it.10:45
mgzrogpeppe1: I'm on it.10:45
rogpeppe1mgz: ta10:45
mgz...I hate having to spend 5 minutes just to understand the imports when doing review... why is this in export_test.go but that is package openstack and imported from that name... ;_;10:54
mgzshall just trust it makes some kind of sense.10:54
rogpeppe1mgz: yeah too many "openstack" identifiers11:03
rogpeppe1mgz: openstack := openstack.New() :-)11:04
rogpeppe1mgz: things are easier when you have a tool that can reliably show you the definition of any identifier you find.11:05
rogpeppe1mgz: i could give you one, but you'd have to tool it into whatever editor you use11:05
rogpeppe1jam: second opinion on https://codereview.appspot.com/7196054/ ? it's pretty trivial.11:07
mgzrogpeppe1: Fridays aren't work days in UAE, dimitern should be around though?11:09
rogpeppe1mgz: doesn't appear to be11:09
rogpeppe1mgz: trivial enough to submit anyway?11:09
mgzyeah, I would.11:10
=== TheRealMue is now known as TheMue
TheMuerogpeppe1: I've got SMTP problems today with our server (IMAP is OK). Do you have the same troubles?13:12
rogpeppe1TheMue: looks ok. last message came in for me an hour ago. i'll try to see if i can send myself a message.13:21
TheMuerogpeppe1: Receiving is fine here too, only sending doesn't work due to an SSL error.13:23
rogpeppe1TheMue: yes, i'm getting email fine13:24
rogpeppe1TheMue: ah, ok, i'll try sending you an email13:24
rogpeppe1TheMue: ok, i've sent you an email.13:24
=== rogpeppe1 is now known as rogpeppe
TheMuerogpeppe: Has worked, hmm, have to look deeper. Thanks.13:27
TheMuerogpeppe: Ha, found it. It has been a change in my network configuration due to the conference rooms and the hotel. Now it is working again.14:01
rogpeppeTheMue: cool14:12
rogpeppeTheMue: are you back home?14:12
TheMuerogpeppe: Yep14:13
rogpeppefwereade: ping14:42
fwereaderogpeppe, pong14:42
fwereaderogpeppe, how's it going?14:42
rogpeppefwereade: not bad. i've just made a list of state entry points and the entities that currently use/need to use them14:43
rogpeppefwereade: http://paste.ubuntu.com/1569931/14:43
fwereaderogpeppe, excellent14:43
rogpeppefwereade: the fuzzy bits are around uniter14:43
rogpeppefwereade: (every time i say "restrictions?" it means i don't know what restrictions there should be14:44
rogpeppe)14:44
rogpeppefwereade: i'd appreciate it if you could go over it and have a check for sanity/omitted bits14:44
rogpeppefwereade: in fact, maybe i'll make it a google doc14:44
fwereaderogpeppe, +114:44
fwereaderogpeppe, one thing that leaps out is State.EnvironConfig, which the uniter uses but shouldn't14:45
rogpeppefwereade: https://docs.google.com/a/canonical.com/document/d/16irceDbjcOuQElcRT1pjL2cCbSF_-YSXg7Yte9Qf3RI/edit14:45
rogpeppefwereade: yes, i've got my eye on that14:46
fwereaderogpeppe, it just needs State.EnvironType14:46
rogpeppefwereade: indeed14:46
fwereaderogpeppe, and it's not clear why machines need charms or relations14:46
fwereaderogpeppe, re AssignUnit, would you take a look at https://bugs.launchpad.net/juju-core/+bug/1101139 and let me know your thoughts?14:47
_mup_Bug #1101139: units are not assigned transactionally <juju-core:New> < https://launchpad.net/bugs/1101139 >14:47
rogpeppefwereade: ah yes, those were from early in my list making, and i got it wrong.14:48
fwereaderogpeppe, cool14:48
rogpeppefwereade: fixed in the google doc14:49
fwereaderogpeppe, I seem to be view only on the doc14:49
rogpeppefwereade: are you as your canonical address?14:50
fwereaderogpeppe, it seems to think I am14:50
rogpeppefwereade: ah, sorry, i misinterpreted a message. changed.14:50
rogpeppefwereade: you should be able to edit now14:51
fwereaderogpeppe, cheers14:51
rogpeppefwereade: we're going to have to think carefully about permissions checking, and how to make so we don't incur an extra round trip (api server <-> mongo) on many operations just to check permissions.14:52
rogpeppefwereade: i'm just off to lunch. catch you in a little bit, i hope.14:52
fwereaderogpeppe, enjoy, please consider that bug I linked14:53
fwereaderogpeppe, it impacts that doc quite hard if I'm not on crack14:53
=== slank_away is now known as slank
fwereadearam, ping14:58
dimiternfwereade: hey, aram said yesterday he wasn't feeling well15:04
fwereadedimitern, heh, ok, I wish he'd mail us about this sort of thing15:05
dimiternfwereade: dunno15:05
dimiternfwereade: how's it going there?15:05
fwereadedimitern, np, thanks for letting us know15:05
fwereadedimitern, pretty good actually, I feel like we know what we're doing15:05
fwereadedimitern, how's the rock?15:06
dimiternfwereade: that's good! :)15:06
dimiternfwereade: raining pretty much every day lately.. but sometimes sunshine15:06
fwereadedimitern, cool, looking forward to coming back15:07
dimiternfwereade: it's seems the weather in the morning is plotting against my idea to go for a run - it  always pours early15:07
fwereadedimitern, haha15:07
dimiternfwereade: yeah, I realized I forgot to give you something from back home15:07
fwereadedimitern, yay, bulgarian deliciousness15:08
fwereadedimitern, looking forward to it :)15:08
dimiternfwereade: not really, this is more to look at :) one of my mother's pastels15:08
fwereadedimitern, oh wow!15:08
dimiternfwereade: I'll get it next time15:09
fwereadedimitern, excellent15:09
fwereadedimitern, I'll be back sunday lunchtime, flights permitting, and will probably be trying to stay up until night time, so I'll probably be around a bit15:10
dimiternfwereade: great15:10
fwereadebbiab15:10
dimiternfwereade: btw, if you happen to pass a book store which has Iain M Bank's The Hydrogen Sonata - it's worth getting one ;) excellent15:11
rogpeppedimitern, fwereade: i've almost finished Gone Away World, which is brilliant too15:50
dimiternrogpeppe: who's the author?15:50
rogpeppedimitern: nick harkaway.15:51
rogpeppedimitern: its his first novel15:51
fwereaderogpeppe, oh yes? cool15:52
fwereaderogpeppe, dimitern: I enjoyed Blue Remembered Earth (alastar reynolds)15:52
dimiternrogpeppe: i'll check it out, 10x15:52
rogpeppefwereade: i'll bring it to the sprint if you haven't got it first15:53
* TheMue just started Porterhouse Blue by Tom Sharpe. Not easy for a non-native speaker.15:53
dimiternfwereade: more reynolds stuff, good15:53
rogpeppefwereade: brilliant twists15:53
fwereaderogpeppe, cool, I might be up to date on your books by then :)15:53
rogpeppefwereade: :-)15:53
fwereaderogpeppe, excellent, it is always nice to be surprised -- the things in BRE that were, I think, meant to be surprises were... less so15:54
rogpeppefwereade: it's also extremely funny15:54
fwereaderogpeppe, and I've got a mental option on a surprise for the next book15:54
fwereaderogpeppe, excellent15:54
rogpeppefwereade: BTW are we always guaranteed that there's only one provisioner?15:55
rogpeppefwereade: how does that fit with HA?15:55
rogpeppefwereade: (looking at your description of the bug you mentioned)15:56
fwereaderogpeppe, IMO, no we are not, because we will require that the provisioner be HA as well15:56
rogpeppefwereade: so this is spurious, right?15:56
rogpeppewe could trust the Provisioner (which also has Environ access) to do exactly the same things... but without races (because there's only one provisioner).15:56
fwereaderogpeppe, I think I address that a bit further down, I'm talking about Right Now at that point15:56
rogpeppefwereade: ok15:56
rogpeppefwereade: ha, i thought i'd got to the end15:57
fwereaderogpeppe, ie we'll need some sort of magic locking for the provisioner and I'm comfortable handwaing that for now15:57
rogpeppefwereade: yeah. taking a lease on a unit might work for locking.15:58
fwereaderogpeppe, I'm partly wondering whether ultra-coarse-grained locking might be acceptable for the forseeable future15:59
fwereaderogpeppe, only one provisioner active at once15:59
rogpeppefwereade: doesn't it have to be some kind of lease? otherwise a hung-up provisioner will stop other provisioners from running.15:59
rogpeppefwereade: but coarse-grained is probably fine, yeah16:00
fwereaderogpeppe, sure, I'm just talking about the graininess16:00
rogpeppefwereade: big +1 on the suggestion in the bug16:00
fwereaderogpeppe, excellent, ty16:01
rogpeppefwereade: i don't think it loses generality, as we can always provide the means for a client to *specify* a machine when adding the unit, even if it doesn't allocate it itself.16:01
fwereaderogpeppe, yeah, indeed16:02
rogpeppefwereade: in that case, the unit may remain unassigned, but i think that's ok16:02
fwereaderogpeppe, hmm, we will need to be careful about that16:02
rogpeppefwereade: we could treat it as a broken unit16:02
fwereaderogpeppe, yeah, but we still need to write new code to handle it anyway16:03
rogpeppefwereade: it's really the responsibility of whoever is adding units, if they're specifying machines that clash.16:03
fwereaderogpeppe, a direct assignment from the CLI is not necessarily too horrible txn-wise16:04
rogpeppefwereade: but, yeah, it would be nice to be able to say "this machine should not be taken by a random addunit; save it for explicit assignment instead"16:04
rogpeppefwereade: ah that's true!16:04
rogpeppefwereade: the problem is in searching for an unassigned machine16:04
fwereaderogpeppe, it's just the assignment dance that gives me night terrors ;)16:04
fwereadeyeah16:05
rogpeppefwereade: yeah, it's not great, and there's no recovery.16:05
rogpeppefwereade: and this change would pave the way for set-unit-count too, if we wanted that16:06
fwereaderogpeppe, +116:06
fwereaderogpeppe, (I think we do, but there's no time for that this cycle ;))16:06
* fwereade slopes off for another ciggie16:06
rogpeppefwereade: indeed16:06
rogpeppefwereade: "(not deploy: relations added in AddService)"16:16
rogpeppefwereade: Conn.AddService calls State.AddRelation16:16
rogpeppefwereade: so i still think we have to say State.AddRelation is currently called by juju deploy.16:17
rogpeppefwereade: we may well wish to factor the juju.Conn calls into their own rpc calls though16:17
rogpeppefwereade: or... perhaps Conn.AddService no longer needs to add peer relations?16:18
fwereaderogpeppe, I'm about to propose that change16:19
rogpeppefwereade: ah!16:19
fwereaderogpeppe, I've actually dropped Conn.AddService -- the only thing it did was to choose a name for the service if empty16:20
fwereaderogpeppe, (apart from the relations, that is)16:20
rogpeppefwereade: +116:20
fwereaderogpeppe, actually, can I ask you to take a quick look at the reviews I have up? there are a couple with 1 LGTM16:22
rogpeppefwereade: ok, will do16:23
rogpeppefwereade: which one first?16:24
fwereaderogpeppe, cli-destroy-service is easiest16:25
fwereaderogpeppe, other ones in order16:25
fwereaderogpeppe, I ballsed up the prereqs a little, https://codereview.appspot.com/7205058 doesn't strictly require it, but I'm not changing it now... and the followup does require all the prereqs16:29
rogpeppefwereade: i'm getting "chunk mismatch" on https://codereview.appspot.com/7138062/16:29
fwereaderogpeppe, ah balls16:30
rogpeppefwereade: i can review the raw diffs though16:30
rogpeppefwereade: assuming they're not too involved16:30
fwereaderogpeppe, it's trivial frankly16:31
rogpeppefwereade: LGTM with a couple of trivial comments16:36
=== fss is now known as fsouza
fwereaderogpeppe, cheers16:39
=== fsouza is now known as fss
rogpeppefwereade: have you run all the tests on https://codereview.appspot.com/7205058/ ?16:58
fwereaderogpeppe, yes16:58
fwereaderogpeppe, is something obviously screwed?16:59
rogpeppefwereade: ah ha! i believe you haven't run the live tests.16:59
fwereaderogpeppe, ah!16:59
rogpeppefwereade: in livetests.go:16:59
rogpeppesvc, err := conn.State.AddService("", sch)16:59
fwereaderogpeppe, good catch, thank you16:59
* fwereade hangs head in shame16:59
rogpeppefwereade: it will probably work once you've fixed that, but worth running live tests anyway :-)17:00
fwereaderogpeppe, will do17:00
rogpeppefwereade: i think you've got reviews on everything now17:08
fwereaderogpeppe, <317:08
TheMueyip17:08
fwereadeTheMue, <3 also :)17:08
fwereadeTheMue, would you take a very quick look at https://codereview.appspot.com/7198051/ please?17:24
TheMuefwereade: Oh, missed it. Sure. *click*17:37
TheMuefwereade: You've got a +1 on it. ;)17:41
fwereadeTheMue, cheers17:46
TheMuefwereade: yw17:47
rogpeppefwereade: if you have some moments, it'd be great to fill out the rest of that api doc. particularly the uniter parts. i'm not sure what restrictions are appropriate for a uniter on accessing other units.18:24
fwereaderogpeppe, good point, ty18:24
rogpeppefwereade: have a safe trip back18:24
fwereaderogpeppe, cheers, have a good weekend :)18:24
rogpeppeand great weekends to all18:25
rogpeppeg'night18:25

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