[09:28] <frankban> morning rogpeppe1: would you like to take another look at https://codereview.appspot.com/7947043/ ? Updated as suggested by William.
[09:29] <rogpeppe1> frankban: will do
[09:29] <frankban> thanks
[11:26] <teknico> rogpeppe, hi, remember those test errors of mine on Friday on quantal? they're still happening, any news? http://pastebin.ubuntu.com/5637181/
[11:27] <rogpeppe> teknico: i'll fix the problem, one mo.
[11:27] <teknico> rogpeppe, thanks
[12:45] <rick_h_> :w
[12:46] <benji> :w Plan-to-get-rick_h_-to-remember-which-window-has-focus.txt
[12:47] <rick_h_> heh, sometimes a typo in a tiling WM command can get you wrong focus for sure :)
[12:58] <benji> :)
[13:16] <gary_poster> he bcsaller, I'm saying that waiting more than two minutes after juju-destroy-environment on canonistack is too long, and we will use euca-terminate-instances then.  Does that seems like a good time limit, or should I increase or decrease?
[13:16] <bcsaller> gary_poster: two minutes should be enough
[13:17] <gary_poster> cool thanks
[13:22] <bac> frankban: your face is on the 'charm info' card.  will you be starting it soon?  how long do you think it'll take?  i ask because my get_endpoints work depends upon it.
[13:23] <frankban> bac: feel free to work on that, deleting my face, if you want. Otherwise I'll start that card later today.
[13:25] <bac> gary_poster, benji: either of you have time for a pre-imp call?
[13:25] <gary_poster> bac, happy to, or benji either way
[13:25] <benji> bac: I'm afraid I don't at the moment (neck deep in this quagmire
[13:25] <benji> )
[13:25] <bac> gary_poster: ok, five minutes?
[13:26] <gary_poster> bac, cool, ping when ready
[13:46] <hatch> morning
[13:48] <rick_h_> morning
[13:58] <Makyo> Coffee.
[13:58] <bac> gary_poster: you disappeared
[14:00] <benji> I can not for the life of me get rid of the "Your certificate contains the same serial number as another certificate issued by the certificate authority." error when trying to connect to juju.
[14:02] <benji> oh, oh!  I got it.
[14:02] <benji> debugging by public complaining; good stuff
[14:02] <rick_h_> best kind, especially when we don't have to know anything to say we helped
[14:03] <hatch> haha that happens to me so often
[14:03] <hatch> I'm really hoping that helps with a d3 bug i'm trying to track down
[14:04] <hatch> haven't quite reached the point of raging yet though
[14:28] <hatch> guichat in 2m?
[14:28] <rick_h_> gary_poster: going to miss today
[14:29] <gary_poster> ack rick_h_ 
[14:29] <hatch> we'll miss you
[14:29] <gary_poster> jujugui call in 1
[14:29] <rick_h_> hatch: hah, some days have to kill the calls down :P
[14:29] <hatch> haha
[14:30] <gary_poster> goodspud, starting without you
[14:44] <bac> goodspud: are they saving money but cutting the heat in bluefin?
[14:45] <hatch> lol I was thinking the same
[14:48] <goodspud> bac, London has got very cold and where Luca and I sit is directly under an air vent
[14:48] <goodspud> They also beat us
[14:48] <bac> goodspud: well, stay warm
[14:49] <gary_poster> goodspud, lol
[14:51] <goodspud> gary_poster, could you please invite luca to the daily call meeting
[14:51] <goodspud> And the end of week "State of the Nation"
[14:51] <gary_poster> ack goodspud, and will get him on kanban
[14:52] <gary_poster> kanban may need to wait till next week
[14:52] <hatch> gary_poster: I'm going to clean up this branch and then push what I have and create a ticket for the last remaining bug and then I can help you out
[14:52] <gary_poster> coo, thank you hatch
[14:54] <benji> uh oh, gary_poster is turning into a dove
[14:54] <gary_poster> :-)
[14:56] <gary_poster> I was going more for the fake cockney that whatzizname used in the Mary Poppins film.
[14:57] <gary_poster> Dick van Dyke
[15:03] <teknico> rogpeppe, any idea what might cause this error in tests? "cannot add relation \"wordpress:db mysql:server\": service \"wordpress\" is not alive"
[15:03] <rogpeppe> teknico: which test failed?
[15:04] <teknico> rogpeppe, opClientAddRelation, that I'm adding to state/apiserver/api_test.go
[15:05] <rogpeppe> teknico: i'm almost certain that it's because some operation isn't correctly returning an undo function
[15:05] <teknico> rogpeppe, I'm trying to add the reset() function you commented upon
[15:05] <teknico> I tried a number of variations, but I always end up with some error
[15:05] <rogpeppe> teknico: are you seeing this error in trunk?
[15:06] <teknico> rogpeppe, nope, it's unrelated to those other quantal errors
[15:06] <teknico> (or so I guess)
[15:06] <rogpeppe> teknico: ok. can you paste your version of api_test.go 
[15:06] <rogpeppe> ?
[15:06] <teknico> sure
[15:07] <teknico> rogpeppe, http://pastebin.ubuntu.com/5646585/
[15:07] <teknico> (will someone please add Go syntax highlighting to the pastebin? thanks ;-) )
[15:08]  * rogpeppe doesn't like syntax highlighting :-)
[15:08] <hatch> no syntax highlighting?
[15:08] <hatch> I didn't think people like you existed :P
[15:09] <rogpeppe> hatch: i don't need pictures in my books either :-)
[15:09] <hatch> rofl
[15:09] <rogpeppe> teknico: you can delete line 284, but that's irrelevant to this
[15:10] <teknico> right
[15:16] <rogpeppe> teknico: do you get an error from the Refresh, out of interest?
[15:16] <rogpeppe> teknico: i think if it had actually been destroyed then you would
[15:17] <teknico> rogpeppe, nope, here are the errors I get:
[15:17] <teknico> rogpeppe, http://pastebin.ubuntu.com/5646615/
[15:18] <rogpeppe> teknico: ha! i've found the culprit
[15:19] <rogpeppe> teknico: opClientServiceDestroy is bogus
[15:19] <teknico> rogpeppe, the culprit that caused the cul-de-sac? ;-)
[15:19] <teknico> oh, how so?
[15:19] <rogpeppe> teknico: yeah. basically, look down the set of opClient functions, and anyhing that makes a change and doesn't return an undo function is bogus
[15:19] <rogpeppe> teknico: so current candidates:
[15:19] <rogpeppe> teknico: opClientServiceDestroy
[15:20] <teknico> ah, right
[15:20] <rogpeppe> teknico: opClientSetServiceConstraints
[15:20] <rogpeppe> teknico: opClientAddServiceUnits
[15:20] <rogpeppe> teknico: opClientResolved
[15:20] <rogpeppe> teknico: actually, the last is ook
[15:21] <rogpeppe> teknico: opClientServiceExpose
[15:21] <rogpeppe> teknico: opClientDestroyRelation
[15:22] <teknico> that one's bac's :-)
[15:22] <rogpeppe> teknico: i know it's a pain, but we need to fix all those
[15:22] <teknico> for some def of "we" ;-)
[15:22] <rogpeppe> teknico: it's my fault really - i should have been keeping a closer eye on the CLs :-)
[15:23] <teknico> rogpeppe, btw, what does "CL" mean? :-)
[15:23] <bac> s/CL/MP
[15:23] <rogpeppe> teknico: "change list"
[15:23] <rogpeppe> teknico: sorry, it's terminology from another project
[15:23] <teknico> bac, yeah, I reckoned that, was wondering about the definition
[15:23] <teknico> rogpeppe, thanks
[15:24] <bac> teknico: while you're there, perhaps you could fix my booboo.
[15:24] <teknico> rogpeppe, so how do we proceed? do I get to keep the pieces that I didn't break? :-)
[15:25] <teknico> bac, ehi wait, don't give rogpeppe unhealthy hints! ;-)
[15:25] <rogpeppe> lol
[15:25] <rogpeppe> teknico, bac: how about you divide it up between you?
[15:26] <teknico> (bac, btw I was trying to do just that before Pandora's time)
[15:26] <rogpeppe> it should be fairly straightforward.
[15:27] <teknico> rogpeppe, ok, I'll try to fix them since I'm already on it
[15:27] <rogpeppe> teknico: given that tests don't currently break in trunk, i'd accept a version of DestroyRelation that did the undo correctly.
[15:27] <rogpeppe> teknico: i'd prefer a separate branch that fixes the current issues, if that's ok
[15:27] <teknico> rogpeppe, but it won't likely be *that* straightforward, so expect to be interrupted again :-)
[15:28] <teknico> rogpeppe, sure, I'll invoke the magic of pipelines :-)
[15:28] <rogpeppe> teknico: yeah. i still think these tests aren't worth it, but there we go
[15:28] <rogpeppe> teknico: i don't think you need a pipeline actually
[15:28] <rogpeppe> teknico: i think all the changes are independent
[15:29] <teknico> rogpeppe, in that case let's have fwereade fix them! ;-)
[15:30] <rogpeppe> teknico: :-)
[15:30] <rogpeppe> teknico: what series are you running?
[15:31] <rogpeppe> teknico: you're still seeing environs/ec2 tests fail in trunk, right?
[15:31] <teknico> rogpeppe, eenvironments.yaml sez: default-series: precise
[15:31] <teknico> rogpeppe, yes, I am
[15:32] <teknico> or ar least I was this morning
[15:32] <rogpeppe> teknico: sorry, what does your /etc/issue show?
[15:32] <hatch> app/views/topology/service.js:106 "render" undocumented but not listed as such
[15:32] <hatch> anyone know what's up with that error?
[15:32] <hatch> It IS documented
[15:33] <rogpeppe> teknico: or /etc/lsb-release
[15:33] <teknico> rogpeppe, Ubuntu 12.10
[15:33] <teknico> lsb-release agrees
[15:34] <rogpeppe> teknico: and uname -a prints... ?
[15:34] <teknico> Linux brightouch 3.8.4-030804-generic #201303201832 SMP Wed Mar 20 22:40:47 UTC 2013 i686 i686 i686 GNU/Linux
[15:34] <hatch> oops I forgot a * in the comment block :)
[15:35] <teknico> rogpeppe, raring kernel, seems to work anyway :-)
[15:35] <rogpeppe> teknico: you're running a raring kernel against a precise image?
[15:36] <teknico> rogpeppe, I'm running a raring kernel on a quantal host, what do you mean "against a precise image"?
[15:36] <rogpeppe> teknico: sorry, i meant quantal image.
[15:36] <rogpeppe> teknico: image == host in this case
[15:37] <teknico> rogpeppe, yep, I have graphics issues with stock 3.5
[15:46] <hatch> bcsaller: I'll review yours if you review mine: https://codereview.appspot.com/7815047 :P
[15:46] <bcsaller> hatch: I'll take a look 
[15:47] <bcsaller> hatch: I don't have the proper means to verify this but I'll review the code
[15:47] <hatch> yeah that's fine - nobody does lol
[15:47] <hatch> just have to take my word for it I guess :P
[15:48] <gary_poster> rick has a 7
[15:48] <hatch> well I suppose you could make sure it works on the desktop still
[15:48] <hatch> oh he does? cool
[15:48] <hatch> rick_h_ you aruond?
[15:48] <gary_poster> still works on desktop: that would be nice :-)
[15:48] <rick_h_> hatch: yep, what's up?
[15:48] <hatch> would you be able to QA/review my branch that I linked above
[15:48] <rick_h_> sorry, reading back log? Need N7 / N10 QA?
[15:48] <hatch> yes please :)
[15:49] <rick_h_> hatch: yea, I've got a call in a few min. I'll get to it in a few
[15:49] <hatch> yeah no problem no rush
[16:04] <rick_h_> goodspud: ping for call
[16:04] <luca__> rick_h_: Hi, goodspud is just restarting his machine, it chrashed
[16:04] <rick_h_> luca__: ah thanks
[16:08] <rick_h_> luca__: so I don't see a hangout in the calendar for this. 
[16:08] <luca__> rick_h_: I think he just sent it to you
[16:27] <hatch> rick_h_ hold off on the qa for a little bit, I'm just refactoring some code
[16:27] <rick_h_> hatch: rgr
[16:35] <hatch> bcsaller: what handles the removal of the element from the DOM when the service is destroyed?
[16:35] <hatch> I don't see anything explicitly removing it...
[16:35] <hatch> so I'm assuming it's a side effect?
[16:36] <bcsaller> hatch: there is an exit() section, it will call exit().remove() which says for the selection of elements not in the working set of data, remove them from the DOM
[16:37] <bcsaller> explicit but you have to understand how data binding works in D3
[16:37] <hatch> yup found it thanks
[16:37] <hatch> is the remove() method a YUI method or d3?
[16:38] <hatch> I"m going to guess d3
[16:41] <bcsaller> d3
[16:42] <bcsaller> exit is a d3 selection and remove is an action applied to the selection
[16:43] <hatch> yeah I now have the d3 api open :)
[16:44] <bcsaller> hatch: if you haven't looked at it yet it is pretty awesome, very powerful abstractions 
[16:44] <hatch> yeah it's missing a few convenience methods that I am taking for granted with YUI ;)
[16:52] <rogpeppe> teknico: did you file a bug for the quantal tests failing issue?
[16:52] <rogpeppe> teknico: (i'm just proposing a fix and would like to link it to the bug)
[16:52] <teknico> rogpeppe, no, I didn't
[16:52] <rogpeppe> teknico: ok, pn
[16:52] <rogpeppe> np
[16:52] <teknico> rogpeppe, thanks for the fix :-)
[16:55] <teknico> rogpeppe, what's the easiest way to get the last unit that was added to a service (in order to destroy it)?
[16:55] <rogpeppe> teknico: AddUnit returns the last unit that's been added
[16:55] <rogpeppe> teknico: ah... but you don't know that!
[16:55] <rogpeppe> teknico: hmm.
[16:56] <teknico> rogpeppe, yep, but the api client does not, unfortunately
[16:56] <rogpeppe> teknico: yeah exactly
[16:56] <rogpeppe> teknico: i think for these purposes it's ok to assume that the unit numbers increase sequentially.
[16:57] <rogpeppe> teknico: ah, that might not work either
[16:57] <teknico> something like state.Unit("wordpress/2")?
[16:57] <rogpeppe> teknico: yeah, but you'll be adding (and removing) quite a few units, so the number will keep on rising
[16:58] <teknico> or svc.AllUnits[-1] (does Go have that nice Python tidbit anyway?  :-) )
[16:58] <rogpeppe> teknico: no
[16:58] <rogpeppe> teknico: (it has unfortunate edge cases)
[16:59] <rogpeppe> teknico: i think you'll have to use AllUnits. or, i guess you could make the API return the units that have been added.
[17:00] <teknico> rogpeppe, I'd actually like it if all the API calls returned stuff, but that's a change for another branch
[17:00] <teknico> rogpeppe, what would the AllUnits syntax be then?
[17:05] <rogpeppe> teknico: something like this, perhaps: http://paste.ubuntu.com/5646916/
[17:06] <rogpeppe> teknico: actually http://paste.ubuntu.com/5646923/
[17:07] <teknico> rogpeppe, oh wow :-) thanks
[17:07] <teknico> rogpeppe, while we're at it, there seems to be no explicit way to remove service constraints
[17:07] <Makyo> Where was that python script that we've been using to test the juju websocket implementation?
[17:07] <teknico> rogpeppe, can I just SetConstraints(nil) ?
[17:08] <rogpeppe> teknico: yeah, i think you should be able to do SetConstraints(state.Constraints{})
[17:08] <gary_poster> benji, ^^ Makyo?  If not around I can probably find
[17:08] <rogpeppe> teknico: the zero constraints struct is the original default, i think
[17:08] <teknico> rogpeppe, great
[17:10] <teknico> Makyo, check the "Interactive Testing" section of https://docs.google.com/a/canonical.com/document/d/1n8rhYuj7YvTcz_HdKV1tLVj9cfSbkHTCzks1_9BZEdI/edit
[17:12] <Makyo> teknico, gary_poster benji - Cool, thanks!
[17:12] <gary_poster> :-)
[17:12] <gary_poster> thank teknico 
[17:13] <gary_poster> that was supposed to be "thanks"
[17:13] <teknico> thank benji ;-)
[17:13] <gary_poster> we're all so thankful
[17:13] <hatch> if I'm going to be doing more of this testing I think I'm going to need one of these.... https://play.google.com/store/devices/details/Nexus_7_Dock?id=nexus_7_dock&feature=accessories
[17:14] <hatch> of course it's out of stock...lol
[17:15] <gary_poster> it looks like someone broke IE, which is annoying :-/ doublechecking
[17:17] <hatch> gary_poster: watch the video - sometimes it passes with 100% but the CI still says it failed
[17:18] <hatch> I think bcsaller said this was something to do with the login screen?
[17:18] <gary_poster> hatch, no, lots of failures
[17:18] <hatch> oh...ok :)
[17:19] <bcsaller> gary_poster: I'll run trunk through IE locally and see what I get
[17:19] <gary_poster> me too thanks
[17:21]  * hatch is fighting with null
[17:22]  * hatch creates a ticket for Friday to ban null from our code ;)
[17:22] <teknico> rogpeppe, in latestUnit you use st.Unit , so I suppose I need to pass state as an arg too, right?
[17:23] <rogpeppe> teknico: yeaj
[17:23] <rogpeppe> h
[17:25] <gary_poster> bcsaller is there a way to step through the video?
[17:25] <gary_poster> that you know of
[17:25] <bcsaller> gary_poster: no, I've always had to pause/unpause it 
[17:25] <gary_poster> meh, k thanks bcsaller 
[17:26] <bcsaller> gary_poster: So I initially had an issue with IE, but after clearing the browser cache its at 100%. This isn't the first time I've seen this issue (particularly with IE)
[17:27] <bcsaller> gary_poster: what doesn't make sense is that for this to the be issue (and the video seems to show the same problem) they'd have to be caching in their VM between runs
[17:27] <gary_poster> bcsaller locally I had tests mostly pass, with one intermittent failure of "notifier widget: should destroy notifications after N milliseconds: expected 0 to equal 1"
[17:27] <gary_poster> which is nothing like video yeah
[17:28] <hatch> ohhh that stupid caching issue again
[17:28] <hatch> gary_poster:  I sent a message to them about that and never received a response
[17:29] <hatch> I could followup if needed - the issue appeared to resolve itself however
[17:29] <gary_poster> so maybe just try again?
[17:30] <gary_poster> there's no selenium api to clear cache apparently.  thought that was worth a try :-)
[17:30] <hatch> well they claim they are new VM's
[17:30] <hatch> so there should be no cache
[17:30] <gary_poster> yeah. :-/
[17:30] <hatch> so it must be something infront of it
[17:30] <gary_poster> proxy cache
[17:30] <gary_poster> yeah
[17:30] <hatch> yeah
[17:31] <bcsaller> gary_poster: http://flowplayer.org/docs/#keyboard-shortcuts
[17:31] <gary_poster> cool, thanks bcsaller!
[17:32] <bcsaller> gary_poster: maybe we should generate the yui-all link with javascript to include ?ts=<timestamp> or something that will break caching
[17:33] <bcsaller> https://saucelabs.com/tests/e418a834eb804e6595b1354251fbd341# @ 1:12 or so, seeing that login issue again. I hadn't figured out why that was happening yet because going there (to the public IP) with a browser doesn't ask for login
[17:34] <teknico> rogpeppe, setupScenario creates services with calls like this one: AddService("wordpress", s.AddTestingCharm(c, "wordpress"))
[17:34] <gary_poster> bcsaller, worth a try.  would be testing only though...will think about it.  looking at that last failure now (looks like something logged us out...)
[17:34] <rogpeppe> teknico: go on
[17:34] <teknico> rogpeppe, however, I cannot use it inside an op* function, because while in there I have no access to s, which is the suite
[17:34] <rogpeppe> teknico: hmm
[17:34] <teknico> or have I? :-)
[17:35] <rogpeppe> teknico: no, i think you're probably right
[17:35] <rogpeppe> teknico: what are you trying to do?
[17:36] <teknico> rogpeppe, I'm trying to recreat a service in the reset function of opClientServiceDestroy
[17:36] <teknico> *recreate
[17:36] <rogpeppe>  teknico: if you're just trying to add a service, you don't need AddTestingCharm
[17:36] <rogpeppe> teknico: because various charms have already been added.
[17:37] <rogpeppe> teknico: so you can get the charm with st.Charm(charmURL) i think
[17:37] <teknico> rogpeppe, where charmURL is just "wordpress"?
[17:38] <rogpeppe> teknico: hmm, not quite
[17:39] <gary_poster> bcsaller, the loging issue can happen if you explicitly log out; or if the html 5 storage we use stashes/returns bad values I suppose
[17:39] <gary_poster> logging
[17:39] <gary_poster> we are not logging out, of course
[17:39] <rogpeppe> tekniko: you can use local:series/wordpress-3
[17:40] <rogpeppe> teknico: which seems a bit dodgy (the "3" comes from the file testing/repo/series/wordpress/revision
[17:40] <rogpeppe> )
[17:40] <rogpeppe> teknico: i wonder if we might be better just providing access to the suite in the op* functions.
[17:41] <bcsaller> gary_poster: its also possible we have to add a flag to desired capabilities before HTML5 storage is enabled. Normally we'd have to click yes to allow the permission I think so it might not be on w/o that flag
[17:41] <bcsaller> though it does work sometimes....
[17:41] <bcsaller> so maybe not
[17:41] <gary_poster> yeah :-/
[17:43] <teknico> rogpeppe, I can't seem to find the Constraints{} definition anywhere...
[17:44] <rogpeppe> teknico: you actually want constraints.Value{}
[17:44] <rogpeppe> teknico: sorry for the red herring
[17:44] <teknico> rogpeppe, no worries, I like herrings, and am not racist anyway ;-)
[17:45] <rogpeppe> teknico: :-)
[17:47] <rogpeppe> teknico: another possibility is to make AddTestingCharm into a function, rather than a method (well, it would probably remain a method too, so we don't have to change everywhere)
[17:47] <rogpeppe> teknico: ah, but that wouldn't work actually
[17:50] <rogpeppe> teknico: another possibility is to provide a context struct to the op functions rather than the state. type opContext struct {st *state.State; wordpressCharm *state.Charm}
[17:51] <rogpeppe> teknico: then it can become a grab-bag for any stuff we find we need to pass to these functions.
[17:52] <teknico> rogpeppe, what you say if we go with the fragile charm url now and refactor later?
[17:52] <rogpeppe> teknico: sounds reasonable. could you add a TODO, please.
[17:52] <teknico> rogpeppe, sure
[17:52] <teknico> rogpeppe, I still have errors that I'm not clear on: http://pastebin.ubuntu.com/5647056/
[17:53] <rogpeppe> teknico: sounds like you're using constraints as a variable name and you're importing the package
[17:54] <teknico> rogpeppe, oh, indeed, it's what the opClientSetServiceConstraints does already :-P
[17:55] <teknico> rogpeppe, wow, it sets the null constraints already, so the reset function would not change anything :-)
[17:56] <rogpeppe> teknico: ah, cool!
[17:57] <teknico> and I think I know what the first error means
[18:03] <teknico> rogpeppe, ok, it compiles and runs. How do I wait for service destruction? I need to call Refresh on something, right?
[18:04] <rogpeppe> teknico: i don't think you need to wait
[18:05] <teknico> rogpeppe, and yet I get this: http://pastebin.ubuntu.com/5647091/
[18:06] <teknico> the reset() tries to recreate the service supposedly just destroyed
[18:06] <rogpeppe> teknico: could you paste your api_test.go ?
[18:07] <teknico> rogpeppe, is opClientServiceDestroy enough?
[18:07] <rogpeppe> teknico: probably, yeah
[18:07] <teknico> rogpeppe, http://pastebin.ubuntu.com/5647096/
[18:08] <rogpeppe> teknico: i think i'd do it the other way around - you can't destroy wordpress because it has units
[18:08] <rogpeppe> teknico: so.,..
[18:09] <rogpeppe> teknico: i'd create a new service via the *state.State, giving it a different name (say "wordpress-to-be-destroyed")
[18:09] <rogpeppe> teknico: then test ServiceDestroy on that
[18:09] <rogpeppe> teknico: in fact...
[18:09] <teknico> right
[18:09] <rogpeppe> teknico: don't bother with any of that!
[18:09] <rogpeppe> teknico: just try to destroy a non-existent service
[18:09] <rogpeppe> teknico: and check that the error message looks right
[18:10] <rogpeppe> teknico: doh! i should've thought of that before
[18:10] <teknico> "those are words that go together well" ;-)
[18:10] <hatch> bcsaller: do we have any convenience methods to get a .service DOM element from the service model?
[18:12] <hatch> if not, it's not a huge issue I just want to confirm that the touchstart event is being detached when d3 destroys the element
[18:12] <bcsaller> hatch: yes, service module has getServiceNode(id_of_service) which is I think what you mean
[18:12] <hatch> yep that's it
[18:12] <hatch> thanks
[18:16] <hatch> looks like it does
[18:23] <rick_h_> hatch: you got time to review another branch https://codereview.appspot.com/7796047/ ?
[18:23] <hatch> in a bit I'm just making the tests pass after my refactor
[18:24] <rick_h_> hatch: thanks, no rush on my end
[18:27] <rick_h_> gary_poster: https://codereview.appspot.com/7794048 is this what you're looking for in the docs side? I've added cards to update some of charmworld's stale docs as well.
[18:30] <gary_poster> rick_h_, thanks!  yes, comment added, but that's exactly it.
[18:30] <gary_poster> lgtm
[18:30] <rick_h_> gary_poster: right, the 'develop with local' is just to change the url in config and follow the install docs in charmworld
[18:30] <rick_h_> gary_poster: thanks
[18:30] <rick_h_> for looking real quick
[18:33] <jcsackett> hatch: can you take another look at rick_h_'s comments and mine on https://codereview.appspot.com/7792045/ ? unless you already spoke with rick and are good with things like setBusy.
[18:33] <hatch> rick_h_ just finished your review
[18:33] <hatch> jcsackett: just about to open those emails
[18:34] <jcsackett> hatch: ah, excellent. thanks. :-)
[18:35] <rick_h_> hatch: ty much. The sidebar_editorial is the upstream api endpoint. It was a mistake to change it in the last branch. This is a drive by fix. Sorry I missed noting it in the MP comments.
[18:35] <hatch> rick_h_ hah np I figured as much - I was just joking
[18:36] <rick_h_> hatch: took me a minute to figure out what you meant :P
[18:36] <rick_h_> had me checking order of args and such
[18:38] <hatch> :D oops sorry
[18:38] <hatch> jcsackett: do you have access to our kanban?
[18:48] <jcsackett> hatch: it looks like i can see it. i'm having some lag actually opening to see if i have full access. why?
[18:48] <benji> rick_h_: JS/YUI question for you: how do I assert that calling a function fires a particular event?
[18:51] <rick_h_> benji: bind to that event, assert within it, and then call the function
[18:51] <hatch> jcsackett: https://canonical.leankit.com/Boards/View/102529849/104367538 this is why we don't use null
[18:51] <hatch> rick_h_ using that method won't it pass if it doesn't assert?
[18:51] <hatch> er doesn't get called?
[18:52] <benji> rick_h_: cool (that's what I was doing, so I feel more JS-worthy now)
[18:52] <rick_h_> hatch: so two ways, there's async tools for setting a wait and resumes in the asserting callback. That will break 
[18:52] <jcsackett> hatch: dig. i'll change it.
[18:52] <jcsackett> thanks for the clarification.
[18:52] <hatch> np :)
[18:52]  * rick_h_ has  example of this
[18:53] <hatch> rick_h_ oh ok what I was going to suggest was putting the 'done()' call in the callback
[18:53] <hatch> is that not the proper way?
[18:53] <hatch> I just read the docs to find out about it so I could be wrong :)
[18:53] <rick_h_> hatch: yea, I'm thinking in YUI test it's wait/resume
[18:53] <rick_h_> hatch: so not sure how that works in mocha/should.js
[18:54] <rick_h_> hatch: I setup a var in the namespace 'triggered' and in the callback bound set it to true, then assert fired==true
[18:54] <jcsackett> hatch: is that in general? is there ever a time when null *would* be right? kind of wondering what it should be used for, given that.
[18:54] <rick_h_> that's the second way I've done it, as long as things stay all nice and single threaded/etc
[18:54] <hatch> jcsackett: if you can guarantee that null is actually null and not at some point typecasted to 'null' then yes
[18:55] <hatch> but honestly in javascript on a large app that's damn near impossible haha
[18:55] <jcsackett> hatch: ok, but so for attr's a default should be undefined.
[18:55] <jcsackett> s/attr's/attrs/
[18:55] <hatch> yeah I use undefined because then I don't need to define a value at all as it's undefined by default
[18:55] <jcsackett> dig. thanks.
[18:57] <hatch> thanks, just push that change up and I'll LGTM it
[18:58] <hatch> benji, rick_h_, in test_sub_app.js I used the 'done' in the callback method
[18:58] <hatch> that's according to the mocha docs but I really have no idea if it's the best way
[18:58] <rick_h_> benji: http://bazaar.launchpad.net/~juju-gui/juju-gui/trunk/view/head:/test/test_browser_search_widget.js#L99 is the second way. and L33 is the first way
[18:58] <rick_h_> hatch: yep, L33 in the above file uses that
[18:58] <benji> hatch: I don't see how it could be bad (famous last words)
[18:59] <hatch> cool cool :)
[19:00] <Makyo> Gotta run an errand, will be out for a few.
[19:56] <hatch> bcsaller: In doing the refactoring from your last review I need to get the `component`(topo) attribute on the service view but the context is the svg element
[19:56] <hatch> I actually need the service instance as well
[19:57] <rick_h_> hatch: is your branch ready for QA now? 
[19:57] <hatch> rick_h_ I just want to hear from bcsaller about his last comments first
[19:57] <bcsaller> hatch: so the data is the view model, that should get you the model as box.model -> Service
[19:57] <rick_h_> hatch: rgr, just wanted to check in before EOD
[19:58] <hatch> ohhh ok ok - so 'this' isn't actually the DOM element, it's the D3 element
[19:59] <bcsaller> hatch: no, I'm talking about the 1st argument to the call in this case, the data
[19:59] <hatch> ohh ok I see now
[20:00] <bcsaller> hatch: usually for access to topo you'd pull it from the closure of the method each is called on
[20:01] <bcsaller> hatch: otherwise you need to switch to selection.call(function, args) but that is only called once for the entire selection
[20:01] <bcsaller> I recommend each + the closure 
[20:01] <hatch>       node.each(function(data, index) {
[20:01] <hatch>         self.attachTouchstartEvents(data, node[index]);
[20:01] <hatch>       });
[20:01] <hatch> that's what you were going for right?
[20:02] <bcsaller> hatch: that looks right and I think you don't need index as I suspect you won't use it, it usually omitted by convention 
[20:03] <bcsaller> data should be each view model, one per call
[20:04] <hatch> gotcha - I'm thinking that passing in the node would be easier than resolving it once I get into the attachTouchstartEvents method
[20:04] <bcsaller> inside the each 'this' is already the node 
[20:05] <hatch> oh doh 0 I had a typo
[20:05] <hatch> :)
[20:13] <hatch> bcsaller: ok after messing around with this I think I am missing something :) when I log 'this' in the attachTouchstartEvent method I get the serviceModule instance not an element
[20:14] <bcsaller> because you call it as self.
[20:15] <bcsaller> self.attachTouchstartEvent(data, this) -> attachTouchStartEvent(box, node) // this == ServiceModule
[20:18] <hatch> oh ok I see now I have the elements
[20:18] <hatch> should really read the api properly
[20:18] <hatch> :)
[20:32] <hatch> bcsaller: issue - now it's being called for 'ghost' elements as well but for some reason hasClass returns false for 'pending' but it's in the element.classList property - ever seen this issue before?
[20:32] <bcsaller> use selection.classed('classname')
[20:33] <bcsaller> hatch: yui's Node impl doesn't handle svg elements properly, specifically wrt CSS styles/classes
[20:34] <hatch> ahhh I wanted to ask before I went digging
[20:34] <hatch> thanks :)
[20:34] <hatch> so what is 'selection' ?
[20:36] <hatch> d3.select(node).classed()
[20:37] <hatch> bcsaller: have you filed a ticket with YUI for that bug?
[20:38] <bcsaller> the node should have that api already
[20:38] <bcsaller> node.classed('foo')
[20:38] <hatch> it's just a DOM Node
[20:38] <hatch> it doesn't
[20:39] <bcsaller> in that case then yes, d3.select(node).classed('foo')
[20:41] <hatch> d3 feels like jquery
[20:41]  * hatch needs a shower
[20:41] <hatch> lol
[20:48] <hatch> bcsaller: 3rd time's the charm!
[20:50] <hatch> bcsaller: yes....I definitely agree :)