/srv/irclogs.ubuntu.com/2013/05/15/#juju-dev.txt

jamwallyworld: you're running a juju test right now, correct?06:56
wallyworldjam: yes07:04
wallyworldit just finished07:04
jamwallyworld: not a problem, just saw some active images and wanted to double check.07:05
wallyworldjam: i'm checking also - i'm about to kill those since they are left over07:06
wallyworldi've run a lot of live tests today07:06
wallyworldfinally got them passing07:06
jamwallyworld: np, I'm just starting one up myself, but it is a t1.micro for some testing.07:06
jamwallyworld: great to hear that you got them passing.07:06
jamNow, we just need to get them continually passing :)07:06
wallyworldyep :-) plus they take soooooo long07:07
wallyworldso the code/test cycle blew out a bit07:07
wallyworldjam: just to make 100% sure - i've terminated all my mediums and left a micro running07:08
jamsounds good07:08
jamwallyworld: yeah. I understand. I wonder how much of that is required. I guess some of the time is that EC2 takes a bit longer to spin things up?07:09
jammorning dimitern07:09
dimiternmorning all07:09
jamwallyworld: though also the local "live" tests are also quite a bit slower on ec2 because of the automatic S3 consistency retry code.07:10
wallyworldjam: i haven't profiled it but i do think spin up time accounts for a lot, as it seems to run through stuff ok (but a little slow) once the instance is running07:10
wallyworldfwereade: hi there, i'm off to soccer training for a few hours. perhaps while i'm gone you could look at my latest ec2 live test fixes mp. there's one thing i'm not 2100% sure on - i've commented in the cover letter07:21
fwereadewallyworld, will do07:21
wallyworldthanks. talk later07:21
fwereadewallyworld, but I only demand 1800% certainty ;p07:21
wallyworldtypo!07:21
=== rvba` is now known as rvba
dimiternfwereade: so api work is on now, right?08:05
fwereadedimitern, yeah, that's top of the list08:06
fwereadedimitern, is rog around today, do you know?08:06
dimiternfwereade: i'm not aware he's away at least08:07
dimiterngo 1.1 is released now, so I'm switching to it (as we all should)08:07
fwereadedimitern, +108:08
fwereadehey, does the "Title" field in a charm.Option ring any bells with anyone?08:21
rogpeppe2mornin' all08:22
=== rogpeppe2 is now known as rogpeppe
dimiternrogpeppe: morning08:22
dimiternfwereade: what's "change agents to use API connection where available"? how could it be unavailable?08:24
jamdimitern: I believe that means "where there is an API that has been written, make sure agents are using the API rather than direct DB access"08:27
fwereadedimitern, jam, sorry that was unclear08:28
dimiternjam: I see ok08:28
fwereadedimitern, jam: I don't think an API connection *is* generally available though08:28
dimiternfwereade: but it must, eventually08:28
fwereadedimitern, jam: *maybe* we always write sensible API info08:28
fwereadedimitern, yeah, that step is really just "make sure that we always start an API connection"08:29
fwereadedimitern, with a side order of "hmm, what if we're an API server"08:29
dimiternfwereade: ok, it looks like a good candidate for a card08:29
jamfwereade: we do always set APIInfo in the start instance code.08:30
fwereadedimitern, sgtm08:30
dimiternbtw i'm getting test failures in trunk after a fresh rebuild with go1.1 - http://paste.ubuntu.com/5666973/08:30
fwereadejam, ok, cool -- but I'm not sure that all the pieces are actually joined up, just that the environs probably do the right thing does not imply anything about either the input or the agent itself08:31
jamdimitern: it looks like you're getting a panic running Main which obviously means you don't get 'help' and changes the return code.08:31
dimiternjam: i was thinking these tests rely on having jujud binaries - i did go install and running the tests again08:32
dimiternnah, still the same failures08:38
dimiternanyone seen these or should i file a bug?08:38
dimitern(any why does it say $GOPATH not set when it is set?!)08:39
jamdimitern: is the test suite isolating it from us?08:47
dimiternjam: not sure what do you mean - but running  the tests in isolation produces the same errors08:49
rogpeppedimitern: hmm, odd08:50
jamdimitern: I mean that the test suite infrastructure is sanitizing environment variables08:50
jamlike GOPATH08:50
jamthough given the 'build' (?) package, you'd think we'd need it.08:50
rogpeppejam: yes, i'm wondering that08:50
dimiternjam: that's possible but a silly thing to do :)08:50
rogpeppejam: but i don't have a problem, i don't think08:50
rogpeppewill try again08:50
jamit is usually good to sanitize some variables, but GOPATH seems foolish to change.08:51
dimiternthat's go 1.1 specific perhaps?08:51
jamdimitern: I think just tracking into the panic is likely to be fruitful, but if GOPATH is getting unset that looks worrying, too.08:51
dimiternalthough on friday I was running on go1.1rc3 all the tests from a fresh build & checkout w/o any errors08:51
dimiternjam: i'll take a look what got landed since then first08:52
jamdimitern: certainly if they were using normal "Release Candidate" naming, nothing should land but a version bump.08:52
jamotherwise they should have had a new "candidate"08:53
jambut I don't know go core policy08:53
rogpeppejam: yes, i think that's what happened.08:53
rogpeppejam: rc3 became 1.108:53
dimiternjam: no i mean i need to see what changed in juju since friday so it fails now, whereas it wasn't failing with 1.1rc3 on friday08:54
jamah, sure08:55
rogpeppeall jujud tests pass for me against 1.108:56
dimiternrogpeppe: yeah, i also suspect my setup could be somehow wrong: i have ~/go/1.1/ (goroot); ~/work/go/1.1/ (gopath) both set and ~/src/1.1/juju-core (symlink to gopath/src/lp.net/juju-core)08:58
rogpeppedimitern: something looks very odd09:02
rogpeppedimitern: that traceback looks fishy09:02
rogpeppedimitern: have you tried removing $GOPATH/pkg and recompiling?09:03
dimiternrogpeppe: no, i'll try - however everything was clean when I started (created the dirs empty and then rebuilt 1.1 then go get -u lp/juju-core/..., etc)09:05
rogpeppedimitern: what happens if you do "go test -i" in cmd/jujud ?09:05
mgzjam: will have to miss standup today, have appointment in town across it09:06
dimiternrogpeppe: completes in a couple of seconds w/o errors09:06
dimiternrogpeppe: still running the full test suite though09:07
dimiternrogpeppe: still the same failures09:09
rogpeppedimitern: is that the only package that fails?09:10
dimiternrogpeppe: yes09:10
rogpeppedimitern: that's very odd, because lots of other packages import juju-core/testing, and it's an init function in there that's failing09:11
rogpeppedimitern: how about putting a printf in testing/charm.go, in the init function that calls build.Import ?09:12
dimiternrogpeppe: i don't think the problem is not finding testing at all - it some weird way of invoking the commands that screws up the env vars09:12
rogpeppedimitern: print the value of os.Getenv("GOPATH") and perhaps os.Getenv("GOROOT") too09:12
rogpeppedimitern: ah, i see the problem09:15
rogpeppedimitern: hmm, maybe not09:15
dimiternrogpeppe: nothing is printed out with the failures09:16
dimiternfmt.Printf(">>> GOPATH = %s; GOROOT = %s\n", os.Getenv("GOPATH"), os.Getenv("GOROOT"))09:16
dimiternadded that as a first line in init() in testing/charm.go09:16
rogpeppedimitern: what do you see if you add a string to the panic in check. (e.g. panic(fmt.Errorf("check failed: %v", err))) ?09:17
rogpeppedimitern: if you don't see the extra string, there's something odd going on09:17
dimiternrogpeppe: checking09:19
rogpeppedimitern: it might also be worth printing the value of ps.Env in jujud.run09:20
rogpeppedimitern: to make sure it looks sane09:20
dimiternrogpeppe: nothing; i think that's not the check() that gets called - it's in cmd/jujud/_test/jujud.test09:22
rogpeppedimitern: i'm not sure what you mean there09:23
=== ehg_ is now known as ehg
rogpeppedimitern: so you're saying you don't see the extra "check failed" message?09:27
dimiternrogpeppe: just a sec09:27
dimiternrogpeppe: my emacs setup was not finding gofmt and not saving the files :|09:27
rogpeppedimitern: ah, that might explain some things :-)09:28
fwereadejam, responded on https://codereview.appspot.com/9175043/ - let me know if anything's clearly insane ;p09:29
rogpeppeanyone know how i can change which browser gets started by default when i click on a link outside the browser, BTW? since i upgraded to raring, it's always choosing firefox and i want chrome09:30
mgzrogpeppe: should be settable under default applications, see askubuntu google results09:33
rogpeppemgz: i couldn't think of a decent search term09:33
mgzthere are like, four different underlying mechanisms09:33
rogpeppemgz: ah, System->Details!09:35
rogpeppemgz: that's a bloody obscure place to keep it09:35
rogpeppemgz: hmm, my default browser *is* chrome09:35
rogpeppemgz: i guess one of the other mechanisms is kicking in09:36
mgzso, you can also check `update-alternatives --config x-www-browser`, the $BROWSER envvar, and mime types if you get desperate09:38
rogpeppemgz: update-alternatives prints this: http://paste.ubuntu.com/5667132/ (i.e. it looks like chrome is the default, although i don't know what "manual mode" is)09:50
rogpeppemgz: $BROWSER isn't set09:50
rogpeppemgz: i'm not sure how mime types would come into play when clicking a link in my irc browser09:50
jamrogpeppe: is your irc in a browser already? Or perhaps a Mozilla based one?09:51
rogpeppejam: no. i use Konversation09:51
rogpeppejam: and it worked fine before upgrading09:52
jamrogpeppe: http://docs.kde.org/stable/en/extragear-network/konversation/webbrowser.html ?09:52
rogpeppejam: good catch, thanks!09:53
rogpeppejam: yeah, that works09:54
rogpeppejam: i wonder why it changed09:54
jamrogpeppe: did you have to set a new one, or was something already set?09:54
rogpeppejam: "use a custom browser" was unchecked, but the text in grey said "firefox"09:55
rogpeppejam: i looked at that settings panel too - just missed the setting09:55
jamfwereade: so why is a slice + channel for a "self mutexed" variable better than just putting a mutex around the variable?10:37
jamI'm a little confused by your statement that it is good for N goroutines, but then follow it up with "more than one goroutine renders this technique worthless"10:37
fwereadejam, the testing is worthless if you don't know what transaction you'll be trying to run -- but the code itself does in fact have to work in concurrent conditions10:46
fwereadejam, I could plausibly instead switch out a transaction runner at test time, but that felt like an additional layer for not much benefit10:47
fwereadejam, wrt the one-buffered channel it just ...seemed cleaner to me10:48
fwereadejam, lock/change/unlock/lock/change/unlock feels like more work and easier to mess up that pop/push/pop/push10:49
jamfwereade: so I don't quite understand why you need to set it to nil when you aren't sure that you're actually done with the thing, I think that is my big sticking point.10:51
jamespecially setting it to nil, only to pop that back off again once you start actually doing something.10:51
fwereadejam, I need to set it to nil while the hooks are run so that they can themselves run transactions10:51
jamfwereade: what happened to only 1 transaction under test?10:51
fwereadejam, ...that's the point10:52
fwereadejam, there is only one transaction under test10:52
jamfwereade: so you're missing my point, then.10:52
jamyes, you should only test 1 transaction per test case.10:52
fwereadejam, sounds like )10:52
jambut you should be explicit about which one you are testing during the test10:52
jamin case the specific ordering of actual transactions10:52
jamchanges10:52
jamand things suddenly pass/fail for odd reasons.10:52
jam(be explicit so side effects don't confuse you)10:52
jamif multiple transactions are occurring during the test case10:53
fwereadejam, I'm not sure what sort of situation you're describing10:53
jamthen your method only allows you to ever test the "first" transaction hit.10:54
jamif the code ever changes10:54
jamand order of operations (say a new action is done)10:54
jamthen the test breaks which might be hard to reason about why10:54
jamor it doesn't break10:54
fwereadejam, where do we use multiple transactions in a state method (that aren't obviously wrong, and candidates for fixing)?10:54
jambut you stop testing what you thought you were.10:54
jamfwereade: you just said "I need to set it to nil so that they can run transations"10:54
jamis that so the hooks themselves, but not other code.10:55
jamI think I misread that sentence.10:55
fwereadejam, how should I break state for the txn under test *wuthout* running others?10:55
jamI thought it was "so that stuff going on during the transaction can run transations"10:55
jamfwereade: well, since TXN is purely opt-in, you could always break the DB at any time :)10:55
fwereadejam, ah sorry no -- I just mean so that the hooks themselves can run transactions10:55
fwereadejam, not in a useful way, though, I think10:55
jamhowever, that is a moot point, though a potentially interesting tangent.10:56
jamanyway. I'm still generally in favor of getting an error of the form "the transaction you thought you were testing is not the one that is being run" rather than "did not get ErrAborted"10:57
fwereadejam, I did ponder passing ops into the hooks, but I thought that'd probably encourage overly brittle testing10:58
fwereadejam, and I'm not sure what if anything the hook name would tell you -- I'm probably misunderstanding again10:58
jamfwereade: I like having arbitrary callbacks personally. Since you may need to do some inspection/etc rather than just ops on the db10:58
jamfwereade: so the "runTxn" function would become "runTxn(name string, ops []txn.Ops)"10:59
jamand the hooks would get a descriptor of what name they are associated with10:59
jamand you would get a direct error/panic if runTxn was running something that didn't match the name in the hook.10:59
jam(in other systems, I just wouldn't run the hooks, but you mention you want to be clear that only 1 transaction is ever running under test)11:00
fwereadejam, that's more a goal statement than a position statement, but offhand I'm not sure how bad we are there11:01
jamfwereade: anyway, your system is fine (as I'm pretty sure I've stated). I think I'm being a bit overbroad about an idea of having hooks executing before and after transactions, in which case you want to name the thing you are running before or after.11:01
fwereadejam, hmm, I do *kinda* like the idea of naming transactions but I'd prefer to let it marinate a bit11:04
jamfwereade: another small bit is the "one transaction run" rule, which is slightly violated by the design. In that you have a chain of before/after/before/after.11:05
jamAnd in your current method11:05
jamthose "should" be the same transaction being run in a loop11:05
jambecause that is how you are testing it11:05
fwereadejam, same transaction doesn't imply same ops11:06
jamfwereade: sure, but my point is, the design is perfectly amenable to "run txn A, then txn B, then txn C"11:06
jamexcept it doesn't actually track that11:06
jam(as in, you could use the structure you set forth to test a function which ran 3 separate transactions linearly)11:07
jambut if the code underneath changed from A B C to A C B the test infrastructure is all lined up11:07
jambut the assertions all break11:07
jamand it could be helpful if you were informed directly about the precondintions (A B C) being violated.11:07
fwereadejam, my point is that a state method doing A B C is Doing It Wrong11:08
fwereadejam, and that testing 3 state methods in one go is kinda pointless11:08
jamfwereade: in which case, having an assertion that you *aren't* doing A B C seems like a win as well11:08
fwereadejam, not sure how I'd do that...11:09
jamfwereade: as I said before, what you did works, and is better than not having it. I'm happy to have a discussion about ways I think it could  be better.11:09
jamfwereade: if you name the transactions, then the thing that installs the hook names it11:09
jamthen you just check the name matches11:09
fwereadejam, (that's what I think we're doing :))11:09
jamfwereade: right. a couple of your statements made it feel like I was blocking you, which I'm not trying to do.11:10
fwereadejam, ah, sorry, not intended11:10
fwereadejam, I'm just not 100% sure that named transactions really help all that much... but nor am I sure they hurt that much either ;)11:12
fwereadejam, I expect we'll figure out what really work in practice when we try to write tests for the cases I haven't thought of yet ;)11:13
jamfwereade: so. I think my point boils down to, if doing X is "Doing it Wrong" lets try to add bits into the system to make it hard to "Do it Wrong" rather than trusting that we'll catch it in review, etc.11:18
jamwallyworld, dimitern: ping for standup11:30
dimiternjam: just a sec11:31
dimiternrogpeppe: how is the errors package going?11:37
rogpeppedimitern: i'm hoping to write the tests later today - i'm just polishing up my rpc package changes to propose11:37
dimiternrogpeppe: ah ok, can't wait to start using it! :)11:38
rogpeppedimitern: here\'s the doc for the revamped rpc API BTW. feedback appreciated: http://paste.ubuntu.com/5667354/11:39
wallyworldrogpeppe: hey, when you get a spare moment (or are bored), could you take another look at the simplestreams stuff. i think/hope i've covered all the necessary fixes etc.11:58
rogpeppewallyworld: will do11:58
wallyworldthanks. there's now 4 branches to potentially look at :-)11:58
wallyworldi'll land them all at once11:59
rogpeppewallyworld: could you give me links to them in pipeline order, please?11:59
wallyworldrogpeppe:12:00
wallyworldhttps://codereview.appspot.com/9138044/12:00
wallyworldhttps://codereview.appspot.com/9128047/12:00
wallyworldhttps://codereview.appspot.com/9130044/12:00
wallyworldhttps://codereview.appspot.com/9419047/12:00
wallyworldthanks :-)12:00
rogpeppewallyworld: ta12:00
rogpeppefwereade, dimitern, jam: reviews appreciated - i *think* this is a significant improvement. https://codereview.appspot.com/941004312:40
dimiternrogpeppe: looking12:41
=== wedgwood_away is now known as wedgwood
mrammmorning everybody13:49
mgzmorning mramm13:50
mrammfriendly neighborhood reminder: kanban board review in 10 min13:51
dimiternis this the link? https://plus.google.com/hangouts/_/539f4239bf2fd8f454b789d64cd7307166bc908314:01
mrammdimitern: yes14:03
mrammrogpeppe: ^^^^14:03
rogpeppedimitern, fwereade: https://codereview.appspot.com/942604515:36
dimiternrogpeppe: ah cool!15:36
rogpeppedimitern: did you get any further with the rpc review?15:38
dimiternrogpeppe: will be done shortly, sorry got distracted a bit15:39
rogpeppedimitern: np15:39
rogpeppei'm taking a lunch break now. back soon.15:39
rogpeppeback16:15
mgzlate lunch :)16:16
dimiternrogpeppe: 2 reviews done16:37
rogpeppedimitern: thanks!16:37
rogpepperight, that's me for the day17:27
rogpeppeg'night all17:27
mattywQUESTION: I'm a bit confused by the idea of the contrib directory. Are we saying this is where contributers would merge to, and then it would get taken into 'main' when it was deemed ready?18:16
mattywsorry - wrong place :(18:16
=== Makyo is now known as Makyo|out
=== BradCrittenden is now known as bac
=== wedgwood is now known as wedgwood_away

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