/srv/irclogs.ubuntu.com/2014/02/14/#juju-dev.txt

wallyworldthumper: shiteveld won't accept by latest diff for the rsyslog upgrader. can you take a peek in lp and see if you are happy? i made a small tweak and responded to comments00:03
thumperok, will look00:20
thumperwallyworld: for your Replace file thing, why not use Stat to get the existing premission, and only use 0644 if you can't get it?00:25
wallyworldthumper: cause we want the new perms to overwite any exisitng ones00:26
stokachuhey, i sent an email to the mailing list but just throwing this here as well, anyone know the latest version of the websocket specification juju api server supports?00:26
thumperwallyworld: but you aren't letting the user specify the permissions00:26
thumperyou are explicit in 064400:26
thumperwhich may not be right00:26
thumperstokachu: I don't sorry00:26
wallyworldoh shit, i should have that passed in00:27
thumperwallyworld: if we want to overwrite perms, allow the caller to pass them in00:27
thumper:)00:27
stokachuhow do i tell which version of the websocket library is used from go.net/websocket?00:27
wallyworldthat's what my brain was thinking but my fingers didn;t type that00:27
thumperwallyworld: I get that all the time too00:27
wallyworldstokachu: i'm not sure. rogpeppe is the best person to ask00:28
wallyworldbut he's past EOD now00:28
stokachuok00:28
wallyworldi'll poke him later to make sure he responds00:29
stokachuwallyworld: thanks a bunch00:29
wallyworldnp00:29
wallyworldthumper: fixed00:50
thumperkk00:50
thumperaxw: no os.Groups though ...01:04
thumperalso easier to mock out in the tests with the command :-)01:04
axwthumper: there's Gid?01:04
thumperbut thanks for the pointer01:04
thumpernot on a os.User01:04
thumperoh01:04
axwyes there is01:04
thumperso there is01:04
axw:)01:04
axwanyway, not a problem, just wanted to make sure you knew01:05
thumpercheers01:05
thumperos.User.Gid is a string and os.Chown needs an int01:05
thumperlovely library coherency there01:05
thumperaxw: I'm happy with https://code.launchpad.net/~wallyworld/juju-core/rsyslogconf-upgrader-118/+merge/206090, you happy?01:07
wallyworldyep, for this iteration01:08
axwthumper: yeah I was gonna LGTM01:08
thumpercool01:08
axwFTR, +1 for a sub package for utils01:08
wallyworldaxw: i reverted to using TempDir cause then the file perms work put nicer - TempFile creates the file with 600 and you need more code to change the perms01:09
wallyworldi think that's why it was done that way originally01:09
=== thumper is now known as thumper-afk
axwok no worries01:09
=== thumper-afk is now known as thumper
thumperaxw: got a minute?01:46
thumperbugger01:46
thumpercompletely missed the standup01:46
thumperwhat a slacker01:47
thumperoops, and sorry01:47
wallyworldf*cking bot01:47
* wallyworld stabs it to death 01:47
axwthumper: yes01:49
axwwhat's up?01:49
thumperaxw: was wondering about bootstrapping prcess with maas01:50
thumperand how the sync bootstrap handles the networking bits in it01:50
thumperparticulary how we currently restart networking01:50
axwun moment, gotta refresh memory on maas01:50
thumperI'm likely to change the "edit /etc/network/interfaces, restart networking"01:51
thumperto be "ifdown eth0, edit /etc/network/interfaces, ifup br0"01:52
thumperwhich I have been told will work, but I need to test it01:52
thumperthese are all different lines in the cloud init scripts section01:52
thumperwondering how the sync bootstrap handles this...01:52
thumperwondering idly if this relates to : bug 123375101:53
_mup_Bug #1233751: MAAS environment bootstrapped, but not really. <bootstrap> <destroy-environment> <jenv> <maas-provider> <theme-oil> <juju-core:Triaged> <https://launchpad.net/bugs/1233751>01:53
axwthumper: I think cloud-init will run that bit. still trying to get my head around it...01:53
axwif that's the case it should work no problems01:54
axwthumper: yep, maas's StartInstance does that networking bit, so cloud-init will do the networking change01:55
axwso it won't break the ssh connection01:55
* axw looks at the bug01:55
thumperhow do we handle the bootstrapping?01:55
thumperaxw: doesn't bootstrap call start instance?01:56
axwthumper: I suspect that bug is just cos the bootstrap-state file got left behind on failed bootstrap01:56
axwyes it does, but there's two parts to synchronous bootstrap01:56
axwpart 1: run cloud-init with a very basic cloud-config01:56
axwfor maas, there's an additional bit of modifying networking01:57
axwpart 2: wait for the machine to come up, ssh in and do the rest01:57
thumperok, cool, so the hack networking is all part 1?01:57
axwand "do the rest" is provider-independent01:57
axwyep01:57
thumperaxw: is the bug then fixed?01:57
axwthumper: dunno sorry01:57
thumperkk, so I'll manually test the ifdown/ifup story locally on my precise maching :)01:57
thumpermachine01:57
axwdoesn't look related to synchronous bootstrap01:58
axwpre-bootstrap setup I think01:58
thumperok, but didn't you just fix a bug that deleted the .jenv if the bootstrap fails?01:58
axwoh that's a different file01:58
axwI'm talking about how we leave a file in cloud storage01:58
thumperah... :(01:58
axwthumper: actually, I'm not sure now. you may get the same error for existing .jenv02:09
axwI would need a NUC or something to test on ;)02:09
bigjoolscurtis has one IIRC02:12
thumperbigjools: can I test something on your maas?02:21
bigjoolsmaaaaaybe02:21
bigjoolsit means I have to go and turn it on02:22
bigjoolsthumper: it's on, can you get in?  I can't remember if my router config still works for you02:31
thumperum...02:31
bigjoolssince you're sshing into a network two NATs deep :)02:31
thumperwhat was the ip address and port again?02:31
* bigjools rolls eyes02:31
=== lazyPower_ is now known as lazyPower
thumperbigjools: I have auth to go buy some NUCs for maas testing locally02:43
thumperI just need to get my a into g and get some02:43
bigjoolsthumper: expensed?02:43
thumperaye02:43
bigjoolssuhweet02:43
bigjoolshow much in NZ?02:43
thumpernot sure02:44
thumperhave to go price some up02:44
=== mwhudson is now known as zz_mwhudson
* axw goes offline for a while to run tests without a network04:10
axwwallyworld: FYI I have looked at your upgrader CL. It looks good, but I don't think I understand everything well enough to +1 at the moment06:10
wallyworldaxw: that's ok, it was meant for william to look at anyway :-)06:11
axwok, cool06:11
wallyworldthanks for looking though06:12
axwnps06:12
wallyworldit achieves the same result as a previous version, but with a different approach06:12
axwyup, so I see. I understand the idea and see how it works, just not fully aware of how the watcher stuff works for example06:15
wallyworldit's a bit involved06:16
wallyworldfwereade: no urgency, take 2 - https://codereview.appspot.com/63730043/07:25
wallyworldthe main tests i copied across from the other branch and made then pass with the new approach07:26
fwereadewallyworld, nice, thanks08:05
fwereadewallyworld, hey, I was wondering08:05
fwereadewallyworld, using ssl-hostname-verification for metadata-needs-signing seems a little strange to me08:05
wallyworldwhich bit of code?08:07
wallyworldi'll look08:07
fwereadewallyworld, err let me hunt again, I came upon something that looked like it was doing that while trying to figure out some of the joyent provider tests last night08:07
fwereadewallyworld, if that doesn't ring a bell I probably just misunderstood it08:08
wallyworldi can't recall offhand either08:08
wallyworldgotta go for dinner, back later08:09
fwereadewallyworld, ah it's ok I completely misunderstood it08:09
wallyworldo :-)08:10
wallyworldok08:10
fwereadewallyworld, it really is about verifying the hostnames08:10
fwereadewallyworld, enjoy your dinner08:10
wallyworldwill do08:10
fwereadeI've got a trivial intermittent failure if anyone's got a moment: https://codereview.appspot.com/6371004408:41
fwereaderogpeppe, 479-desired-peer-group appears to be LGTMed from a month ago but still unmerged08:54
rogpeppefwereade: oh twats08:54
rogpeppefwereade: it's always that problem when you approve something then switch context back to what you were doing, and forget to check that it's actually merged08:55
fwereademgz, can we land https://codereview.appspot.com/49050044/ ?08:55
fwereaderogpeppe, yeah, I have a couple of those myself :/08:55
fwereadeTheMue, is 058-debug-log-api abandoned in favour of a different approach?08:56
fwereaderogpeppe, also 487-remove-job-managestate08:57
rogpeppefwereade: oh, that's worse08:58
rogpeppefwereade: bugger08:58
rogpeppefwereade: looks like today is the day for bountiful conflicts08:58
fwereadeTheMue, I'm rejecting 058 and WIPing 06008:59
* fwereade wishes rogpeppe luck08:59
TheMuefwereade: I'm currently testing the 060 live, it is the solution. Only coded testing is missing. But it works for all providers (even local) and with older releases (even here now local).09:03
TheMuefwereade: The 060 contains both, the backend and the cmd changes.09:04
fwereadeTheMue, excellent, thanks09:05
rogpeppewallyworld: this is from a suggestion i made in a review - i didn't want to badger you about it, but i think it's worth doing: https://codereview.appspot.com/6353004809:20
wallyworldrogpeppe: we prefer interfaces09:24
rogpeppewallyworld: why?09:24
wallyworldall the usual reasons09:24
rogpeppewallyworld: when we've just got a bag of data, there is no reason to use an interface09:24
rogpeppewallyworld: it just obfuscates the code for no reason09:25
rogpeppefwereade: i'd appreciate your thoughts on this09:25
wallyworldi'm tired tonight so may not be in the best frame of mind for a coherent discussion09:25
rogpeppewallyworld: i appreciate that interfaces are useful when you might want to mock different behaviour09:25
rogpeppewallyworld: but in this case there is no behaviour to mock - the data structure *is* the interface09:26
wallyworldnow yes09:26
wallyworldbit the design is evolving09:26
wallyworldbut09:26
wallyworldthe same pattern has been used for agent conf09:27
rogpeppewallyworld: if we need extra behaviour, that will be easy enough to retro-fit. let's not overengineer in advance - this is not Java09:27
wallyworldhuh?09:27
rogpeppewallyworld: agent conf does actually have some behaviour behind it09:27
wallyworldas will the upgrade stuff most likely09:27
rogpeppewallyworld: (it encapsulates the way to read different versions of the file)09:28
rogpeppewallyworld: i don't see that - this is a description of the upgrade steps - that's fundamentally data AFAICS. it's also held inside the binary, not in an external file09:28
wallyworldit is data for sure. but the design is still evolving09:29
rogpeppewallyworld: sure, so evolve the data09:30
rogpeppewallyworld: having the extra layer of indirection doesn't help that (actually, it makes it harder)09:30
rogpeppewallyworld: "KISS" :-)09:31
wallyworldsure. there's arguments either way09:31
rogpeppefwereade: can we please go the simpler route to start with?09:33
rogpeppefwereade: if you find that interfaces become useful here, i will eat my humble pie09:33
wallyworldto me interfaces are simpler because they abstract behaviour and mocks can easily be constrcuted for only some of the methods09:34
wallyworldand it's generally just plan good programming practice09:34
fwereaderogpeppe, wallyworld: IMO our reliance on concrete types has fucked the codebase pretty hard09:34
wallyworldour use of structs everywhere in juju core kinda sucks09:34
rogpeppefwereade: i don't think this case is analagous to that09:34
fwereaderogpeppe, wallyworld: once you turn out to need an interface it's a *massive* hassle to fix the concrete types09:35
wallyworld+109:35
rogpeppefwereade: so do you really think we should never use structs? even when we're just holding bags of data?09:36
fwereaderogpeppe, I want enough seams in the codebase to allow for easy testing of small units, without backing everything with real implementations09:36
wallyworldbags of data now for some things, but the design is evolving09:36
wallyworld+109:36
rogpeppefwereade: there is no "implementation" here - it's just a description of what to do09:37
rogpeppefwereade: the "implementation" is in the Run functions which are already fully mockable09:37
rogpeppefwereade: i can't see what use it is to "mock" a function that just returns a description and does nothing more.09:37
fwereaderogpeppe, I'm curious as to what you perceive the benefits of dropping the interface to be09:38
rogpeppefwereade: it 60 lines less code. i consider that a good reason in itself.09:38
rogpeppes/it/it's/09:38
wallyworldrogpeppe: you are the one who likes lots of code :-)09:39
fwereaderogpeppe, and I'm not so sure that we'll never see behaviour associated with things like Targets09:39
wallyworldall those duplicated "contains" functions etc09:39
fwereaderogpeppe, by pickinginterfaces from the get-go we can put extensions to behaviour in the right place when the time comes09:39
wallyworldthey gie us more flexibility to evolve a design09:40
wallyworldgive09:40
rogpeppefwereade: it is also much more immediately obvious what the code is doing - if i see a field access, i don't have to look at what some arbitrary code might be doing09:40
fwereaderogpeppe, if we don't, then the "simple" approach becomes to tweak the code that uses those types09:40
fwereaderogpeppe, and behaviour gets smeared out09:40
fwereaderogpeppe, and things just get worse and worse09:40
fwereaderogpeppe, because even if we *know* it's the time to switch to interfaces09:41
fwereaderogpeppe, the hassle and cost of doing so is generally overwhelming09:41
fwereaderogpeppe, you don;t have to anyway09:41
rogpeppefwereade: i really don't believe that could be the case here - this is limited-scope code09:41
fwereaderogpeppe, the upgrade step knows where it should be applied09:41
fwereaderogpeppe, as a client it's not your responsibility to figure it out, and it's none of your business how it's figured out *anyway*09:42
rogpeppefwereade: if we want behaviour on Targets, that's trivial to add.09:42
fwereaderogpeppe, and so it begins09:42
fwereaderogpeppe, just a little bit of coupling can't hurt09:42
rogpeppefwereade: it's not coupling09:42
rogpeppefwereade: it's evolving the schema09:43
fwereaderogpeppe, and forcing the clients to care about that evolution09:43
rogpeppefwereade: what clients?09:43
rogpeppefwereade: this is essentially an internal-use data structure only09:43
fwereaderogpeppe, that doesn't mean there aren't clients09:44
fwereaderogpeppe, the code that uses it, and the code that tests it, are the minimum set of clients for just about any construct09:44
rogpeppefwereade: so by "client" you mean the package itself?09:44
fwereaderogpeppe, yes09:45
fwereaderogpeppe, programming is *all about* managing interfaces to impose simplicity on complexity09:45
fwereaderogpeppe, package boundaries are way too coarse to be useful09:46
rogpeppefwereade: sure, but an "interface" can just as well be a concrete data structure there09:46
rogpeppefwereade: i've switched back and forth between interfaces and concrete types many times. i much prefer starting with the simple, and then graduating to the more elaborate when it proves necessary.09:47
fwereaderogpeppe, I do not agree with that approach09:47
fwereaderogpeppe, I gave it a fair shake09:47
rogpeppefwereade: if you can't agree that a simple concrete type is appropriate for representing a simple concrete bunch of data, i give up09:47
fwereaderogpeppe, and I'm confident that most of the current complexity of juju is a result of an adherence to flawed notions of simplicity09:48
fwereaderogpeppe, it'd be a different story in python09:48
fwereaderogpeppe, because you can use a descriptor in place of a field when it becomes necessary09:48
fwereaderogpeppe, but with go you *invest* in the struct approach09:49
fwereaderogpeppe, it's an expected value calculation09:49
rogpeppefwereade: you really think that most of the complexity of juju is from using structs?09:49
fwereaderogpeppe, most of the bits that really hurt and continue to do so, like jujud, are the way they are because we have no seams by which to pick them apart09:50
fwereaderogpeppe, the state/environ horrors are because we have a state struct09:50
rogpeppefwereade: i think most of the pain there is in the tests, not the code09:50
fwereaderogpeppe, the inability to test state quickly and easily are because of all the structs in mgo which makes it completely unmockable09:51
rogpeppefwereade: because we had a prior aversion to mocking anything09:51
rogpeppefwereade: huh? we could mock mgo easily09:51
fwereaderogpeppe, the awful awful uniter stucture is the same story -- there's nothing *that bad* about it in theory, but in practice you can't isolate any of it and have to take the whol lot as an indivisible unit09:51
rogpeppefwereade: well, except that we'd need to mock mongodb semantics09:51
rogpeppefwereade: again, i really think that's because of our prior aversion to mocking anything09:52
fwereaderogpeppe, maybe I'm being dense: how would you mock anything without interfaces?09:52
rogpeppefwereade: there are various places in the code where we *do* manage to mock pieces of the State to good effect09:52
rogpeppefwereade: you don't need to *export* the type as an interface09:53
rogpeppefwereade: you just need to define clients in terms of an interface, and then use some trivial bridge code (or nothing) to bridge the gap09:53
rogpeppefwereade: it's all about ad-hoc interfaces09:54
fwereaderogpeppe, isn't that what wallyworld is doing? it's just that you consider the clients in this case as to be too trivial to bother with09:54
* wallyworld apologises - too tired to contribute tonight09:54
fwereadewallyworld, don't worry, not calling you into the conversation :)09:55
rogpeppefwereade: if there was any behaviour to mock, i might agree. but there isn't, and i can see no particular prospect of it - it's really a data-driven algorithm09:55
rogpeppefwereade: for a static table of data, a static table of data seems like the right representation to me09:56
fwereaderogpeppe, I think what he'd doing is relying on instinct for bits-likely-to-change, and inserting seams where they're likely to be useful09:56
fwereaderogpeppe, apart from the Run bits09:56
fwereaderogpeppe, they're types with data *and* behaviour09:57
rogpeppefwereade: tbh what i think what's happening is just use-interfaces-by-rote09:57
rogpeppefwereade: the behaviour is independent of the data09:57
fwereaderogpeppe, your refactoring still puts them in the same type; I think that's an indication that it's not *quite* as cut and dried as yu say09:58
fwereaderogpeppe, note: this is not a request for a more extreme refactoring ;p09:58
rogpeppefwereade: yes, that type composes both the metadata and some behaviour together09:59
fwereaderogpeppe, did I say the thing about expected value?10:00
fwereaderogpeppe, not sure I did10:00
rogpeppefwereade: not sure you did10:00
fwereaderogpeppe, picking an interface has a small cost now and in future; picking a struct has a lower cost now, and a chance of a much higher cost in future10:01
fwereaderogpeppe, the choice comes down to a judgment call10:01
fwereaderogpeppe, people can legitimately disagree10:01
rogpeppefwereade: you really think that there's a high cost from moving to use an interface? when there are no external clients?10:01
rogpeppefwereade: i have not found that10:02
rogpeppefwereade: i like the code to be as understandable as possible10:02
fwereaderogpeppe, yes, I really do10:02
fwereaderogpeppe, IMO/E interfaces are at least as understandable as structs10:03
rogpeppefwereade: so you think that changing the code base to use, for example, all the State types as interfaces, would be hard?10:03
fwereaderogpeppe, I'm trying t obe generous in acknowledging that sometimes they're a little cheaper10:03
rogpeppefwereade: interfaces are less understandable because it's not obvious what's going to happen when they're called10:04
fwereaderogpeppe, yes, it would be a giant hassle and a massive diff10:04
fwereaderogpeppe, because it's *not the client's business*10:04
rogpeppefwereade: it would be a big diff certainly (*state.State -> state.State) but actually it would be easy10:04
fwereaderogpeppe, and all the other types?10:04
rogpeppefwereade: in this case we *are* the client!10:04
rogpeppefwereade: sure, it wouldn't be a problem10:05
rogpeppefwereade: i could do it this afternoon if we wanted10:05
fwereaderogpeppe, there's no use in having a State interface if Machine returns a *Machine, you have to return Machine as well10:05
rogpeppefwereade: sure, that's why i said "all the State types"10:05
rogpeppefwereade: the only hassle would be maintaining the interface types independently from the struct definitions - the interfaces would be enormous.10:06
rogpeppes/struct definitions/method definitions/10:06
fwereaderogpeppe, right, so you *can't* usefully use an ad-hoc interface because you have to construct an actual *Machine10:06
rogpeppefwereade: you can, but it's a bit more work10:07
rogpeppefwereade: (the address updater uses that technique for testing)10:07
fwereaderogpeppe, it's an *enormous* amount of work to construct one of those that behaves in a specifically tuned way10:07
fwereaderogpeppe, and even *that* is hamstrung because it depends on concrete mgo types10:07
fwereaderogpeppe, it's *really nice* to be able to test state clients against tuned mocks, rather than building up loads of state every time10:08
rogpeppefwereade: honestly, it's not *that* much hassle - here's the relevant code the instancepoller tests: http://paste.ubuntu.com/6930374/fwereade: actually the best value would come not from mocking *10:09
rogpeppeoops10:09
rogpeppefwereade: honestly, it's not *that* much hassle - here's the relevant code the instancepoller tests: http://paste.ubuntu.com/693037410:09
rogpeppefwereade: actually the best value would come not from mocking *state.State, but the various other types (*Machine &c)10:10
fwereaderogpeppe, multiply that work by N tests for N state clients and it becomes a bit unwieldy10:11
fwereaderogpeppe, it's the same simple-code-repeated-everywhere problem10:11
fwereaderogpeppe, that I'm not sure yu see as an actual problem10:12
rogpeppefwereade: so if State was an interface, how would that help matters here?10:13
rogpeppefwereade: you'd still need to mock out the actual behaviour10:13
rogpeppefwereade: so you'd probably end up with an enormous "one-size-fits-all" state mocker, which would be its own source of considerable complexity10:13
rogpeppefwereade: i've thought sometimes that it might be nice just to mock out the mgo interface, and write some in-memory mongodb interpretation code10:14
rogpeppefwereade: that would mean that you could base all of the State code in memory, so it would be loads faster10:15
rogpeppefwereade: but... you'd still want to be certain that the mock mgo semantics mirrored the actual mongo semantics10:15
fwereaderogpeppe, sure *that* would be nice, but again I don't see how you could actually do that10:15
fwereaderogpeppe, well, actually, *not* necessarily10:15
rogpeppefwereade: again, it would be straightforward to do10:16
fwereaderogpeppe, mocking lets you exhaustively test the operation of a client given a range of locally defined behaviours10:16
fwereaderogpeppe, imagining that the only purpose of a mock is to perfectly simulate a real system is to somewhat miss the point10:16
fwereaderogpeppe, what-happens-if-X-bizarre-situation becomes *actually* testable, and cheaply10:17
rogpeppefwereade: the problem is that the integration tests don't necessarily test all the behaviours that are being tested in the unit tests10:17
rogpeppefwereade: ideally, you'd be able to test against both the mock (for quick tests) and the real thing (for slower but more complete) tests10:18
fwereaderogpeppe, integration tests as tracer bullets, and exhaustively paranoid unit tests with mocks, are O(N) work; exhaustively paranoid integration tests are O(N^layers-used-directly-or-indirecttly)10:19
jamespageis it really right that 1.16.6 added errgo?10:19
fwereaderogpeppe, oh yes, more direct switch of subject10:19
rogpeppejamespage: definitely not10:19
fwereaderogpeppe, if we're depending on it can we please put it under github/juju10:19
jamespagerogpeppe, well its in the release tarball...10:19
* jamespage sighs10:19
rogpeppejamespage: i know why10:20
jamespageI'll ping sinzui later10:20
rogpeppejamespage: it's because of the way that the tarball is built10:20
rogpeppejamespage: it's not actually *used* by juju in 1.16.610:20
rogpeppejamespage: but the tarball is build by doing "go get .../juju" then updating to the correct revision, then updating the deps10:21
rogpeppejamespage: but updating the deps does not remove unused deps10:21
jamespagerogpeppe, oh crap - so it will pull in all trunk deps but not drop ones used in stable10:21
jamespagenot used that would be10:21
rogpeppejamespage: yes10:21
jamespagethat's not helpful10:22
rogpeppejamespage: that's my understanding10:22
jamespagerogpeppe, lemme nag sinzui later10:22
jamespageI was going to upload this for SRU but stuff like this will make the SRU team nervous10:22
rogpeppejamespage: what's the actual problem with having unused deps?10:22
rogpeppefwereade: this'll be thumper's errgo, FWIW10:23
fwereaderogpeppe, sure, the request still stands10:23
rogpeppefwereade: ok10:24
rogpeppefwereade: you don't think that github.com/errgo/errors is a reasonable path for it?10:24
rogpeppefwereade: it would be considerably more likely for 3rd party code to use it there, i think, and that would be a Good Thing10:24
fwereaderogpeppe, I'm not sure that's the case -- and I really don't want to further grow our dependencies on external code10:27
fwereaderogpeppe, it'll be a pretty fundamental dependency10:28
fwereaderogpeppe, and if it's good and stable I don;t think being under an organisation named for a (hopefully) successful and popular open-source package will do it any harm10:28
rogpeppefwereade: perhaps so.10:29
rogpeppefwereade: i'll probably put it at the above path too, and make sure the two are compatible10:30
fwereaderogpeppe, it remains a distinct package with its own identity but we get to move towards drawing our critical dependencies into a sphere over which we have control10:30
fwereaderogpeppe, that's perfectly fine10:30
fwereaderogpeppe, jamespage: btw, AIUI, we *could* chck out juju, and use deps.tsv to pull in the necessary dependencies on their own, and then not run the risk of pulling in other random unpinned stuff, right? we just don't do that yet10:32
rogpeppefwereade: the problem with that is my fault10:32
fwereaderogpeppe, jamespage: but I don't see any reason not to?10:33
rogpeppefwereade: which is that godeps doesn't currently have a way to pull deps - it just updates existing deps10:33
fwereaderogpeppe, yeah, I can see that the pulling-deps bit is a hassle10:33
rogpeppefwereade: i should just do that - i've just been lazy so far10:33
fwereaderogpeppe, that would be awesome10:33
fwereaderogpeppe, btw can I steal 30s of attention for a review of https://codereview.appspot.com/63710044/ please?10:34
rogpeppefwereade: sure10:34
rogpeppefwereade: what's the deal with the changes to UniterAPI.getUnit and getService?10:35
fwereaderogpeppe, oh balls10:36
fwereaderogpeppe, wrong base10:36
fwereaderogpeppe, it's https://codereview.appspot.com/57710043/10:36
fwereaderogpeppe, the reason is that there's no guarantee that we're actually passing unit or service tags there10:37
rogpeppefwereade: yeah, i figured that.10:38
rogpeppefwereade: it could still use FindEntity and just check the type-assertion result, but the ParseTag approach is cheaper and probably better, yeah10:38
rogpeppefwereade: i don't quite understand how that CL restores the ability of the uniter to read removed units10:48
fwereaderogpeppe, getUnit fails if the unit doesn't exist10:48
fwereaderogpeppe, pulling out the service name still works so long as the service is there10:48
fwereaderogpeppe, and it will be so long as the relation using it is10:49
rogpeppefwereade: but didn't we just call getUnit to get the RelationUnit ?10:49
rogpeppefwereade: that's operated on by checkRemoteUnit10:49
fwereaderogpeppe, the RelationUnitis for LocalUnit10:50
rogpeppefwereade: ah ha!10:51
rogpeppefwereade: ok, makes sense.10:51
rogpeppefwereade: LGTM with a suggestion for a comment10:53
fwereaderogpeppe, SGTM, would you LGTM the other one for form's sake too please?10:54
rogpeppefwereade: am looking currentyl10:54
natefinchmorning all. Seems like I missed the standup?10:54
fwereadenatefinch, er, I didn't spot the standup reminder :/10:57
fwereaderogpeppe, natefinch: shall we do it quickly then?10:57
rogpeppefwereade: i didn't either10:58
rogpeppefwereade, natefinch: let's10:58
rogpeppemgz: standup?10:59
rogpeppemgz: (better late than never...)10:59
TheMuecould somebody please give me a little hit at the back of my head! somehow I'm in vi mode and trying to operate my sublime editor with vi commands. *aaaargh*11:21
rogpeppeanyone see launchpad.net down ?11:59
natefinchrogpeppe: fine for me12:01
rogpeppenatefinch: ah, it's started working again12:02
natefinchrogpeppe: you're welcome ;)12:02
rogpeppenatefinch: although it doesn't seem to be registering my branch pushes12:02
rogpeppei'm trying to approve this: https://code.launchpad.net/~rogpeppe/juju-core/487-remove-job-managestate/+merge/20291612:02
rogpeppebut it keeps insisting that it's on revno 2250, not the latest revno 225212:03
rogpeppeand as expected the bot is saying "There are additional revisions which have not been approved in review"12:04
rogpeppehow frustrating12:04
natefinchrogpeppe: yeah weird12:04
rogpeppenatefinch: if you do, "bzr revno -r lp:~rogpeppe/juju-core/487-remove-job-managestate", it prints 2252, right?12:05
natefinchrogpeppe: it prints ??? as the response, which is less than encouraging12:05
rogpeppenatefinch: ah, that might be just bzr - can you pull the branch?12:06
natefinchrogpeppe: yep, and once that's done it says 225212:07
rogpeppenatefinch: right, thanks12:08
rogpeppenatefinch: so *something* is up with lp12:08
rogpeppemgz: any idea what could cause this?12:08
rogpeppecd ..12:09
rogpeppehmm, interesting bzr push error:12:12
rogpeppebzr: ERROR: Server sent an unexpected error: ('error', 'xmlrpclib.ProtocolError', '<ProtocolError for xmlrpc.lp.internal:8097/codehosting: -1 >')12:12
natefinchrogpeppe: have you tried rebooting? :D12:14
mgzhm, nothing particular comes to mind12:14
rogpeppenatefinch: it doesn't seem like a local problem to me12:14
rogpeppeanother error: ConnectionReset reading response for 'BzrDir.open_2.1', retrying12:14
rogpeppebut then the retry succeeded12:15
natefinchrogpeppe: that's the joke.  But yes, aggravating.12:15
mgzmay be a remote issue12:15
rogpeppemgz: so no idea of how i might be able to prod lp into recognising that a branch has been updated?12:15
rogpeppeha, "Sorry, there was a problem connecting to the Launchpad server."12:16
rogpeppeso it's not just one branch12:17
rogpeppenatefinch: what happens if you go to https://code.launchpad.net/~rogpeppe/juju-core/479-desired-peer-group/+merge/201245 now?12:17
mgzrogpeppe: still getting an error now?12:19
natefinchrogpeppe: that's a different MP, is that the right link?12:19
rogpeppenatefinch: yeah, i was getting an error on that one too12:20
rogpeppemgz: i just succeeded with that one. let me try the first one again12:20
rogpeppemgz: getting an error with that one still; will keep reloading the page12:22
rogpeppeah, finally!12:23
rogpeppeapproved at the right version12:23
natefinchrogpeppe: what's the proper way to join path strings in a path list? our code does a lot of path+":"+newpath  but that'll fail on windows.... but os.PathListSeparator is a rune, not a string, which makes it a pain in the ass12:31
rogpeppenatefinch: i saw a proposal ages ago for a filepath.SplitList, but i think it foundered12:33
rogpeppenatefinch: s/SplitList/JoinList12:33
rogpeppenatefinch: we could always add it to utils12:34
natefinchrogpeppe: ok, yeah, I had hoped I just missed it somewhere12:35
rogpeppenatefinch: func JoinList(paths ...string) {return strings.Join(paths, string(os.PathListSeparator))}12:35
rogpeppenatefinch: actually, given that it's in utils, it should probably be JoinPathList12:36
natefinchrogpeppe: ahh, didn't realize you could cast a rune to a string.12:36
rogpeppenatefinch: you should read the spec again :-)12:36
natefinchyeah, it's been a while.  Just haven't dealth with runes much12:37
rogpeppestructural regexp line noise of the moment: ,x/^=.*\n([^=].*\n)+/y/^=.*\n(---.*\n)?(\+\+\+.*\n)?/x/(^[+\-].*\n)+/g/(errors|errgo)\.Cause/=12:53
* mgz hits rogpeppe 12:55
* rogpeppe protests: "but it's doing useful stuff for me!"12:56
rogpeppemgz: perhaps you've got a better idea actually.12:58
rogpeppemgz: i've got an enormous branch that i want to cherry pick certain bits from automatically12:59
mgzna, not really, rewrites like this are always just finding the right pain balance of automation and manual work12:59
rogpeppemgz: (or at any rate with a minimum of effort)12:59
rogpeppemgz: do you know of a tool that lets me just click on the bits i want to choose?13:00
mgzhm, well, with an existing branch, depending on how the bits are layed out, you may find a merge and a proper three-way editor faster13:00
natefinchnow you have two problems etc13:00
natefinchyeah, a proper merge tool makes it a lot easier13:01
mgznatefinch: do you have a particular one you tend to use?13:02
mgzI struggle along with vimdiff when I need it generally13:02
natefinchmgz: beyond compare is awesome13:03
natefinchmgz meld is supposed to be pretty awesome but I haven't used it13:04
rogpeppenatefinch: i'm just trying meld, but it's not easy to see how it supports my use case13:19
natefinchrogpeppe: you should be able to diff a clean branch vs. your fixed branch then just do a search for .Cause and copy over the changes that you want to keep13:21
rogpeppenatefinch: thanks, that sounds plausible, i'll try that13:22
natefinchrogpeppe: yeah, since you said there weren't that many spots in which you use cause, it's probably faster and easier than trying to get exactly the right regex to work.13:23
rogpeppenatefinch: yeah, and the regex isn't sufficient anyway, because there are other parts related to Cause changes that don't mention Cause13:23
natefinchrogpeppe: ahh yeah. Sometimes there's no replacement for the human brain13:24
natefincharg... I kinda wish we hadn't used testing/testbase in utils, because then it means we can't use utils in testing/testbase :/13:57
niemeyerHey all13:58
niemeyerfwereade: Is the juju-dist bucket still being used?13:58
niemeyerHmm, looks like it is14:00
TheMue*: did anybody had a "cannot upload charm: Post https://localhost:8900/charms?series=quantal: local error: record overflow" in client_test.go TestAddLocalCharm()?14:08
fwereadeniemeyer, it's still being uploaded to and while it's probably not being used *much* we did come across some guys with a very old environment recently14:09
fwereadeniemeyer, where there's one there may be more14:09
TheMuefwereade, rogpeppe: do you know the test failure mentioned above?14:09
rogpeppeTheMue: i haven't seen that14:10
TheMuerogpeppe: thx, strange14:10
niemeyerfwereade: Hmmm14:11
niemeyerfwereade: Do we have any releases in Ubuntu using it?14:11
fwereadeTheMue, hmm, haven't seen that14:12
fwereadeniemeyer, I don't *think* so -- 1.14 is the latest that depends on it iirc -- but they need it to upgrade to 1.1614:14
niemeyerfwereade: Ah, still recent then, cool14:15
TheMuerogpeppe, fwereade: running the test solo it passes, running the suite it fails ???14:15
rogpeppeTheMue: it fails reliably?14:15
TheMuerogpeppe: seems so, had been able to repeat it multiple times14:16
TheMuerogpeppe: the "record overflow" is no text in our code14:16
rogpeppeTheMue: interesting.14:17
rogpeppeTheMue: what does the test output look like?14:17
TheMuerogpeppe: http://paste.ubuntu.com/6931384/14:18
TheMuerogpeppe: and the piece of code is http://paste.ubuntu.com/6931388/14:21
rogpeppeTheMue: interesting - i'm not sure that could ever have worked14:22
TheMuerogpeppe: hehe14:22
TheMuerogpeppe: but as I said, running the test function as the only one it works14:23
rogpeppeoh, i see; it sets the server root14:23
rogpeppeTheMue: i suspect you've got two tests colliding14:23
rogpeppeTheMue: that test should definitely not be listening on a fixed port14:23
TheMuerogpeppe: sounds logical14:24
rogpeppeTheMue: if you change that code to listen on a newly chosen port instead, does it still fail?14:24
rogpeppeTheMue: ah, there's another problem with that code too - it may not have actually started listening when you add the local charm14:25
TheMuerogpeppe: changed to 8901, still fails14:25
rogpeppeTheMue: could you change it to listen on a newly chosen port (use net.Listen("tcp", ":0"))14:26
rogpeppe?14:26
TheMuerogpeppe: have to check how I would have to change the code, but now I've got my standup14:28
rogpeppeTheMue: the same way that all the other test http listeners do it14:29
TheMuerogpeppe: will look there14:29
TheMuerogpeppe: changed it and it runs on the same failure15:00
rogpeppeTheMue: what does the code look like now?15:00
TheMuerogpeppe: paste.ubuntu.com/6931586/ - and it still passes when called alone15:02
rogpeppeTheMue: hmm15:03
rogpeppeTheMue: one possible thing to try: in the juju-core root directory, run "godeps -u dependencies.tsv"15:05
TheMuerogpeppe: could do so, but could you explain the reason for this command before?15:07
rogpeppeTheMue: it updates the package dependencies to be as expected15:07
rogpeppeTheMue: also, what version of Go are you using?15:07
TheMuerogpeppe: 1.1.115:08
TheMuerogpeppe: should update ;)15:08
rogpeppeTheMue: yes, you must do that15:09
rogpeppeTheMue: you should be using 1.215:09
rogpeppeTheMue: if you're not up to date, you'll probably need to iterate - when godeps complains about a package (because the required revision isn't available), run go get -u <pkgname>15:09
TheMuerogpeppe: ok, will quickly change15:09
sinzuihi rogpeppe , natefinch : Do either of you have a few minutes to review a backport for 1.16 that lets QA run unit-tests? https://codereview.appspot.com/6400004315:09
rogpeppesinzui: looking15:10
rogpeppesinzui: LGTM15:11
sinzuithank you rogpeppe15:11
* rogpeppe goes for lunch15:16
* natefinch goes to blow some snow15:22
=== natefinch is now known as natefinch-afk
TheMuerogpeppe: after update and rebuild of all pkgs still the same15:23
rogpeppefwereade: https://github.com/juju/errgo16:28
rogpeppefwereade: (README thanks to github.com/robertkrimen/godocdown )16:28
fwereaderogpeppe, awesome, tyvm16:39
sinzuiany ideas about what I can do to make gobot test my branch again? https://code.launchpad.net/~sinzui/juju-core/run-unit-test-on-trusty/+merge/20650317:54
=== JoshStrobl is now known as JoshStrobl-afk
rogpeppesinzui: sometimes it gets stuck17:59
rogpeppesinzui: it should be working again now18:02
sinzuiplars in #juju reports this error on hp-cloud. The config works for 1.16.3, but not 1.17.218:02
sinzuiERROR bootstrap failed: cannot start bootstrap instance: index file has no data for cloud {region-a.geo-1 https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/} not found18:02
rogpeppesinzui: BTW i updated your commit message - it's really nice if the commit message is exactly the same as is in the codereview description, including the codereview link18:02
sinzuiI cannot reproduce the issue18:02
sinzuinoted rogpeppe18:03
rogpeppesinzui: i'm away for the weekend now18:03
rogpeppehappy weekends all18:03
sinzuime too18:03
=== natefinch-afk is now known as natefinch

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