thumperdavecheney: I'd love a sanity check on the series email just sent to the list01:18
thumperdavecheney: it is that classic thing of getting home, and going "ah... wat?"01:18
davecheneythumper: that is too be expected01:19
* davecheney reads01:19
thumperdavecheney: I've summarised what I think I should do at the bottom of the email, but really want to check before diving in01:19
hazmatm_3, davecheney can i get a dial in on that voice.. or has the clock passed02:10
davecheneyhazmat: m_3 is down with hardware issues02:10
davecheneybut lets schedule it for tomorrow02:10
hazmatdavecheney,sadly no clock unites you, i, m3 and mgz02:11
hazmatmail it must be02:11
davecheneyle sigh02:11
thumperdavecheney: so... I'm trying to understand the "go test" process02:40
thumperdavecheney: so with gocheck, how does it add stuff to the standard testing calls?02:40
davecheneythere will be a file that bridges between the go test expected function02:41
davecheneyand the gocheck one02:41
* davecheney finds an example02:41
davecheneyyou can figure out which one it is02:42
davecheneyit is the name printed when you run go test -v02:42
thumperdavecheney: var _ = Suite(&MainSuite{}) does the magic register02:42
davecheneythat is part of the story02:42
davecheneythat registers the Suite with gocheck02:42
davecheneybut there is a bridge to jump from go test to gocheck02:43
davecheneyboth are necessary02:43
thumperyeah, I'm missing that bridge bit02:43
davecheneyfrom cmd/cmd_test.go02:43
davecheneyfunc Test(t *stdtesting.T) { TestingT(t) }02:43
davecheneythe TestingT is actaully gocheck.TestingT02:43
davecheneybut we import gocheck into the packages' own namespace02:44
thumperdavecheney: so how often do you need to do that?02:45
davecheneyonce per pacakge02:45
* thumper nods02:46
m_3davecheney: ok, back02:57
m_3davecheney: damn... that totally sucked02:57
m_3davecheney: so yeah, I'd love to bump til tomorrow if that's cool with you02:58
davecheneym_3: no worries02:58
davecheneywill be online at 8am02:58
davecheneyshould be 2/3pm our time, give or take02:59
thumperdavecheney: what level of hooks are there in go during package load?03:18
thumperdavecheney: is there a way to get something run as the package is loaded?03:18
davecheneythumper: the is the init() hook, which is executed pre main03:19
davecheneythere is no concept of package loading03:19
thumperwhen is the init() hook run? and for which package?03:20
davecheneyit is run pre main()03:20
davecheneyfor all packages, in dep order03:20
davecheneyso if A depends on B then B's init() gets run before A's03:20
davecheneyinside a package you can have multiple init() functions03:20
davecheneybut there is no ordering on those03:21
thumperbut all init() methods are called?03:21
thumperisn't there name clashes?03:21
davecheneyinit is a magic method03:21
thumperso if I have three different files, a.go, b.go and c.go and all are in package d03:21
davecheneywhen it is compiled each gets a sequyence number appended to avoid colisions03:21
thumperand each file has an init() func03:21
thumperthey are all called?03:22
davecheneythey are all called03:22
davecheneythe order in which they are called is not known03:22
thumperwhen are global vars created in relation to the init methods?03:22
davecheneythumper: before03:22
davecheneyvar's are handled in init methods03:22
davecheneythat you don't create03:22
thumperare they guaranteed to run before the init methods I define?03:23
thumperthey sound special03:23
davecheneytop level initalisation is special03:23
* thumper nods03:23
* thumper is thinking magic03:23
thumperso... vars in package d are initialized before a defined init() method in a dependent package?03:26
thumperglobal vars that is03:26
davecheneypackage level vars yes03:26
davecheneythere are no global vars03:26
davecheneyfor each packge it goes03:26
thumperok, that is what I meant03:27
davecheneyvars, init()s, then the packages that depend on that package03:27
davecheneyall the way back up to main03:27
thumperoh... :(03:27
* thumper thinks03:27
thumperactually, I think that still works03:27
davecheneythe langauge _should_ prevent you from seeing an uninitalised variable03:27
* thumper thinks more03:28
davecheneythumper: care to share ?03:29
* thumper has just worked out why "go test ./..." often has weird delayed output04:08
thumperbuffered i/o04:08
=== jtv2 is now known as jtv
TheMueGood morning09:35
=== TheRealMue is now known as TheMue
hazmathas anyone been able to get a vpc default/only account?11:20
mgzjam, dimitern: standup?11:33
dimiternmgz: in a sec11:33
rogpeppe1hi all11:41
=== rogpeppe1 is now known as rogpeppe
dimiternrogpeppe: hiya11:44
TheMueHi all11:56
jammgz:  did you go through the standup already?12:00
mgzjam: yup, we was fast12:00
jamk, I did have some things to specifically bring up, but I can bring them up on IRC12:00
=== wedgwood_away is now known as wedgwood
* TheMue needs inspiration regarding JUJU_HOME and testing. Anyone interested?13:41
benjiTheMue: sounds like fun... what is JUJU_HOME?13:45
TheMuebenji: It's a new env variable controlling the home of the juju file, today hard coded .juju.13:46
benjimakes sense13:46
TheMuebenji: When changing the variable, or a global variable representing it, for a test and multiple tests run concurrently they may get into conflict.13:47
TheMuebenji: As it is a global state.13:47
benjiyep; global state is a killer in tests (and everywhere else, really)13:48
TheMuebenji: Exactly. We already have some tests where $HOME is changed.13:48
benjiI don't know how the internals of go's testing infrastructure works, but my first though would be to channel all reads of JUJU_HOME into a function and then make tests use that instead of accessing the real variable13:50
TheMuebenji: The problem stays.13:50
TheMuebenji: Test A needs its home and sets it, test B too, now in test A it is read and it gets the - internal or external - value B had set.13:52
benjieach test would then need to create a temporary directory and set its local idea of home to that13:52
TheMuebenji: It's btw a func returning JUJU_HOME or as default ~/.juju13:52
TheMuebenji: Yes, and if the tested function calls JujuHome(), what will it get then?13:53
benjihow about making the default function return an error in tests, that way you don't have accedental reading of the shared state and then have each tests make a process- (or thread-) local version13:53
fwereadeTheMue, surely the problem only appears when run with explicit test.parallel > 1?13:54
TheMuefwereade: Yep, only then. Otherwise it's simple. ;)13:54
fwereadeTheMue, panic in test setup if that's set then?13:54
benjias I understand it, test.parallel defaults to the value of GOMAXPROCS, which may be greater than 113:55
benji(another instance of global state being a bad actor)13:55
fwereadebenji, but *that* is only >1 when explicitly set, right?13:55
TheMuefwereade: We very often rely on the home internally, so all tests that even nested may access it would have to panic.13:56
gary_posterfwereade, rogpeppe hi.  Would you be available for hopefully a quick G+ in about 4 minutes (top of hour) to resolve lingering confusion about how to proceed with the annotations changes from frankban and Makyo?  We could meet in http://tinyurl.com/guichat13:56
benjifwereade: I assume so.13:56
fwereadegary_poster, sorry, we have a meeting coming right up -- how about 30 minutes later?13:57
gary_posterfwereade, we have a meeting then. :-) 60 minutes later instead, at the top of the next hour?13:57
fwereadegary_poster, sgtm if it sgt rogpeppe13:57
gary_posterthanks fwereade13:58
benjiTheMue: does go have a thread-locals?  That is where I would stash slightly-less-than-global-globals.14:00
TheMuebenji: One moment, meeting.14:07
mgzhm, so I don't really need to be in ~gophers, and can land things on juju-core and goose regardless,14:46
mgzbut now can't triage goose bugs for instance, as ~gophers still owns the project14:46
gary_poster~gophers was deactivated entirely, apparently14:47
dimiterni'm still not unclear why all that was even needed? changing gophers and all14:47
gary_posterrogpeppe, are you up for a call in 13 minutes?14:47
gary_poster12 :-)14:47
rogpeppegary_poster: yup14:47
gary_postercool, thanks14:48
gary_posterfwereade, rogpeppe, frankban, Makyo call in http://tinyurl.com/guichat in 2 minutes.  I'm there already :-)14:58
gary_posterI will have to bow out early; I'm taking the role of facilitator14:58
mrammgary_poster: mind if I poke my head in?14:59
gary_postermramm, no, please do15:00
gary_posterfwreade, rogpeppe, the conversation is so scintillating in our chat room that I'm sure you want to join in...15:02
rogpeppefwereade: how about something like this? http://paste.ubuntu.com/5610973/15:27
rogpeppefwereade: except... what to call "EntityName"?15:27
fwereaderogpeppe, I'm not quite sure about that Entity in there15:34
fwereaderogpeppe, I would honestly like to keep them separate15:34
fwereaderogpeppe, Refresh is only relevant to AuthEntity anyway, right?15:34
rogpeppefwereade: ok, so you can ask for an annotator by name, but you can't ask the name of the annotator when you've got it?15:35
Makyofwereade, Service has Refresh as well, correct?15:35
rogpeppefwereade: isn't Refresh relevant to all state entities with a doc?15:35
fwereaderogpeppe, I am saying that having independent *Name methods that happen to return the same string is a price I consider worth paying to separate these bits of functionality15:38
fwereaderogpeppe, Refresh is not elevant to any Annotator AFAICT15:38
rogpeppefwereade: Machine is an Annotator15:38
rogpeppefwereade: and has Refresh15:39
fwereaderogpeppe, the fact that most annotators can be refreshed is not the point15:39
fwereaderogpeppe, and files can be closed as well as written15:39
rogpeppefwereade: so you'd return a simple Annotator from AnnotatorEntity?15:40
fwereaderogpeppe, I think so -- maybe I'd even just call it Annotator(string) (Annotator, error)15:40
rogpeppefwereade: and document that the syntax of the name is... what?15:41
fwereaderogpeppe, specific to annotations15:41
fwereaderogpeppe, by happy coincidence it is the same as that used for corresponding objects that can log in15:41
rogpeppefwereade: duplicate the documentation?15:42
fwereaderogpeppe, roughly speaking, but the sets of relevant entities are different so it won't be *exactly* the same15:42
rogpeppefwereade: this better? http://paste.ubuntu.com/5611029/15:44
fwereaderogpeppe, sorrt15:44
fwereaderogpeppe, yeah, I think so15:44
rogpeppefwereade: promise? :-)15:46
fwereaderogpeppe, I'm pretty sure that fits what I've been after since the beginning15:47
fwereaderogpeppe, if I'm being inconsistent then I should absolutely be called on it, but I have been trying not to be15:47
rogpeppefwereade: so, the plan is to leave EntityName around as it currently is, rather than changing it everywhere, but would you prefer we retro-fixed it to... something else?15:52
rogpeppefwereade: i.e. have you got a better name for it?15:53
fwereaderogpeppe, hmm, I didn't see an EntityName in the things you suggested16:03
rogpeppefwereade: yup, it's not needed by the things that use those interfaces, as far as i could make out16:03
fwereaderogpeppe, I had kinda assumed that was orthogonal, and that my views on that specific name had been made clear16:03
rogpeppefwereade: yeah, i think it's orthogonal, and can be treated as a separate issue to be fixed independently16:04
fwereaderogpeppe, ok, fair enough, I'm very happy to see the separate interfaces and can live with a name I don't like16:06
rogpeppefwereade: if you think of a sensible name, the change should be quite simple when we decide to do it.16:06
rogpeppefwereade: one thought we had: "ExternalName" (i'm not that keen but just throwing it out there)16:07
fwereaderogpeppe, I still think the interfaces would be *better* if they included *Name methods but as I said I can live with EntityName16:08
fwereadegents, I need to come back later to talk with thumper, so I'm knocking off early in the interest of having a bit of an evening before then16:12
rogpeppefwereade: okeydokey16:15
TheRealMuefwereade: ping16:48
TheRealMuefwereade: Have to step out but will ping you again later. ;)16:49
rogpeppemgz: have you used bzr pipelines?17:03
mgzrogpeppe: I have, but abentley is the real expert17:03
rogpeppemgz: ah. i'm hoping they'll "just work" with cobzr, but i wanted to check before potentially destroying my repo17:04
mgzthey'll just work, cobzr is just creaky porcelain around some core bzr features17:05
rogpeppemgz: that's what i'm thinking17:05
rogpeppemgz: if i've got a few branches that already form a logical pipeline, can i link them together, or will i have to create new branches and merge my existing ones into them?17:06
mgzI've never tried to do that17:07
rogpeppemgz: (i find myself in a position where the functionality that pipes provide looks like it'll be really useful)17:07
mgzyou probably need to create the pipes, but should be able to just pull in the existing branches17:07
rogpeppemgz: ok, i'll just start from scratch and merge. shouldn't be a problem.17:07
rogpeppemgz: yeah17:08
mgzwell, you shouldn't need to merge is the point, just pull in the revs17:09
abentleyrogpeppe, mgz: in fact, you can just use the existing branches.  bzr add-pipe will accept a location (i.e. the path to a branch) as its input.17:15
rogpeppeabentley: thanks!17:16
rogpeppeabentley: that didn't actually work for me - i got this error: 'bzr: ERROR: A control directory already exists: "file:///home/rog/src/go/src/launchpad.net/juju-core/.bzr/cobzr/242-allwatcher-handle/".'17:36
rogpeppeabentley: but i just created the branch and merged in. no problem.17:37
abentleyrogpeppe: What was the command you typed?17:39
rogpeppeabentley: bzr add-pipe name-of-existing-branch17:39
abentleyrogpeppe: locations work, names don't.  "bzr add-pipe ~/src/go/src/launchpad.net/juju-core/.bzr/cobzr/242-allwatcher-handle" should have worked.17:41
abentleyrogpeppe: Or whatever equivalent path.17:41
rogpeppeabentley: ah, ok. i didn't realise there was a difference.17:41
rogpeppeabentley: it's no matter any more anyway17:41
abentleyrogpeppe: cool.17:43
rogpeppeabentley: first pipeline operations completed successfully - one pump, one interactive back merge. very useful!17:44
abentleyrogpeppe: great.17:44
rogpeppegary_poster, dimitern, fwereade, anyone else: here are the next two branches in the allwatcher task: https://codereview.appspot.com/7727044/ https://codereview.appspot.com/7727045/17:54
gary_posteryay rogpeppe thanks!  how many left after that?17:55
rogpeppegary_poster: probably three or four17:55
gary_posterrogpeppe, ok cool, thanks.  I'll look forward to reviewing soon.17:56
rogpeppegary_poster: thanks a lot17:56
rogpeppegary_poster: bzr pipes are going to make my a *lot* easier here, i'm hoping...17:57
gary_posterlol, I bet17:57
rogpepperight, that's me for the day18:49
rogpeppesee y'all tomorrow18:50
=== _thumper_ is now known as thumper
thumperfwereade: morning20:10
thumperfwereade: around?20:10
fwereadethumper, heyhey20:10
fwereadethumper, little bit caught up, 5 mins maybe?20:10
thumperfwereade: I'm just reading your email response20:11
fwereadethumper, cool20:11
benjithis is the second time I have gotten this error from "lbox propose":  error: ERROR: Failed to update bug task: Server returned 400 and body: milestone_link: Constraint not satisfied.20:19
fwereadebenji, I haven't seen that one, but it's rare for me to remember to attach bugs ;)20:22
fwereadethumper, right, I think I've unfucked my logic20:22
fwereadethumper, although that was what I thought when I propsed originally, so...20:23
fwereadethumper, anyway20:23
thumperfwereade: so hangout?20:23
fwereadethumper, free for a G+?20:23
* fwereade start one20:23
thumperah poos22:12
thumperhi davecheney22:12
thumperdavecheney: you are not related to that first msg22:12
davecheneyi could be a poo22:14
davecheneyyou never know22:14
* m_3 definitely a pooh22:31
m_3davecheney: I'm just crunching on the queue... available to g- at your convenience22:37
m_3the charm queue is quite sysiphean this week22:37
davecheneym_3: eep22:40
davecheneyok, will send you a hangout in the next 30 mins22:40
m_3cool... good for another three hours or so22:42
davecheneym_3: https://plus.google.com/hangouts/_/be405f06d5b6f273d4eb071ded2408bf336e502a?authuser=1&hl=en23:25
=== arosales1 is now known as arosales
=== wedgwood is now known as wedgwood_away

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