mup | Bug #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 |
---|---|---|
rogpeppe | axw: how would i use gocov to merge coverage profiles? it's not clear from the README | 07:53 |
axw | rogpeppe: sorry, IIANM you can "gocov convert profile [profile...]". but it's going to give you gocov JSON output, if it's not clear | 07:54 |
rogpeppe | axw: 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 tests | 07:56 |
rogpeppe | axw: and i like the nice red-green line-by-line HTML output of the usual coverage tool | 07:56 |
rogpeppe | axw: can i use gocov to do that? | 07:56 |
axw | rogpeppe: cmars added support to gocov for testing multiple packages, so you should be able to "gocov test juju/api juju/apiserver/client" | 07:57 |
axw | rogpeppe: there's command-line "gocov annotate" for annotated source, and https://github.com/matm/gocov-html if you want HTML | 07:58 |
axw | rogpeppe: (and I just noticed that doesn't do red/green, assuming the screenshot is representative; sorry) | 08:01 |
rogpeppe | axw: trying it anyway. we'll see. | 08:03 |
rogpeppe | axw: hmm, doesn't seem to have worked: http://paste.ubuntu.com/13007149/ | 08:07 |
rogpeppe | axw: and /tmp/cov.out is empty | 08:07 |
axw | rogpeppe: hrm, I'll take a look | 08:08 |
axw | rogpeppe: did you just fetch gocov? | 08:08 |
rogpeppe | axw: hmm, maybe i should've used go test then gocov convert | 08:08 |
rogpeppe | axw: yeah | 08:08 |
axw | rogpeppe: that should work | 08:08 |
rogpeppe | axw: um | 08:08 |
rogpeppe | axw: it looks like i didn't | 08:09 |
rogpeppe | % ls -l `{whatis gocov} | 08:09 |
rogpeppe | -rwxrwxr-x 1 rog rog 3907964 Mar 22 2013 /home/rog/src/go/bin/gocov | 08:09 |
axw | oops :) | 08:09 |
rogpeppe | axw: ah! | 08:10 |
rogpeppe | axw: the command isn't in the top level dir | 08:10 |
rogpeppe | axw: i did go install github.com/axw/gocov | 08:10 |
axw | rogpeppe: hrm, I've just realised that "gocov test <pkg>" does not tell you about dependent packages. so you'll need to specify -coverpkg | 08:14 |
rogpeppe | axw: ah, i wondered about that | 08:14 |
axw | rogpeppe: original gocov used to do it, but then it became a shim around "go test -cover" | 08:14 |
axw | it should probably do it again, since it supports multiple packages now | 08:15 |
rogpeppe | axw: hmm | 08:15 |
rogpeppe | % gocov test -coverpkg ./api ./api ./apiserver/client > /tmp/cov.out | 08:15 |
rogpeppe | warning: no packages being tested depend on github.com/juju/juju/api | 08:15 |
* axw tries | 08:16 | |
rogpeppe | axw: that doesn't seem right to me - both those packages depend on juju/api | 08:16 |
axw | rogpeppe: maybe something to do with relative package path? | 08:16 |
rogpeppe | axw: i'll try abs | 08:16 |
axw | rogpeppe: I just tried it on a dummy package | 08:16 |
axw | worked ok | 08:17 |
rogpeppe | axw: using absolute path didn't help | 08:17 |
rogpeppe | axw: i'll try go test then gocov convert | 08:17 |
axw | rogpeppe: weird, putting "-coverpkg ./api" *after* the package names seems to work ... | 08:18 |
axw | rogpeppe: hmm or maybe not | 08:19 |
axw | ok just do it your way ;p | 08:19 |
rogpeppe | axw: trying it now | 08:19 |
* rogpeppe wishes command line flag parsing wasn't context-sensitive | 08:20 | |
axw | rogpeppe: oh it does work, I was seeing warnings for another reason (I was using ./... and not all packages depend on it) | 08:20 |
frobware | dimitern, please could you take a look at http://reviews.vapour.ws/r/3030/ | 08:21 |
axw | rogpeppe: http://paste.ubuntu.com/13007210/ | 08:22 |
axw | rogpeppe: I read that as: api tests 56% of api, apiserver/client tests 43.7%, together they do 77.78% | 08:23 |
rogpeppe | axw: that doesn't look right to me | 08:24 |
rogpeppe | axw: for example EnsureAvailability is well tested by apiserver/client but comes up as 0% | 08:24 |
axw | hrm | 08:24 |
dimitern | frobware, sure, looking | 08:25 |
axw | rogpeppe: seems to happen regardless of whether I'm merging... checking what happens when I just use "go test -cover" | 08:28 |
rogpeppe | axw: so i get the same issue when manually using gocov convert with multiple files | 08:28 |
dimitern | frobware, lgtm | 08:29 |
axw | rogpeppe: just tested with "go test -coverpkg github.com/juju/juju/api <etc>" and it shows 0% coverage for Client.EnsureAvailability | 08:32 |
rogpeppe | axw: yeah, i just saw that too. maybe our tests are at fault | 08:32 |
axw | rogpeppe: ah... it's calling the apiserver/client code directly I think | 08:33 |
rogpeppe | axw: ah, so it is | 08:34 |
rogpeppe | axw: ok, we're all mixed up in our testing approaches here | 08:34 |
rogpeppe | axw: thanks | 08:34 |
axw | rogpeppe: nps | 08:34 |
axw | rogpeppe: one of these days I'd like to get coverage generated by CI | 08:34 |
axw | merged for the whole tree | 08:35 |
rogpeppe | axw: yes, that would be great | 08:35 |
dimitern | axw, 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 |
dimitern | e.g. like in other envs you can add-machine lxc | 09:08 |
dimitern | I guessed not, but wasn't completely sure | 09:08 |
mup | Bug #1511659 opened: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659> | 09:08 |
mup | Bug #1511659 changed: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659> | 09:14 |
mup | Bug #1511659 opened: Destroyed leader, new leader not elected. <juju-core:New> <https://launchpad.net/bugs/1511659> | 09:18 |
dimitern | fwereade, hey, how's that for a better UX: http://paste.ubuntu.com/13007523/ | 09:32 |
dimitern | I'll fix the typo | 09:33 |
fwereade | dimitern, nice | 09:35 |
dimitern | fwereade, I've added a PrecheckContainerHost method on the state.Policy.Prechecker | 09:35 |
dimitern | fwereade, 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 |
fwereade | dimitern, excellent | 09:36 |
dimitern | fwereade, 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 |
fwereade | dimitern, yeah, sgtm | 09:39 |
fwereade | dimitern, lovely | 09:39 |
dimitern | jam, dooferlad, standup? | 10:01 |
frobware | anybody else see "cannot load cookies: json: cannot unmarshal object into Go value of type []cookiejar.entry" - this from 'juju ssh 0' | 11:02 |
dimitern | frobware, you probably need to update the deps | 11:25 |
frobware | dimitern, done that | 11:25 |
dimitern | frobware, so that's not a build error? | 11:25 |
frobware | dimitern, bootstrap works, trying to 'juju ssh 0' borks | 11:26 |
dimitern | frobware, hmm I haven't seen this - try with juju ssh --debug 0 | 11:29 |
frobware | dimitern, just starting a git bisect to see if it is just me, or something recent. | 11:38 |
dimitern | frobware, I think I noticed some sort of bug related to loading cookies and bootstrap issues today or yesterday - might be worth a quick search | 12:05 |
* dimitern is surprised to find out $ juju deploy mysvc --to 0,lxc:1,2,lxc works but it's not documented | 12:15 | |
mup | Bug #1511717 opened: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717> | 12:42 |
mup | Bug #1511717 changed: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717> | 12:45 |
mup | Bug #1511717 opened: Incompatible cookie format change <compatibility> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1511717> | 12:54 |
mup | Bug #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 |
frobware | dimitern, forward port to master - http://reviews.vapour.ws/r/3031/ (do these need reviewing if they have been reviewed on 1.25?) | 14:11 |
dimitern | frobware, will have a look in a bit; yes - they do need reviewing (albeit a quick one, since it's a port) | 14:20 |
frobware | dimitern, well this was a cherry-pick | 14:21 |
dimitern | frobware, ship it! ;) | 14:34 |
katco | natefinch: sorry, what's the status on http://reviews.vapour.ws/r/2814/ ? | 15:05 |
katco | ericsnow: you should have your reviews from me | 15:06 |
ericsnow | katco: thanks! | 15:06 |
natefinch | katco: I have to write a couple small tests and then I have a shipit from william | 15:07 |
katco | natefinch: k, i know it's friday labs, but extenuating circumstances, can you land that today? | 15:07 |
natefinch | katco: yeah... I think friday labs is only friday afternoons anyway, right? | 15:08 |
katco | natefinch: i think we can spare a day :) | 15:08 |
natefinch | katco: regardless, it should be very fast to finish up | 15:08 |
katco | natefinch: cool | 15:08 |
natefinch | Is 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 |
natefinch | fwereade, dimitern, rogpeppe, wwitzel3, ericsnow, katco, etc ^ | 15:26 |
katco | natefinch: there's the factory | 15:27 |
ericsnow | natefinch: I've only ever used the state stuff (see the helper in state/workloads_test.go) | 15:27 |
ericsnow | natefinch: but that uses ConnSuite | 15:27 |
katco | natefinch: ericsnow: sec, hunting for this | 15:27 |
rogpeppe | natefinch: what are you trying to do? | 15:28 |
dimitern | natefinch, why without calling a state method? | 15:28 |
katco | natefinch: https://github.com/juju/juju/blob/master/testing/factory/factory.go | 15:28 |
natefinch | rogpeppe: test a function that takes a unit without doing a full stack test | 15:28 |
katco | natefinch: but forgot it still uses state =/ | 15:28 |
natefinch | dimitern: because using state will make my test take 100 times longer | 15:29 |
rogpeppe | natefinch: you could always use an interface type | 15:29 |
katco | natefinch: don't dwell on this too long. your budget is spent | 15:29 |
rogpeppe | natefinch: that's not a problem to be solved in isolation | 15:29 |
rogpeppe | natefinch: someone should spend some time looking at how to speed up *all* state-based tests | 15:29 |
rogpeppe | natefinch: i can't believe noone seems to have allocated any time for that | 15:30 |
natefinch | rogpeppe: I don't have time to solve the problem in general. I just want to write a unit test | 15:30 |
katco | rogpeppe: i think what he's saying is that he doesn't want it to be state based at all | 15:30 |
rogpeppe | natefinch: so write the test the same way as all the other tests are written | 15:30 |
dimitern | natefinch, ah, well - interfaces & mocking then | 15:30 |
natefinch | the code in the function that I'm testing is very very simple | 15:30 |
rogpeppe | natefinch: making it different will only make things harder in the long run | 15:30 |
rogpeppe | natefinch: what does your function look like? | 15:31 |
natefinch | rogpeppe: I think I can fix it with judicious application of a tiny special-case interface, actually | 15:31 |
rogpeppe | natefinch: that's often the case | 15:31 |
natefinch | instead of casting a state.Entity to *state.Unit. cast to an interface with the one function I need from Unit. | 15:32 |
frobware | cherylj, ping - any chance we could quickly chat about https://bugs.launchpad.net/juju-core/+bug/1412621 | 15:42 |
mup | Bug #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 |
fwereade | natefinch, +100 to that, if you must cast cast to the narrowest possible interface | 15:46 |
natefinch | fwereade: yep, just a single function. And now my 3 tests take less than a millisecond each to run. | 15:48 |
fwereade | natefinch, <3 | 15:48 |
fwereade | natefinch, and you can get nice coverage of weird errors as well, and it'll still take less than a ms :) | 15:48 |
natefinch | fwereade: yep. tested the error paths as well. | 15:49 |
fwereade | natefinch, perfect :) | 15:49 |
katco | natefinch: well done :) | 15:51 |
mup | Bug #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 implementation | 15:52 | |
natefinch | This branch has conflicts that must be resolved | 16:02 |
natefinch | noooooooo!!! | 16:02 |
natefinch | I guess it's to be expected given that it's a 29 day old PR :/ | 16:03 |
natefinch | gah, why does git rebase master tell me I'm up to date when github says there's conflicts merging? | 16:08 |
natefinch | ahh, my local master was out of date | 16:10 |
natefinch | katco: merging the unitassigner stuff now.... assuming the bot is working and will pick it up, which is looking somewhat questionable currently. | 16:16 |
katco | natefinch: eh? why, what's going on with the bot? | 16:17 |
natefinch | katco: nevermind, it was just being slo | 16:18 |
natefinch | except that master is blocked now... sonofa | 16:18 |
alexisb | frobware, cherylj is out today | 17:23 |
alexisb | I need a volunteer to help with a friday afternoon activity | 17:29 |
alexisb | anyone around and willing? | 17:29 |
natefinch | alexisb: I'm around. I'd rather work on minjujuversion, but can do other things as needed | 17:32 |
alexisb | natefinch, this shouldnt take long, I just have a couple of qs to get me unstuck | 17:33 |
mup | Bug #1511812 opened: 1.25.0 cannot bootstrap local environment on wily host <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812> | 17:52 |
mup | Bug #1511812 changed: 1.25.0 cannot bootstrap local environment on wily host <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812> | 17:55 |
mup | Bug #1511812 opened: 1.25.0 cannot bootstrap local environment on wily host <cloud-installer> <juju-core:New> <https://launchpad.net/bugs/1511812> | 17:58 |
mup | Bug #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 |
mup | Bug #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 |
mup | Bug #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 | ||
mup | Bug #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 |
mup | Bug #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 |
mup | Bug #1511865 opened: juju run output is unusable <juju-core:New> <https://launchpad.net/bugs/1511865> | 22:02 |
=== benonsoftware is now known as MisterHiyas | ||
mup | Bug #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!