[06:56] wallyworld: you're running a juju test right now, correct? [07:04] jam: yes [07:04] it just finished [07:05] wallyworld: not a problem, just saw some active images and wanted to double check. [07:06] jam: i'm checking also - i'm about to kill those since they are left over [07:06] i've run a lot of live tests today [07:06] finally got them passing [07:06] wallyworld: np, I'm just starting one up myself, but it is a t1.micro for some testing. [07:06] wallyworld: great to hear that you got them passing. [07:06] Now, we just need to get them continually passing :) [07:07] yep :-) plus they take soooooo long [07:07] so the code/test cycle blew out a bit [07:08] jam: just to make 100% sure - i've terminated all my mediums and left a micro running [07:08] sounds good [07:09] wallyworld: 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] morning dimitern [07:09] morning all [07:10] wallyworld: though also the local "live" tests are also quite a bit slower on ec2 because of the automatic S3 consistency retry code. [07:10] jam: 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 running [07:21] fwereade: 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 letter [07:21] wallyworld, will do [07:21] thanks. talk later [07:21] wallyworld, but I only demand 1800% certainty ;p [07:21] typo! === rvba` is now known as rvba [08:05] fwereade: so api work is on now, right? [08:06] dimitern, yeah, that's top of the list [08:06] dimitern, is rog around today, do you know? [08:07] fwereade: i'm not aware he's away at least [08:07] go 1.1 is released now, so I'm switching to it (as we all should) [08:08] dimitern, +1 [08:21] hey, does the "Title" field in a charm.Option ring any bells with anyone? [08:22] mornin' all === rogpeppe2 is now known as rogpeppe [08:22] rogpeppe: morning [08:24] fwereade: what's "change agents to use API connection where available"? how could it be unavailable? [08:27] dimitern: 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:28] dimitern, jam, sorry that was unclear [08:28] jam: I see ok [08:28] dimitern, jam: I don't think an API connection *is* generally available though [08:28] fwereade: but it must, eventually [08:28] dimitern, jam: *maybe* we always write sensible API info [08:29] dimitern, yeah, that step is really just "make sure that we always start an API connection" [08:29] dimitern, with a side order of "hmm, what if we're an API server" [08:29] fwereade: ok, it looks like a good candidate for a card [08:30] fwereade: we do always set APIInfo in the start instance code. [08:30] dimitern, sgtm [08:30] btw i'm getting test failures in trunk after a fresh rebuild with go1.1 - http://paste.ubuntu.com/5666973/ [08:31] jam, 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 itself [08:31] dimitern: it looks like you're getting a panic running Main which obviously means you don't get 'help' and changes the return code. [08:32] jam: i was thinking these tests rely on having jujud binaries - i did go install and running the tests again [08:38] nah, still the same failures [08:38] anyone seen these or should i file a bug? [08:39] (any why does it say $GOPATH not set when it is set?!) [08:47] dimitern: is the test suite isolating it from us? [08:49] jam: not sure what do you mean - but running the tests in isolation produces the same errors [08:50] dimitern: hmm, odd [08:50] dimitern: I mean that the test suite infrastructure is sanitizing environment variables [08:50] like GOPATH [08:50] though given the 'build' (?) package, you'd think we'd need it. [08:50] jam: yes, i'm wondering that [08:50] jam: that's possible but a silly thing to do :) [08:50] jam: but i don't have a problem, i don't think [08:50] will try again [08:51] it is usually good to sanitize some variables, but GOPATH seems foolish to change. [08:51] that's go 1.1 specific perhaps? [08:51] dimitern: I think just tracking into the panic is likely to be fruitful, but if GOPATH is getting unset that looks worrying, too. [08:51] although on friday I was running on go1.1rc3 all the tests from a fresh build & checkout w/o any errors [08:52] jam: i'll take a look what got landed since then first [08:52] dimitern: certainly if they were using normal "Release Candidate" naming, nothing should land but a version bump. [08:53] otherwise they should have had a new "candidate" [08:53] but I don't know go core policy [08:53] jam: yes, i think that's what happened. [08:53] jam: rc3 became 1.1 [08:54] jam: 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 friday [08:55] ah, sure [08:56] all jujud tests pass for me against 1.1 [08:58] rogpeppe: 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) [09:02] dimitern: something looks very odd [09:02] dimitern: that traceback looks fishy [09:03] dimitern: have you tried removing $GOPATH/pkg and recompiling? [09:05] rogpeppe: 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] dimitern: what happens if you do "go test -i" in cmd/jujud ? [09:06] jam: will have to miss standup today, have appointment in town across it [09:06] rogpeppe: completes in a couple of seconds w/o errors [09:07] rogpeppe: still running the full test suite though [09:09] rogpeppe: still the same failures [09:10] dimitern: is that the only package that fails? [09:10] rogpeppe: yes [09:11] dimitern: that's very odd, because lots of other packages import juju-core/testing, and it's an init function in there that's failing [09:12] dimitern: how about putting a printf in testing/charm.go, in the init function that calls build.Import ? [09:12] rogpeppe: 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 vars [09:12] dimitern: print the value of os.Getenv("GOPATH") and perhaps os.Getenv("GOROOT") too [09:15] dimitern: ah, i see the problem [09:15] dimitern: hmm, maybe not [09:16] rogpeppe: nothing is printed out with the failures [09:16] fmt.Printf(">>> GOPATH = %s; GOROOT = %s\n", os.Getenv("GOPATH"), os.Getenv("GOROOT")) [09:16] added that as a first line in init() in testing/charm.go [09:17] dimitern: 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] dimitern: if you don't see the extra string, there's something odd going on [09:19] rogpeppe: checking [09:20] dimitern: it might also be worth printing the value of ps.Env in jujud.run [09:20] dimitern: to make sure it looks sane [09:22] rogpeppe: nothing; i think that's not the check() that gets called - it's in cmd/jujud/_test/jujud.test [09:23] dimitern: i'm not sure what you mean there === ehg_ is now known as ehg [09:27] dimitern: so you're saying you don't see the extra "check failed" message? [09:27] rogpeppe: just a sec [09:27] rogpeppe: my emacs setup was not finding gofmt and not saving the files :| [09:28] dimitern: ah, that might explain some things :-) [09:29] jam, responded on https://codereview.appspot.com/9175043/ - let me know if anything's clearly insane ;p [09:30] anyone 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 chrome [09:33] rogpeppe: should be settable under default applications, see askubuntu google results [09:33] mgz: i couldn't think of a decent search term [09:33] there are like, four different underlying mechanisms [09:35] mgz: ah, System->Details! [09:35] mgz: that's a bloody obscure place to keep it [09:35] mgz: hmm, my default browser *is* chrome [09:36] mgz: i guess one of the other mechanisms is kicking in [09:38] so, you can also check `update-alternatives --config x-www-browser`, the $BROWSER envvar, and mime types if you get desperate [09:50] mgz: 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] mgz: $BROWSER isn't set [09:50] mgz: i'm not sure how mime types would come into play when clicking a link in my irc browser [09:51] rogpeppe: is your irc in a browser already? Or perhaps a Mozilla based one? [09:51] jam: no. i use Konversation [09:52] jam: and it worked fine before upgrading [09:52] rogpeppe: http://docs.kde.org/stable/en/extragear-network/konversation/webbrowser.html ? [09:53] jam: good catch, thanks! [09:54] jam: yeah, that works [09:54] jam: i wonder why it changed [09:54] rogpeppe: did you have to set a new one, or was something already set? [09:55] jam: "use a custom browser" was unchecked, but the text in grey said "firefox" [09:55] jam: i looked at that settings panel too - just missed the setting [10:37] fwereade: so why is a slice + channel for a "self mutexed" variable better than just putting a mutex around the variable? [10:37] I'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:46] jam, 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 conditions [10:47] jam, I could plausibly instead switch out a transaction runner at test time, but that felt like an additional layer for not much benefit [10:48] jam, wrt the one-buffered channel it just ...seemed cleaner to me [10:49] jam, lock/change/unlock/lock/change/unlock feels like more work and easier to mess up that pop/push/pop/push [10:51] fwereade: 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] especially setting it to nil, only to pop that back off again once you start actually doing something. [10:51] jam, I need to set it to nil while the hooks are run so that they can themselves run transactions [10:51] fwereade: what happened to only 1 transaction under test? [10:52] jam, ...that's the point [10:52] jam, there is only one transaction under test [10:52] fwereade: so you're missing my point, then. [10:52] yes, you should only test 1 transaction per test case. [10:52] jam, sounds like ) [10:52] but you should be explicit about which one you are testing during the test [10:52] in case the specific ordering of actual transactions [10:52] changes [10:52] and things suddenly pass/fail for odd reasons. [10:52] (be explicit so side effects don't confuse you) [10:53] if multiple transactions are occurring during the test case [10:53] jam, I'm not sure what sort of situation you're describing [10:54] then your method only allows you to ever test the "first" transaction hit. [10:54] if the code ever changes [10:54] and order of operations (say a new action is done) [10:54] then the test breaks which might be hard to reason about why [10:54] or it doesn't break [10:54] jam, where do we use multiple transactions in a state method (that aren't obviously wrong, and candidates for fixing)? [10:54] but you stop testing what you thought you were. [10:54] fwereade: you just said "I need to set it to nil so that they can run transations" [10:55] is that so the hooks themselves, but not other code. [10:55] I think I misread that sentence. [10:55] jam, how should I break state for the txn under test *wuthout* running others? [10:55] I thought it was "so that stuff going on during the transaction can run transations" [10:55] fwereade: well, since TXN is purely opt-in, you could always break the DB at any time :) [10:55] jam, ah sorry no -- I just mean so that the hooks themselves can run transactions [10:55] jam, not in a useful way, though, I think [10:56] however, that is a moot point, though a potentially interesting tangent. [10:57] anyway. 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:58] jam, I did ponder passing ops into the hooks, but I thought that'd probably encourage overly brittle testing [10:58] jam, and I'm not sure what if anything the hook name would tell you -- I'm probably misunderstanding again [10:58] fwereade: I like having arbitrary callbacks personally. Since you may need to do some inspection/etc rather than just ops on the db [10:59] fwereade: so the "runTxn" function would become "runTxn(name string, ops []txn.Ops)" [10:59] and the hooks would get a descriptor of what name they are associated with [10:59] and you would get a direct error/panic if runTxn was running something that didn't match the name in the hook. [11:00] (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:01] jam, that's more a goal statement than a position statement, but offhand I'm not sure how bad we are there [11:01] fwereade: 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:04] jam, hmm, I do *kinda* like the idea of naming transactions but I'd prefer to let it marinate a bit [11:05] fwereade: 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] And in your current method [11:05] those "should" be the same transaction being run in a loop [11:05] because that is how you are testing it [11:06] jam, same transaction doesn't imply same ops [11:06] fwereade: sure, but my point is, the design is perfectly amenable to "run txn A, then txn B, then txn C" [11:06] except it doesn't actually track that [11:07] (as in, you could use the structure you set forth to test a function which ran 3 separate transactions linearly) [11:07] but if the code underneath changed from A B C to A C B the test infrastructure is all lined up [11:07] but the assertions all break [11:07] and it could be helpful if you were informed directly about the precondintions (A B C) being violated. [11:08] jam, my point is that a state method doing A B C is Doing It Wrong [11:08] jam, and that testing 3 state methods in one go is kinda pointless [11:08] fwereade: in which case, having an assertion that you *aren't* doing A B C seems like a win as well [11:09] jam, not sure how I'd do that... [11:09] fwereade: 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] fwereade: if you name the transactions, then the thing that installs the hook names it [11:09] then you just check the name matches [11:09] jam, (that's what I think we're doing :)) [11:10] fwereade: right. a couple of your statements made it feel like I was blocking you, which I'm not trying to do. [11:10] jam, ah, sorry, not intended [11:12] jam, 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:13] jam, 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:18] fwereade: 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:30] wallyworld, dimitern: ping for standup [11:31] jam: just a sec [11:37] rogpeppe: how is the errors package going? [11:37] dimitern: i'm hoping to write the tests later today - i'm just polishing up my rpc package changes to propose [11:38] rogpeppe: ah ok, can't wait to start using it! :) [11:39] dimitern: here\'s the doc for the revamped rpc API BTW. feedback appreciated: http://paste.ubuntu.com/5667354/ [11:58] rogpeppe: 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] wallyworld: will do [11:58] thanks. there's now 4 branches to potentially look at :-) [11:59] i'll land them all at once [11:59] wallyworld: could you give me links to them in pipeline order, please? [12:00] rogpeppe: [12:00] https://codereview.appspot.com/9138044/ [12:00] https://codereview.appspot.com/9128047/ [12:00] https://codereview.appspot.com/9130044/ [12:00] https://codereview.appspot.com/9419047/ [12:00] thanks :-) [12:00] wallyworld: ta [12:40] fwereade, dimitern, jam: reviews appreciated - i *think* this is a significant improvement. https://codereview.appspot.com/9410043 [12:41] rogpeppe: looking === wedgwood_away is now known as wedgwood [13:49] morning everybody [13:50] morning mramm [13:51] friendly neighborhood reminder: kanban board review in 10 min [14:01] is this the link? https://plus.google.com/hangouts/_/539f4239bf2fd8f454b789d64cd7307166bc9083 [14:03] dimitern: yes [14:03] rogpeppe: ^^^^ [15:36] dimitern, fwereade: https://codereview.appspot.com/9426045 [15:36] rogpeppe: ah cool! [15:38] dimitern: did you get any further with the rpc review? [15:39] rogpeppe: will be done shortly, sorry got distracted a bit [15:39] dimitern: np [15:39] i'm taking a lunch break now. back soon. [16:15] back [16:16] late lunch :) [16:37] rogpeppe: 2 reviews done [16:37] dimitern: thanks! [17:27] right, that's me for the day [17:27] g'night all [18:16] QUESTION: 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] sorry - wrong place :( === Makyo is now known as Makyo|out === BradCrittenden is now known as bac === wedgwood is now known as wedgwood_away