mupBug #1511589 opened: maas provider, hwclock out of sync means juju will not work <kanban-cross-team> <landscape> <maas-provider> <juju-core:New> <MAAS:New> <https://launchpad.net/bugs/1511589>02:44
rogpeppeaxw: how would i use gocov to merge coverage profiles? it's not clear from the README07:53
axwrogpeppe: sorry, IIANM you can "gocov convert profile [profile...]". but it's going to give you gocov JSON output, if it's not clear07:54
rogpeppeaxw: so my aim here was to try and see the combined test coverage of juju/api when running the juju/apiserver/client and juju/api tests07:56
rogpeppeaxw: and i like the nice red-green line-by-line HTML output of the usual coverage tool07:56
rogpeppeaxw: can i use gocov to do that?07:56
axwrogpeppe: cmars added support to gocov for testing multiple packages, so you should be able to "gocov test juju/api juju/apiserver/client"07:57
axwrogpeppe: there's command-line "gocov annotate" for annotated source, and https://github.com/matm/gocov-html if you want HTML07:58
axwrogpeppe: (and I just noticed that doesn't do red/green, assuming the screenshot is representative; sorry)08:01
rogpeppeaxw: trying it anyway. we'll see.08:03
rogpeppeaxw: hmm, doesn't seem to have worked: http://paste.ubuntu.com/13007149/08:07
rogpeppeaxw: and /tmp/cov.out is empty08:07
axwrogpeppe: hrm, I'll take a look08:08
axwrogpeppe: did you just fetch gocov?08:08
rogpeppeaxw: hmm, maybe i should've used go test then gocov convert08:08
rogpeppeaxw: yeah08:08
axwrogpeppe: that should work08:08
rogpeppeaxw: um08:08
rogpeppeaxw: it looks like i didn't08:09
rogpeppe% ls -l `{whatis gocov}08:09
rogpeppe-rwxrwxr-x 1 rog rog 3907964 Mar 22  2013 /home/rog/src/go/bin/gocov08:09
axwoops :)08:09
rogpeppeaxw: ah!08:10
rogpeppeaxw: the command isn't in the top level dir08:10
rogpeppeaxw: i did go install github.com/axw/gocov08:10
axwrogpeppe: hrm, I've just realised that "gocov test <pkg>" does not tell you about dependent packages. so you'll need to specify -coverpkg08:14
rogpeppeaxw: ah, i wondered about that08:14
axwrogpeppe: original gocov used to do it, but then it became a shim around "go test -cover"08:14
axwit should probably do it again, since it supports multiple packages now08:15
rogpeppeaxw: hmm08:15
rogpeppe% gocov test -coverpkg ./api ./api ./apiserver/client > /tmp/cov.out08:15
rogpeppewarning: no packages being tested depend on github.com/juju/juju/api08:15
* axw tries08:16
rogpeppeaxw: that doesn't seem right to me - both those packages depend on juju/api08:16
axwrogpeppe: maybe something to do with relative package path?08:16
rogpeppeaxw: i'll try abs08:16
axwrogpeppe: I just tried it on a dummy package08:16
axwworked ok08:17
rogpeppeaxw: using absolute path didn't help08:17
rogpeppeaxw: i'll try go test then gocov convert08:17
axwrogpeppe: weird, putting "-coverpkg ./api" *after* the package names seems to work ...08:18
axwrogpeppe: hmm or maybe not08:19
axwok just do it your way ;p08:19
rogpeppeaxw: trying it now08:19
* rogpeppe wishes command line flag parsing wasn't context-sensitive08:20
axwrogpeppe: oh it does work, I was seeing warnings for another reason (I was using ./... and not all packages depend on it)08:20
frobwaredimitern, please could you take a look at http://reviews.vapour.ws/r/3030/08:21
axwrogpeppe: http://paste.ubuntu.com/13007210/08:22
axwrogpeppe: I read that as: api tests 56% of api, apiserver/client tests 43.7%, together they do 77.78%08:23
rogpeppeaxw: that doesn't look right to me08:24
rogpeppeaxw: for example EnsureAvailability is well tested by apiserver/client but comes up as 0%08:24
dimiternfrobware, sure, looking08:25
axwrogpeppe: seems to happen regardless of whether I'm merging... checking what happens when I just use "go test -cover"08:28
rogpeppeaxw: so i get the same issue when manually using gocov convert with multiple files08:28
dimiternfrobware, lgtm08:29
axwrogpeppe: just tested with "go test -coverpkg github.com/juju/juju/api <etc>" and it shows 0% coverage for Client.EnsureAvailability08:32
rogpeppeaxw: yeah, i just saw that too. maybe our tests are at fault08:32
axwrogpeppe: ah... it's calling the apiserver/client code directly I think08:33
rogpeppeaxw: ah, so it is08:34
rogpeppeaxw: ok, we're all mixed up in our testing approaches here08:34
rogpeppeaxw: thanks08:34
axwrogpeppe: nps08:34
axwrogpeppe: one of these days I'd like to get coverage generated by CI08:34
axwmerged for the whole tree08:35
rogpeppeaxw: yes, that would be great08:35
dimiternaxw, hey, since you're here - a question: do you know if there's any way in a manual environment to add a new machine and a new container on it in a single command?09:08
dimiterne.g. like in other envs you can add-machine lxc09:08
dimiternI guessed not, but wasn't completely sure09:08
mupBug #1511659 opened: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659>09:08
mupBug #1511659 changed: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659>09:14
mupBug #1511659 opened: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659>09:18
dimiternfwereade, hey, how's that for a better UX: http://paste.ubuntu.com/13007523/09:32
dimiternI'll fix the typo09:33
fwereadedimitern, nice09:35
dimiternfwereade, I've added a PrecheckContainerHost method on the state.Policy.Prechecker09:35
dimiternfwereade, which can be called with or without the host being provisioned (the latter in the case you've done $ juju add-machine lxc)09:36
fwereadedimitern, excellent09:36
dimiternfwereade, yeah, I agree it's much cleaner like this; now just a couple of provisioner API methods are needed to allow the worker to notify the apiserver that it's about to start/stop a container, so the NICs can be created with the pre-generated MAC etc.09:38
fwereadedimitern, yeah, sgtm09:39
fwereadedimitern, lovely09:39
dimiternjam, dooferlad, standup?10:01
frobwareanybody else see "cannot load cookies: json: cannot unmarshal object into Go value of type []cookiejar.entry" - this from 'juju ssh 0'11:02
dimiternfrobware, you probably need to update the deps11:25
frobwaredimitern, done that11:25
dimiternfrobware, so that's not a build error?11:25
frobwaredimitern, bootstrap works, trying to 'juju ssh 0' borks11:26
dimiternfrobware, hmm I haven't seen this - try with juju ssh --debug 011:29
frobwaredimitern, just starting a git bisect to see if it is just me, or something recent.11:38
dimiternfrobware, I think I noticed some sort of bug related to loading cookies and bootstrap issues today or yesterday - might be worth a quick search12:05
* dimitern is surprised to find out $ juju deploy mysvc --to 0,lxc:1,2,lxc works but it's not documented12:15
mupBug #1511717 opened: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717>12:42
mupBug #1511717 changed: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717>12:45
mupBug #1511717 opened: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717>12:54
mupBug #1511589 changed: maas provider, hwclock out of sync means juju will not work <landscape> <maas-provider> <juju-core:Invalid> <MAAS:New> <https://launchpad.net/bugs/1511589>13:39
frobwaredimitern, forward port to master - http://reviews.vapour.ws/r/3031/ (do these need reviewing if they have been reviewed on 1.25?)14:11
dimiternfrobware, will have a look in a bit; yes - they do need reviewing (albeit a quick one, since it's a port)14:20
frobwaredimitern, well this was a cherry-pick14:21
dimiternfrobware, ship it! ;)14:34
katconatefinch: sorry, what's the status on http://reviews.vapour.ws/r/2814/ ?15:05
katcoericsnow: you should have your reviews from me15:06
ericsnowkatco: thanks!15:06
natefinchkatco: I have to write a couple small tests and then I have a shipit from william15:07
katconatefinch: k, i know it's friday labs, but extenuating circumstances, can you land that today?15:07
natefinchkatco: yeah... I think friday labs is only friday afternoons anyway, right?15:08
katconatefinch: i think we can spare a day :)15:08
natefinchkatco: regardless, it should be very fast to finish up15:08
katconatefinch: cool15:08
natefinchIs there a way to make a new unit without having to invoke methods on state?  there's a state.newUnit, which is obviously not exported, and the fields of Unit are not exported...15:25
natefinch(this is for testing)15:25
natefinchfwereade, dimitern, rogpeppe, wwitzel3, ericsnow, katco, etc ^15:26
katconatefinch: there's the factory15:27
ericsnownatefinch: I've only ever used the state stuff (see the helper in state/workloads_test.go)15:27
ericsnownatefinch: but that uses ConnSuite15:27
katconatefinch: ericsnow: sec, hunting for this15:27
rogpeppenatefinch: what are you trying to do?15:28
dimiternnatefinch, why without calling a state method?15:28
katconatefinch: https://github.com/juju/juju/blob/master/testing/factory/factory.go15:28
natefinchrogpeppe: test a function that takes a unit without doing a full stack test15:28
katconatefinch: but forgot it still uses state =/15:28
natefinchdimitern: because using state will make my test take 100 times longer15:29
rogpeppenatefinch: you could always use an interface type15:29
katconatefinch: don't dwell on this too long. your budget is spent15:29
rogpeppenatefinch: that's not a problem to be solved in isolation15:29
rogpeppenatefinch: someone should spend some time looking at how to speed up *all* state-based tests15:29
rogpeppenatefinch: i can't believe noone seems to have allocated any time for that15:30
natefinchrogpeppe: I don't have time to solve the problem in general. I just want to write a unit test15:30
katcorogpeppe: i think what he's saying is that he doesn't want it to be state based at all15:30
rogpeppenatefinch: so write the test the same way as all the other tests are written15:30
dimiternnatefinch, ah, well - interfaces & mocking then15:30
natefinchthe code in the function that I'm testing is very very simple15:30
rogpeppenatefinch: making it different will only make things harder in the long run15:30
rogpeppenatefinch: what does your function look like?15:31
natefinchrogpeppe: I think I can fix it with judicious application of a tiny special-case interface, actually15:31
rogpeppenatefinch: that's often the case15:31
natefinchinstead of casting a state.Entity to *state.Unit. cast to an interface with the one function I need from Unit.15:32
frobwarecherylj, ping - any chance we could quickly chat about https://bugs.launchpad.net/juju-core/+bug/141262115:42
mupBug #1412621: replica set EMPTYCONFIG MAAS bootstrap <adoption> <bootstrap> <bug-squad> <charmers> <cpec> <cpp> <maas-provider> <mongodb> <oil> <juju-core:Triaged by frobware> <juju-core 1.24:Triaged> <https://launchpad.net/bugs/1412621>15:42
fwereadenatefinch, +100 to that, if you must cast cast to the narrowest possible interface15:46
natefinchfwereade: yep, just a single function.  And now my 3 tests take less than a millisecond each to run.15:48
fwereadenatefinch, <315:48
fwereadenatefinch, and you can get nice coverage of weird errors as well, and it'll still take less than a ms :)15:48
natefinchfwereade: yep.  tested the error paths as well.15:49
fwereadenatefinch, perfect :)15:49
katconatefinch: well done :)15:51
mupBug #1511771 opened: regression setting tools-metadata-url <blocker> <ci> <regression> <set-env> <juju-core:Triaged> <https://launchpad.net/bugs/1511771>15:52
* wwitzel3 goes to look at those tests to remember the implementation15:52
natefinchThis branch has conflicts that must be resolved16:02
natefinchI guess it's to be expected given that it's a 29 day old PR :/16:03
natefinchgah, why does git rebase master tell me I'm up to date when github says there's conflicts merging?16:08
natefinchahh, my local master was out of date16:10
natefinchkatco: merging the unitassigner stuff now.... assuming the bot is working and will pick it up, which is looking somewhat questionable currently.16:16
katconatefinch: eh? why, what's going on with the bot?16:17
natefinchkatco: nevermind, it was just being slo16:18
natefinchexcept that master is blocked now... sonofa16:18
alexisbfrobware, cherylj is out today17:23
alexisbI need a volunteer to help with a friday afternoon activity17:29
alexisbanyone around and willing?17:29
natefinchalexisb: I'm around.  I'd rather work on minjujuversion, but can do other things as needed17:32
alexisbnatefinch, this shouldnt take long, I just have a couple of qs to get me unstuck17:33
mupBug #1511812 opened: 1.25.0 cannot bootstrap local environment on wily host  <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812>17:52
mupBug #1511812 changed: 1.25.0 cannot bootstrap local environment on wily host  <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812>17:55
mupBug #1511812 opened: 1.25.0 cannot bootstrap local environment on wily host  <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812>17:58
mupBug #1511822 opened: imports github.com/juju/juju/workload/api/internal/client: use of internal package not allowed <blocker> <ci> <regression> <wily> <juju-core:Incomplete> <juju-core 1.25:Triaged> <https://launchpad.net/bugs/1511822>18:34
mupBug #1511822 changed: imports github.com/juju/juju/workload/api/internal/client: use of internal package not allowed <blocker> <ci> <regression> <wily> <juju-core:Incomplete> <juju-core 1.25:Triaged> <https://launchpad.net/bugs/1511822>18:37
mupBug #1511822 opened: imports github.com/juju/juju/workload/api/internal/client: use of internal package not allowed <blocker> <ci> <regression> <wily> <juju-core:Incomplete> <juju-core 1.25:Triaged> <https://launchpad.net/bugs/1511822>18:46
=== natefinch is now known as natefinch-afk
mupBug #1511822 changed: imports github.com/juju/juju/workload/api/internal/client: use of internal package not allowed <blocker> <ci> <regression> <wily> <juju-core:Incomplete> <juju-core 1.25:Triaged> <https://launchpad.net/bugs/1511822>18:49
mupBug #1511822 opened: imports github.com/juju/juju/workload/api/internal/client: use of internal package not allowed <blocker> <ci> <regression> <wily> <juju-core:Incomplete> <juju-core 1.25:Triaged> <https://launchpad.net/bugs/1511822>18:52
mupBug #1511865 opened: juju run output is unusable <juju-core:New> <https://launchpad.net/bugs/1511865>22:02
=== benonsoftware is now known as MisterHiyas
mupBug #1511865 changed: juju run output is unusable <juju-core:Invalid> <https://launchpad.net/bugs/1511865>22:32

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