/srv/irclogs.ubuntu.com/2013/03/29/#juju-dev.txt

teknicois anyone around today? :-) I need a second review of https://codereview.appspot.com/8094045/12:14
dimiternteknico: will take a look12:52
fwereadetkeLGTM12:52
fwereadeteknico, LGTM12:53
dimitern:)12:53
dimiternsorry to be so late12:53
fwereadeteknico, just one thing to think about and one test to add12:53
teknicofwereade, re: the args num removal, I removed it because of a request by rogpeppe, as you can see above in the code review12:54
fwereadeteknico, I thought he suggested dropping it at the api layer12:54
fwereadeteknico, I definitely agree with that12:54
teknicofwereade, oh, so I probably misunderstood his suggestion, I'll check12:55
fwereadeteknico, it's just that the CLI can take a moment to connect, and failing fast there is nice for the user12:55
teknicofwereade, right12:55
teknicofwereade, and I'll add the test you mentioned, thanks for the review12:55
fwereadeteknico, thanks for the code :)12:55
fwereadedimitern, a couple of things btw13:17
dimiternfwereade: yeah?13:17
fwereadedimitern, I have reviews up: https://codereview.appspot.com/8140044/ https://codereview.appspot.com/8154043/13:17
dimiternfwereade: I'll take a look a bit later - i'm deeply into status tests refactoring right now13:17
fwereadedimitern, and, in kanban, there is a defect card that you *might* want topick up after what you're doing now because it leads into it nicely13:18
dimiternfwereade: which one?13:18
fwereadedimitern, it's the machine-id-in-status one: it's in core's TODO lane but feel free to grab it if you want it :)13:18
dimiternfwereade: but i'm not yet changing what status outputs13:19
fwereadedimitern, it really is only a suggestion13:19
dimiternfwereade: it could be a follow-up though, after the status refactoring13:20
dimiternfwereade: thanks13:20
fwereadedimitern, if say at nearly-eod you think to yourself "what tiny follow-up branch do I feel like doing before I go"13:20
dimiternfwereade: sure :) sgtm13:20
fwereadedimitern, I agree it's not the same as what you're doing now and should certainly not be rolled into the same CL :)13:20
dimiternfwereade: yep13:23
dimiternfwereade: can I use export_test to provide access to the internals to some other module?13:24
fwereadedimitern, only to the associated foo_test package13:25
dimiternfwereade: I'm writing the cleanup stuff for the status tests, and one step is destroying all machines created13:25
fwereadedimitern, not to everything13:25
dimiternfwereade: but I cannot destroy (normally) machines with JobManageEnviron13:25
dimiternfwereade: yeah, that sucks.. any thoughts how to work around it?13:25
fwereadedimitern, maybe just Reset the test suite?13:25
fwereadedimitern, UniterSuite has the same sort of problem13:26
dimiternfwereade: ah, let me try13:26
fwereadedimitern, check what we do there13:26
dimiternfwereade: cool, it worked like charm, 10x :)13:43
fwereadedimitern, sweet13:43
=== wedgwood_away is now known as wedgwood
dimiternfwereade: nice CLs - LGTM on both15:16
fwereadedimitern, tyvm15:16
dimiternfwereade: and I'm ready with the status stuff - would you take a look? https://codereview.appspot.com/813304515:16
fwereadedimitern, soon I hope; thinking hard about something15:16
dimiternfwereade: sure, np. I'll go for a run and a short lunch afterwards15:17
fwereadedimitern, reviewed17:02
fwereadedimitern, not quite an LGTM but just because I want to know what you think about the change I suggest17:02
dimiternfwereade: cheers! I just made a small change to optimize test speed17:02
fwereadedimitern, if you're fine with it and clear about it then I'll LGTM it; let me know what you think17:02
dimiternfwereade: I'm running status --format {yaml,json} concurrently17:02
dimiternfwereade: i'll take a look17:03
dimiternfwereade: this change speeds up the tests about 50% (which is a bit better than they used to be, since changing them slowed them down - state is recreated each time)17:03
fwereadedimitern, excellent17:03
fwereadedimitern, very good idea17:04
dimiternfwereade: sweet! I'll implement your changes and repropose then17:06
dimiternfwereade: thinking about it, if I drop the output from the test case, the concurrency won't be even needed17:50
fwereadedimitern, ah, better still17:51
dimiternfwereade: and I can speed-up and simplify the tests even further by putting basically everything into one case with multiple expects17:51
dimiternfwereade: because the nature of the tests are incremental17:51
fwereadedimitern, I am a little bit suspicious here17:51
dimiternfwereade: but with the added benefit of independence between tests and multiple cases still possible17:52
fwereadedimitern, this sort of thing becomes a real hassle as the incremental chains grow17:52
fwereadedimitern, what's the speed/nastiness tradeoff?17:52
dimiternfwereade: yes, but my point is - you can still have small separate cases, well isolated17:52
dimiternfwereade: and have bigger aggregated cases which built incrementally and expect as they go17:53
fwereadedimitern, I agree that several of those test cases can be profitably combined into incremental ones17:53
dimiternfwereade: well, if most of the cases are incremental the speed will increase, because the state will be setup once17:53
fwereadedimitern, understood17:54
dimiternfwereade: but unlike before, you can easily add independent other cases with the same framework17:54
fwereadedimitern, but faster doesn't beat easier-to-modify, so ideally none of the cases should have more than a few expects17:55
dimiternfwereade: actually concurrency can still be there - but in expect{} only17:55
fwereadedimitern, yeah, that's probably worth it17:55
dimiternfwereade: ok, i'll try both and see how it looks17:55
dimiternfwereade: scratch that, having multiple expect is possible, but you still have a single summary, so it's not good to mix cases like that18:05
fwereadedimitern, comment field for the expects? :)18:05
dimiternfwereade: hmm.. why not18:06
dimiternfwereade: but then the summary is redundant - it'll be in expect only18:08
=== wedgwood is now known as wedgwood_away
fwereadedimitern, that's probably fine, isn't it?18:08
dimiternfwereade: yeah, doesn't look so bad actually18:08
fwereadedimitern, but, well18:08
dimiternfwereade: will propose shortly18:08
fwereadedimitern, if you're gruping them yu probably ought to be able to explain why those tests need to go together18:08
fwereadedimitern, so maybe it's not so redundant :)18:09
dimiternfwereade: ah, good point18:09
dimiternfwereade: sweet! it improved the speed even further: now it's more than 100% better than the old tests (before refactoring)18:33
* fwereade cheers18:34
dimiternfwereade: ah, actually no - they're about as fast as before, just checked - but the added functionality/flexibility is much greater18:40
fwereadedimitern, sounds like a win regardless18:40
fwereadedimitern, they were way nicer even at the first propose18:40
dimiternfwereade: reproposed18:40
dimiternfwereade: oh yeah - a joy to look at, rather than a disgust :)18:41
hazmatanybody can offer insight into this error.. on bootstrap --upload-tools ... error: cannot upload tools: build command "go" failed: exit status 2; # launchpad.net/juju-core/cmd/jujud18:44
hazmatpack: cannot open $WORK/launchpad.net/juju-core/cmd/jujud/_obj/_go_.818:44
hazmati'm using go tip.. and just did a recursive update via go get18:45
dimiternhazmat: can you try going inside cmd/jujud/ and running go install there ?18:47
hazmatdimitern, returns immediately.. juju version returns -> 1.9.13-quantal-i38618:48
hazmatditto for jujud18:48
dimiternhazmat: also, if you switched to go-tip and using the same $GOPATH as with go-1.x it might be the issue - rm -fr $GOPATH/pkg/ and try again18:48
dimiternhazmat: ah, you're on i386?18:48
hazmatdimitern, that's probably it, thanks.. indeed re 32b18:48
fwereadedimitern, I think I see another avenue for niceness, potentially18:49
fwereadedimitern, there are quite a lot of duplicated chunks of data in the tests still18:49
dimiternhazmat: not sure if it'll ever work on i386 for now18:49
hazmati should probably do separate gopaths for go tip vs release18:49
hazmatdimitern, it used to18:49
dimiternhazmat: yeah, that's best18:49
dimiternfwereade: yeah?18:50
dimiternfwereade: in the expected output?18:50
fwereadedimitern, I'm thinking things like var exposedService = M{"exposed":true, "charm": "cs:foo/bar-1"}18:50
dimiternfwereade: the output was the only thing I didn't want to touch, even with duplicated parts, because it helps to see what's there18:51
fwereadedimitern, and var machine0 = M{"dns-name": "dummyenv-0.dns", "instance-id": "dummyenv-0"}18:51
dimiternfwereade: it has to be explicit somewhere18:52
dimiternat least18:52
fwereadedimitern, I *think* there's enough duplication that a list of <10 building blocks will collapse the rest a lot18:52
dimiternfwereade: even if in subsequent cases it's short-circuited18:52
fwereadedimitern, but I'll leave it to your judgment18:53
dimiternfwereade: ok, I'll think about it18:53
dimiternfwereade: otherwise?18:53
fwereadedimitern, otherwise LGTM, I think, just skimming the rest again18:54
fwereadedimitern, sent18:56
dimiternfwereade: cool! tyvm18:56
dimiternfwereade: I think I prefer having the output unchanged first time we're testing a scenario, and use shortcuts afterwards, sane?18:57
fwereadedimitern, I'm fine with that18:57
fwereadedimitern, we can decide next pass18:57
dimiternfwereade: great, I'll do it like that then18:58
dimiternfwereade: looks nicer now I think19:05
dimiternfwereade: which status-related card were you referring to earlier? I can't seem to see it.19:05
=== wedgwood_away is now known as wedgwood
fwereadedimitern, the big red one in core's TODO19:24
dimiternfwereade: right! thanks19:24
fwereadedimitern, np19:25
dimiternfwereade: so what's the idea in bug 112191619:25
_mup_Bug #1121916: status compatibility <cmdline> <juju-core:New> < https://launchpad.net/bugs/1121916 >19:25
dimiternfwereade: changing the machine id to int?19:26
hazmatlatest failure trying to bootstrap with constraints, no image found.. http://pastebin.ubuntu.com/5659178/19:45
hazmatif i already uploaded tools to the bucket, shouldn't it defer to those tools on subsequent bootstraps?19:46
hazmatdimitern, yeah.. that's the core19:47
hazmatperhaps constraints are working yet.. ?19:48
hazmati though they worked for the bootstrap node19:48
hazmathmm.. sans constraints, failed bootstrap it looks because it can't find/setup mongo http://juju-dist.s3.amazonaws.com/tools/mongo-2.2.0-quantal-i386.tgz20:00
hazmat32bit client dictation20:00
dimiternhazmat: exactly, that was my point - there is no mongo 2.2 for i38620:01
hazmatoh.. thats why it can't find the image either.. its client dictating 32bit for tools and cascading to images.. mongo. etc20:01
dimiternhazmat: yeah, it's viral20:02
dimiternhazmat: you could try without --upload-tools20:02
dimiternhazmat: but i'm not sure there are i386 tools in the dist bucket at all20:03
hazmatdimitern, no matching tools version without the --upload20:06
dimiternhazmat: you can probably build mongo from source + ssl and put at the same path in your private bucket from environ20:07
hazmat   dimitern easier to fire up a 64bit vm20:07
hazmatbut thanks for helping debug20:07
dimitern:) sure20:07
fwereadehazmat, sorry about that -- fixing up the tool-finding is in the backlog and I hope we will get there soon21:08
=== wedgwood is now known as wedgwood_away

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