/srv/irclogs.ubuntu.com/2013/05/20/#juju-dev.txt

thumperdavecheney: does go test buffer output?02:20
* thumper loses davecheney02:47
thumperhmm...02:47
* thumper waits 02:47
jamwallyworld_: if you prefer today, https://plus.google.com/hangouts/_/750982817f7631223162e5af2eceb6726c27bfe305:58
=== tasdomas_afk is now known as tasdomas
jamthumper: /wave07:03
rogpeppe1mornin' all07:42
dimiternmorning!07:44
thumperjam: oh hai08:29
thumperjam: just read your email respons08:29
jamhi thumper08:29
thumperjam: I'll pop back in in 30min to see if fwereade is around08:29
jamI'm pretty sure william is gone today08:29
thumperah, that's right08:30
thumperleave08:30
thumpergeez08:30
jamso we can check in 30min, but probably just going for tomorrow might work better08:30
dimiternthumper: fwereade is gone all week btw08:30
jamdimitern: thanks for the clarification.08:30
jamhe still wanted to meet with us during that time, but it is hard to meet up today.08:30
jamthumper: I can do the same time tomorrow08:31
jamthumper: does it work for you?08:31
dimiternjam: not sure about that - he'll probably pop in at some point in irc at least (provided he has decent connection in backwater gozo :)08:31
thumperjam: can you do now?08:32
thumperhi dimitern08:33
jamthumper: I could do now for a bit. I techincally have a call with dimitern in 30min, but I think he would accept moving it around a bit.08:33
jamobviously mark won't be there.08:33
dimiternthumper: do you have 5m about a couple of bzr pipes question?08:33
thumperjam: we could be done in 30 minutes08:33
thumperjam: I don't think there is that much to discuss :)08:33
dimiternthumper: hiya08:33
thumperdimitern: leave the question and I'll answer as fast as I can08:33
dimiternjam: sure, np moving it later08:34
thumperjam: I'm fine with mark not being there08:34
thumperjam: lets hang out08:34
thumperoh for the love of god why did hangouts get so hard to start?08:35
jamthumper: https://plus.google.com/hangouts/_/16239e7d8ea236f8aa18ed4ada6c87f9e6dc3dfc08:36
=== ehg_ is now known as ehg
dimiternthumper: ah, actually thanks to the very good docs you wrote I managed :) cheers08:40
dimiternjam: ping me when you're done08:41
jamdimitern: poke09:11
jamwould you prefer hangout to mumble?09:12
dimiternjam: don't mind a hangout09:12
jamdimitern: https://plus.google.com/hangouts/_/e7c22066f25817d34f2bb47a6c1eabc32def3fc6d09:13
dimiternjam: i'm there09:13
jamdimitern: I don't see you yet, I'm also in mumble if it is easier for you to get there.09:15
dimiternjam: hmm - ok. let's mumbe then09:15
mgzmum-be!09:15
thumpernight all09:16
jamlet's get ready to mummmbleeee!!!09:16
dimiternmgz: ping10:17
mgzpong10:17
dimiternmgz: sorry, stupid question maybe, but i'm trying to unlearn cobzr workflow and switch to normal bzr one - i'm using a LW checkout of juju-core, my current branch is trunk, how to create a feature branch out of it? tried bzr branch . new-branch, but it seems to do more than it should10:19
mgz`bzr switch -b new-feature`10:21
dimiternmgz: and running go build ./... && go test ./... afterwards gives me lots of errors: http://paste.ubuntu.com/5683245/10:21
mgzyour commands tells bzr to create a new copy of the current branch under the same tree structure, which no doubt confuses go10:22
mgz(fix by `rm -rf new-branch`)10:22
dimiternmgz: ah, ok, so how can I fix what I messed up? I did the rm -fr new-branch, but how to switch back to trunk? (040-move-set-agent-alive-out-of-machiner) dimitern@kubrik:~/work/juju-core$ bzr switch trunk10:24
dimiternbzr: ERROR: Not a branch: "/home/dimitern/work/go/src/launchpad.net/juju-core/trunk/".10:24
mgzwhat does `bzr branches` say?10:24
dimiternmgz: bzr: ERROR: Not a branch: "/home/dimitern/work/go/src/launchpad.net/juju-core/040-move-set-agent-alive-out-of-machiner/".10:25
mgzexciting.10:25
dimiternmgz: oh well, maybe I should scrach everything and start over - nothing done yet, so nothing to lose10:26
mgzedit .bzr/branch/branch.conf10:26
mgzor yeah, just start over10:26
dimiternmgz: thanks10:26
mgzso, are you aiming for native colo,  or a shared repo?10:26
mgzthe general idea is the same, but what you need in the go world is slightly different10:27
dimiternmgz: i want to have ~/src/juju-core shared repo with no trees, have $GOPATH/../j-c bound to that lwco and have a symlink in ~/work/juju-core to safe typing10:28
mgzokay, like jam does. pretty sure he still uses switch, but also has some locations magic10:29
dimiternmgz: i'm a bit confused that i have to specify paths for switch and merge - with cobzr i needed just the branch names10:30
dimiternmgz: so generally, when i'm in trunk to create a new branch I just need bzr branch -b new-branch and it'll switch to it as well?10:32
mgzno, `bzr switch -b`, which creates the branch10:34
dimiternmgz: ah, right. and then while i'm in new-branch to merge trunk in: bzr merge trunk ?10:35
mgzyou need a path for merge, but often you just want `bzr merge :parent`10:35
dimiternmgz: cool! i'll add alias for this10:36
dimiternmgz: strange though while in new-branch "bzr branches" shows * . only and "bzr show-pipeline" shows what I expected: * new-branch10:39
mgzyeah, branches go borked about the shared repo case again I think10:39
mgz*got10:40
dimiternmgz: but i did a fresh clone of trunk10:40
dimiternmgz: and now, while in new-branch i did bzr switch trunk, then bzr remove-branch new-branch and it said: bzr: ERROR: Branch is active. Use --force to remove it.10:42
mgzwhat does `bzr info` say now?10:42
dimiternmgz: http://paste.ubuntu.com/5683309/10:43
mgzthat still seems sane10:44
dimiternmgz: light chechout root: . seems fishy - should it be like that?10:45
mgzah, wait10:45
mgzno, should be okay10:46
mgzit may be just a confused remove-branch somehow10:47
dimiternmgz: how to manually remove it?10:47
mgzit's not very useful for the branch-in-dir layout anyway, as you want to rm the directory after, and that's what you need to remove the branch too10:48
mgzdimitern: just `rm -rf ~/src/juju-core/new-feature`10:48
mgzyou can try `bzr rmbranch ~/src/juju-core/new-feature` first10:49
mgzand use --force if that complains10:49
dimiternmgz: too late :)10:49
mgznew experiment time :)10:49
mgzjust `bzr switch -b new-feature && bzr switch trunk` then go10:50
dimiternmgz: i'll try again10:50
mgz(or `bzr branch . ~/src/juju-core/new-feature`)10:50
dimiternmgz: in addition to --no-trees what else should i specify to init-repo so there are no files in there? with cobzr there were just empty dirs for branches and the root dir was empty as well (safe for .bzr)10:52
mgzjust that10:52
dimiternmgz: oh, I see the problem - instead of doing init-repo i just did mkdir juju-core && bzr branch lp:juju-core trunk before10:53
dimiternmgz: now it works and bzr branches reports * new-branch \n trunk as expected10:57
dimiternmgz: i added bash completions for bzr commands (very handy!) and a small script to show me the current branch name in the prompt. it will be really useful if somehow i can complete branch names as well in bzr commands - any idea what can i use?10:58
mgznot off hand10:59
dimiternoh well, it's not that bad with a few aliases and such11:02
* dimitern bbiab11:02
dimiternback11:22
dimiternrogpeppe1: ping11:48
rogpeppe1dimitern: pong11:48
dimiternrogpeppe1: if i move setagentalive in MA.Entity(), when should I stop the pinger then?11:48
rogpeppe1dimitern: i don't think that's the right place for it11:48
dimiternrogpeppe1: where then? runloop?11:49
rogpeppe1dimitern: possibly. let me look again, one mo11:49
rogpeppe1dimitern: hmm, how many pingers do we want going at once?11:51
dimiternrogpeppe1: how many? just one i think11:51
dimiternrogpeppe1: for the machine entity the MA is responsible for11:51
rogpeppe1dimitern: in which case i think that the current way is perhaps the only decent solution11:51
rogpeppe1dimitern: unless we make another worker specifically to maintain the pinger11:52
dimiternrogpeppe1: i thought we agreed to move it11:52
rogpeppe1dimitern: yes, but i'm not sure it's right11:52
rogpeppe1dimitern: in the machine agent there are two concurrent runLoops11:52
dimiternrogpeppe1: which are?11:53
rogpeppe1dimitern: the API server and the rest of the workers11:53
rogpeppe1dimitern: and we will have three11:53
rogpeppe1dimitern: as we move towards using the API for the workers11:53
dimiternrogpeppe1: william mentioned you agreed to merge some of these loops11:53
dimiternrogpeppe1: not sure what was it11:54
rogpeppe1dimitern: i'm not sure that's what we arrived at11:54
dimiternrogpeppe1: well this is kinda blocking me11:54
rogpeppe1dimitern: in my understanding we decided to have a separate loop for workers which connect to mongo and workers which connect to the API11:55
dimiternrogpeppe1: i can switch to the other task - machine api instead11:55
dimiternrogpeppe1: and leave the AA stuff until next week to have an agreement11:56
rogpeppe1dimitern: i think that's not a bad idea, particularly as fwereade doesn't appear to be around currently.11:56
rogpeppe1dimitern: sorry not to be more help11:56
dimiternrogpeppe1: it's ok, i just need to start from somewhere. can do the AA stuff later, it's orthogonal11:57
dimiternrogpeppe1: do you have 20m for a quick hangout about the machine api?12:02
rogpeppe1dimitern: sure12:02
dimiternrogpeppe1: i'll start one as soon as we finish the standup12:02
rogpeppe1dimitern: ok12:02
dimiternrogpeppe1: they changed *everything* on g+ - how do i start a hangout now??12:10
rogpeppe1dimitern: i'll try!12:11
rogpeppe1dimitern: do you think "hangouts" are the same as "hangouts on air" ?12:11
dimiternrogpeppe1: no - those are live streaming ones12:12
dimiternrogpeppe1: public12:12
rogpeppe1dimitern: https://plus.google.com/hangouts/_/efbe73ddf30405282d381b4767ff0762c0dee700?authuser=0&hl=en-GB12:14
ahasenackhi guys, I'm getting "ERROR: Not a branch" for goose when I run go get -v -u launchpad.net/juju-core/... : http://pastebin.ubuntu.com/5683526/12:21
ahasenackI didn't see anything in the juju-dev@ mailing list about this, or about some branch changing12:21
dimiternahasenack: you probably didn't update goose for a while13:35
ahasenackdimitern: I run go get -v -u everyday13:36
dimiternahasenack: trunk moved to another location owned by the go-bot13:36
ahasenackdimitern: if I trash everything under $GOPATH/src and run go get -v launchpad.net/juju-core/... will it be using the right branch?13:36
dimiternahasenack: you'll need to pull it from lp:goose and use --remember and --overwrite13:36
dimiternahasenack: that should work if you can do it\13:36
ahasenacksure, it's fast13:37
ahasenackdimitern: thanks13:37
dimiternahasenack: but use go get -v -u13:37
=== wedgwood_away is now known as wedgwood
dimiternmramm2, rogpeppe1: kanban?14:01
=== tasdomas is now known as tasdomas_afk
=== hatch_ is now known as hatch
dimiternrogpeppe1: you did godef right?14:42
rogpeppe1dimitern: yeah14:42
dimiternrogpeppe1: awesome! it turns out go mode for emacs supports it as an alternative to searching for tags14:43
dimiternrogpeppe1: and it works way better than tags as well14:43
rogpeppe1dimitern: ah, cool. i knew someone integrated it at some point14:43
rogpeppe1dimitern: i wasn't sure if it was available anywhere14:43
rogpeppe1dimitern: it doesn't *always* work, but it's not bad14:44
dimiternrogpeppe1: in go 1.1 it's used14:44
rogpeppe1dimitern: the go parser it uses is an ancient fork of the go parser package14:44
rogpeppe1dimitern: i really want to update it to use go/types some time, but y'know, "in my copious spare time" :-)14:45
dimiternrogpeppe1: if it doesn't work for some code i'll tell yu :)14:45
rogpeppe1dimitern: someone should make it work for vim too14:45
dimiternrogpeppe1: yeah14:45
rogpeppe1dimitern: it doesn't know about import .14:45
rogpeppe1dimitern: as in the way we import gocheck14:46
dimiternrogpeppe1: yeah14:46
rogpeppe1dimitern: that's the main limitation i know about currently14:46
rogpeppe1dimitern: i find the functionality indispensible when browsing through other people's code (and our own, actually, come to that)14:47
rogpeppe1dimitern: you can get it to tell you type information too14:47
rogpeppe1dimitern: although i rarely use that functionality14:47
dimiternrogpeppe1: i'm content with having a "jump" shortcut that works for most cases, rather than having to grep14:48
rogpeppe1dimitern: yeah. that's the main thing.14:48
rogpeppe1dimitern: it should work with any identifier14:48
rogpeppe1dimitern: including field names, type names, method names etc14:49
dimiternrogpeppe1: yeah, just tested it within the apiserver - sweet! ws.ws.x.y.z.Stop() - no problem :)14:49
rogpeppe1dimitern: yup, even when ws itself comes from a for loop or something14:50
dimiternrogpeppe1: really nice14:51
rogpeppe1dimitern: at one point i instrumented the godoc web interface so that every identifier was shown as a link. that was quite cool.14:56
dimiternrogpeppe1: they actually have that now in go 1.114:57
dimiternrogpeppe1: not sure how14:57
rogpeppe1dimitern: not really - only in the doc pages, not in the source code itself.14:58
dimiternrogpeppe1: ah, i see - well it's a start at least14:58
rogpeppe1dimitern: yeah, it's a great improvement14:59
dimiternrogpeppe1: why isn't there a srvService? ServiceExpose/Unexpose are global15:16
rogpeppe1dimitern: ServiceExpose and ServiceUnexpose are client methods15:17
rogpeppe1dimitern: we need srvService too15:17
rogpeppe1dimitern: (and that will not have an Expose method)15:17
dimiternrogpeppe1: hmm.. i have no way to see how some methods on srvMachine should look like15:17
rogpeppe1dimitern: i suggest you add methods on srvMachine only as they are needed15:18
dimiternrogpeppe1: let me paste you a few i have so far and tell me if i'm on the right track15:18
rogpeppe1dimitern: these are all the calls i think we need: http://paste.ubuntu.com/5684020/15:19
dimiternrogpeppe1: a bit more we need in srvMachine15:20
rogpeppe1dimitern: oh yes?15:20
dimiternrogpeppe1: http://paste.ubuntu.com/5684027/15:20
rogpeppe1dimitern: i did the survey that led to that list ages ago, so things have probably changed since then15:20
rogpeppe1dimitern: that looks right. we've only done proper lifecycles and status setting relatively recently15:21
dimiternrogpeppe1: so it looks sane?15:22
rogpeppe1dimitern: yes apart from SetStatus15:22
rogpeppe1dimitern: API calls can have at most one argument15:22
dimiternrogpeppe1: why?15:22
rogpeppe1dimitern: and that argument must be a struct15:22
rogpeppe1dimitern: because we need the parameters to be named15:23
rogpeppe1dimitern: and function params have no associated names15:23
dimiternrogpeppe1: ah, ok - so params.MachineSetStatus ?15:23
rogpeppe1dimitern: read go doc launchpad.net/juju-core/rpc15:23
rogpeppe1dimitern: no, SetStatus is fine15:23
rogpeppe1dimitern: oops15:23
rogpeppe1dimitern: yes15:23
rogpeppe1dimitern: that sounds about right15:23
dimiternrogpeppe1: yeah, there's unit setstatus as well15:24
dimiternrogpeppe1: but it's the same15:24
rogpeppe1dimitern: perhaps just params.SetStatus then15:24
dimiternrogpeppe1: ok15:24
dimiternrogpeppe1: and i need to do state.Life -> params.Life conversion as well15:24
rogpeppe1dimitern: yes. i think you can just use state.Life.String actually.15:25
dimiternrogpeppe1: ah, cool, even better15:26
dimiternrogpeppe1: i just realized i have to implement a whole Pinger similarly to EntityWatcher in apiclient as well15:32
rogpeppe1dimitern: not nearly that complex.15:33
rogpeppe1dimitern: it's much more similar to  AllWatcher15:33
rogpeppe1dimitern: but simpler than that15:33
rogpeppe1dimitern: it'll only have one method, Stop.15:33
dimiternrogpeppe1: not only that - Alive() as well15:33
rogpeppe1dimitern: ah yes, that too15:34
rogpeppe1dimitern: but no complex logic - just a call-through to the api15:34
dimiternrogpeppe1: yeah seems so15:37
dimiternrogpeppe1: the problem is pingers are in state/presence, and I don't see how to use that when I'm supposed to have st *State only15:41
rogpeppe1dimitern: you'll need to define an api.Pinger type15:42
rogpeppe1dimitern: oh sorry, wrong problem.15:42
dimiternrogpeppe1: by api you mean put it in apiclient.go15:42
rogpeppe1dimitern: i'm not sure i see your problem15:42
dimiternrogpeppe1: yes, i'm there15:42
rogpeppe1dimitern: what's the difficulty with using a pinger in the API server?15:43
dimiternrogpeppe1: well the api.EntityWatcher uses stuff like err := w.st.call(w.etype, w.eid, "Watch", nil, &id);15:43
dimiternrogpeppe1: but i need to call stuff not in state/ but state/presence/15:43
rogpeppe1dimitern: from the API client? or the server?15:44
dimiternrogpeppe1: from the client15:44
rogpeppe1dimitern: why so?15:44
dimiternrogpeppe1: ok, think for a moment - SetAgentAlive -> *pinger, error15:44
rogpeppe1dimitern: you will need a new srvPinger type, if you hadn't realised that already15:45
dimiternrogpeppe1: in the api it's params.PingerId instead15:45
dimiternrogpeppe1: ah15:45
rogpeppe1dimitern: so do just what the watcher stuff does15:45
dimiternrogpeppe1: yeah15:45
dimiternrogpeppe1: ok, sorry :)15:45
rogpeppe1dimitern: np15:45
=== mramm2 is now known as mramm
dpb1Hey -- juju-core has a rather nasty behavior for relation-list if you are calling it on something like a peer relation with only one unit.  Should it be a bug?  It breaks charm suppor and probably many other charms:  See here for an example: https://pastebin.canonical.com/91346/19:16
dpb1FYI -- I have filed: https://bugs.launchpad.net/juju-core/+bug/118222421:36
_mup_Bug #1182224: relation-list returns null with json-output <juju-core:New> <https://launchpad.net/bugs/1182224>21:36
* kyhwana pokes Makyo idly23:23
MakyoOh, hey Kyh.23:23
kyhwanaMakyo: oh his :)23:24
kyhwanaIs it idly time around here? Was planning on trying to write a smokeping charm, since there doesn't seem to be one.23:24
Makyokyhwana, Yeah, it's past EOD for a lot of folks.  #juju might be more active?23:26
kyhwanaahh ok23:26
Makyokyhwana, mmmmaaybe marcoceppi or m_3 would know a bit more, too, if you need :)23:27
kyhwanawell, will ask around later. That'll be today's After Work project :) I keep breaking my smokeping install at home :|23:27
MakyoAh, yeah :S23:28
MakyoI keep wanting to do some random charm, but every time I think I have a good idea, I find it's already been done :P23:29
kyhwanahah, I checked the charm list and there's no smokeping one. (otherwise I would've deployed it myself)23:34
MakyoYeah, well, hey, there's your chance \o/23:35
=== wedgwood is now known as wedgwood_away

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