/srv/irclogs.ubuntu.com/2014/10/23/#juju-gui.txt

=== urulama_eod is now known as urulama
=== TheRealMue is now known as TheMue
frankbanguihelp: another quick fix to the GUI: https://github.com/juju/juju-gui/pull/62713:50
kadams54frankban: taking a look14:06
frankbanty14:06
kadams54frankban: looks good.14:11
frankbankadams54: great thanks14:11
kadams54hatch: let me know when you're available.14:12
hatchkadams54: just responding to your replys14:12
kadams54hatch: yesterday you talked about moving the event handling into an extension… why?14:13
kadams54Or maybe I'm misunderstanding?14:13
hatchjust the handlers14:13
hatchit's because these views are getting unweildy and difficult to test14:13
kadams54OK14:13
kadams54Agreed.14:13
hatchas an extension we can easily test the handlers separate from it all14:13
hatchkadams54: also this branch is missing tests14:17
hatchdid you forget to add them to the commit?14:17
kadams54No.14:17
kadams54I'm adding tests in my current branch.14:18
hatchoh they should probably go in this one if I'm going to be building on top of this code and possibly modifying it14:19
hatchkadams54: I have a wierd issue with the machine view qa14:20
hatchif I highlight two services then no machines are visible14:20
kadams54hatch: You confident enough in our approach to wrap it in tests?14:20
kadams54hatch: yeah, don't do that.14:20
hatchit's just a utility method14:21
hatchlol what do you mean don't do that? Is this a bug?14:21
kadams54Stuff involving multiple buttons being pushed doesn't work yet.14:21
kadams54The spec is divided up into 3 sections: hiding, highlighting, and cross over (multiple states invoked at once)14:22
kadams54cross over wasn't addressed by this card14:22
hatchahh yeah we don't modify the db for machines anywhere14:23
hatchkadams54: didn't we get a new icon for the highlight?14:25
kadams54hatch: not sure what you mean by "it's just a utility method". findUnrelatedServices() needs tests for sure, but that's not what I'm worried about. It's the changes in renderUnits() in both contianer-token.js and machine-token.js.14:25
kadams54hatch: not yet. We were promised one, but it has not arrived. luca?14:25
hatchkadams54: findUnrelatedServices has a very similar usecase to getRelationDataForService14:26
hatchthe latter is a util method so why isn't the former14:26
hatchthe former needs access to things it coudln't possibly know about14:26
hatchdb and utils14:26
kadams54Becasue I don't think the latter should be a util method.14:26
kadams54And I reject your assertion that it couldn't, because it does :-)14:27
hatchmethods on a model should only ever interact with the data in that model14:27
kadams54False14:27
kadams54Model methods can also deal with relations that the model has to other models14:28
hatchno because then you have to pass that in14:28
hatchyou then have to stub all that in tests14:28
hatchit's a clear hierarchy that's being violated 14:29
hatchthe child (model) shouldn't need to know about it's parent (modellist) or grandparent (db)14:29
kadams54It's possible that I'm just not groking the hiearchy here, but I was kinda surprised that the models here had no way to refer back to the DB.14:29
hatchthat's intentional 14:29
kadams54That's not my experience with models in other MVC frameworks14:30
kadams54How do you deal with one-to-many relations?14:30
kadams54i.e., a machine that contains many units?14:30
hatchYUI is based on OOP14:31
kadams54I agree that it's less than ideal to pass the DB in, but IMO that's only because the model ought to have a way to get back to the DB baked in.14:31
kadams54LOL14:31
hatchin OOP you don't know about your parents14:31
hatchone to many relations are pushed up the stack14:31
hatcheither to the modellist or to the db14:31
kadams54That restriction, that models can only operate on their own internal data, seems to relegate them to pretty dumb objects.14:33
hatchexactly14:33
hatchthat's the whole point 14:33
hatchtake a look at Lazy Model Lists - they ARE just objects 14:33
kadams54Sure, but I thought that was a concession for performance14:34
rick_h_dumb objects ftw14:35
kadams54rick_h_: bah14:35
rick_h_:)14:35
kadams54In my experience, particularly in the Java world, dumb data objects lead to incredible code bloat.14:36
rick_h_ime dumb objects lead to great testability, easy resuability, and easier debugging14:37
hatch"...in the Java world...incredible code bloat..." there I fixed it for you :P14:37
kadams54They couldn't do anything, so you had to write all these other classes that manipulated them. DOs were wrapped by DAOs so you could do data query operations. Then the controllers took the DOs out of the DAOs and re-wrapped them in some other view object whose name escapes me, to prep the object for the view.14:37
kadams54Don't get me wrong. Fat models are also bad.14:37
kadams54But the truth is in the middle.14:38
rick_h_kadams54: hatch I'm not up on the whole conversation, just speaking in general terms the GUI's been bitten by parts that were too smart for their own good and we've learned that dumber parts (widgets, models, etc) have helped the gui over the long run14:38
kadams54I'll do it as a util method, but under protest. util methods suck.14:40
* rick_h_ reads more of backlog14:40
hatchI'm ok with that :)14:40
kadams54Just as a general concept… I tend to be opposed to putting things in utils because all too often it turns into an unwieldy dumping ground for code bloat.14:41
hatchyeah I agree with that14:41
kadams54So your objects are all nice and clean and shiny because you just outsourced the crufty stuff to a monster 5000 line mish-mash of "utils"14:41
hatchbut you could put it in the db14:41
hatchand typically you have multiple utils files 14:41
hatch(we only have 3) :P14:42
kadams54IMO the DB ought not know about the relations within it. ServicesList seems like the better fit to me.14:42
rick_h_hmm, so just reading the backlog, the method findUnrelatedServices seems like it'd be something I'd call on a db passing in a service.14:43
kadams54Though, per my comment on the PR, it doesn't seem like the type of aggregate operation that is intended for ModelList.14:43
rick_h_someone link me to the source?14:43
kadams54https://github.com/kadams54/juju-gui/blob/hide-highlight-tweaks/app/models/models.js#L313-L32814:43
hatchrick_h_: I also commented on your question in my PR https://github.com/juju/juju-gui/pull/624#discussion_r1925172614:44
rick_h_so yea, anti it being on service, but +1 on it being up the stack there in the service list/db.services14:44
rick_h_vs a util14:44
hatchI'll go with that14:44
rick_h_just to toss in my .0214:44
* hatch throws in his .02 14:45
* hatch hopes kadams54 isn't rich14:45
kadams54hatch is in luck.14:45
hatchlol14:45
hatchI was waiting for you to drop $1 on there :P14:45
kadams54OK, I'll move it up to the servicelist and add a test.14:45
hatchudaman14:45
kadams54Anything else needed to land this branch?14:45
hatchwell I'm curious about your concern for the render method14:46
hatchit looked fine to me14:46
hatcham I missing something? :)14:46
kadams54The changes need to be tested, but the underlying code seemed very hacky to me…14:46
kadams54Though that was before our chat yesterday.14:47
kadams54I was going to write more functional-ish tests that exercised the UI-facing bits of code as part of moving away from custom events and towards database changes.14:47
hatchahh - well the render code looks good - I think that once we make the 'db the source of truth' stuff then it's easy to reason about 14:48
kadams54Yeah, sounds good. Test findUnrelatedServices in this branch, test the rendering in subsequent branches.14:48
kadams54Is that a correct summary?14:48
rick_h_hatch: kadams54 and I'm going to pull the 'remember my settings' card for now. I want us to focus on using the feature/etc over that14:49
hatchkadams54: yep that fine - just make sure those tests get in there later ;)14:49
kadams54I'm not familiar with that card?14:49
hatchrick_h_: kadams54 yep that's good I already marked it as low14:50
kadams54Oh, nevermind14:50
hatch:)14:50
kadams54I thought you meant a "card" as in "I'm pulling the team lead, master-of-the-universe card.", not as in an actual kanban card. :-)14:50
rick_h_kadams54: oh, no I try to keep my 'team lead' cards in a box on the desk14:51
hatchwhen that box drops, you'll know14:51
kadams54Right next to the Crimes Against Humanity box, right?14:51
kadams54;-)14:51
hatchcalifornia will finally split from the US via an earthquake 14:51
Makyojujugui call in 614:54
* hatch just realize hatch and Makyo are the same character length14:56
MakyoIt's only been, what, a year and a half?14:56
hatchpretty close to 2 yep :)14:57
hatchtrying to join15:00
rick_h_kadams54: frankban Makyo ^15:00
hatch__guess I'm going to have to spin up a new vm with utopic on it now15:33
hatchI'm really curious if we could do the canvas with react...16:01
hatchfrankban: +1 on your GUI branch16:12
hatchmy GigE router has a max transfer rate of about 50MB/s16:13
hatchlol false advert much?16:13
frankbanhatch: thanks16:18
jrwrenhatch: that is max gigE16:22
jrwrenhatch: to go higher than that you need to enable jumbo frames, which you probably do not want to do.16:23
hatch50MB/s is the max?16:23
jrwrenhatch: with a 1500byte MTU, yes.16:23
hatchwell what the deuce 16:24
hatchDo you know how long it takes to back up 100GB at 50MB\s16:24
hatchlong time!16:24
hatchthat's how long16:24
jrwrenhatch: there is a pretty bad discussion about it here: http://arstechnica.com/civis/viewtopic.php?t=34308916:26
hatchso basically I'm SOL if I want anything faster :)16:28
hatchwell, I suppose I could buy a thunderbolt equipped NAS and park it beside my laptop16:29
hatch:)16:29
jrwren10gig is getting cheaper.16:29
jrwrenor I could be completely wrong.16:30
hatchtbh I had no idea that gige was so slow16:30
hatchno wonder server networks are all fiber16:30
jrwrenits gigabit, not gigabyte.16:30
jrwrenyou are getting about 50% of that, because your default MTU is 150016:31
jrwrengigE supports going to 9k MTU.16:31
hatchright but that's huge16:31
jrwrenIME server networks aren't all fiber.16:31
hatchheh16:31
jrwrenthe server networks can run 9k MTU though.16:31
hatchis it still TCP? So it would do the ramp up to 9k?16:32
jrwrenno, that is ethernet MTU16:32
hatchintersting....16:32
hatchso what are the downsides to increasing the MTU? Some things may not support it?16:33
hatchkadams54: I can't find any reason why the service items unhide when pan'd16:34
hatchthis stuff is very opaque with everything being controlled by events firing everywhere heh16:36
hatchkadams54: there is a bug when you try and hide/highlight a ghost service - is this known?16:37
hatchUncaught TypeError: Cannot set property 'highlighted' of undefined service.js:143916:38
hatchannnd now I have found why it's being shown again :)16:39
jrwrenhatch: your rather has to be able to fragment packets, which ipv6 doesn't allow, so anything ipv6 will be broken.  your inet router presumably is not gigabit, and so supports MTU of 1500, and that ends up as a lot of fragments, which slows things down.16:59
jrwrenhatch: fragment reassembly is expensive.16:59
jrwrenhatch: it may be worth cautiously playing with :)16:59
kadams54hatch: a bug on highlighting a ghosted service is new to me.17:00
hatchlol 17:00
hatchmaybe17:00
hatchkadams54: ok I'll file it17:00
hatchkadams54: https://bugs.launchpad.net/juju-gui/+bug/138481917:05
mupBug #1384819: Hiding ghost services throws console error <juju-gui:New> <https://launchpad.net/bugs/1384819>17:05
rick_h_hatch: feel free to triage that as high and add a card for it17:05
hatchdoing17:06
rick_h_ty much17:08
kadams54hatch: test added and findUnrelatedServices moved. I rebased before pushing and then realized I should not have, so sorry about that.17:13
hatchs'ok i'll take a look17:14
hatchodd my ubuntu clock is accurate today17:26
hatchkadams54: one comment17:29
hatchjust thought of it reading your tests17:29
kadams54I don't know what peer relations are?17:31
kadams54How this handles different types of relationships (subordinate and otherwise) probably depends on how getRelationDataForService handles them.17:32
kadams54If it reports them as a related service, then they will be excluded from the set of unrelated services.17:32
hatchhmm17:33
hatcha peer relation is essentially a relation between itself17:33
hatchthen there are subordinate relations17:34
hatchwhich I think work as expected....17:34
hatchwe should definitely add these relation types to that test17:34
hatchjust to be safe17:34
hatchI have somehow made my irc client go fullscreen and I can't get out of it17:41
rick_h_lol17:41
jcw4hatch: I think quassel has bugs around full screen17:41
hatchyeah...hmm17:42
hatchI can't even close it lol17:42
jcw4I kept crashing or getting it stuck so I quit using f1117:42
jcw4teh suk17:42
jcw4hatch: the additional bummer is even if you kill it it may start in full screen again because of preferences17:45
hatchwell here is to hoping I don't do THAT again17:45
hatchyeah I got lucky17:45
hatchI was worried about that17:45
hatchkadams54: so I don't know off hand what the syntax for peer or subordinate relations are - so you might want to deploy wordpress to get the peer relation data17:46
hatchand I think nagios has a subordinate charm17:46
hatchso you could do that one for that data17:46
hatchI wish there was a Textual for Ubuntu17:47
hatchTextual is a killer IRC client17:47
jcw4Textual is my favourite too... I just like quassel because I have quassel core running on an always-on ec2 instance so I don't lose history17:50
hatchyeah Textual has deep ZNC integration17:52
hatchbut it doesn't run on Ubuntu17:52
hatch:)17:52
kadams54hatch: do you think that's relevant to the function being tested?17:58
kadams54Seems like it would be more appropriate in tests for getRelationDataForService17:58
hatchwell that function needs to work properly to return the unrelated services - if it's returning unrelated that are actually related 17:58
hatchwell no the getRelationData method returns the relation data17:59
hatchat least as I understand it17:59
hatchtechnically it's returning all 'related' services then it's up to something else to act on that18:00
kadams54Ah, so you think the data for a peer or subordinte relation would not be structured as { far: { service: 'foobar'}}18:00
hatchI'm not sure tbh :)18:00
hatchit just came to mind while reading the test18:01
kadams54I thought your concern was that the set of related services might not include everything it should.18:01
hatchI would hate if a subordinate wasn't hidden (or was) when it wasn't suppsoed to be18:01
kadams54But it sounds like that's not right; what you're actually worried about is that the data in that set could look different for different types of relationships. Is that correct?18:01
hatchright18:02
kadams54I'll verify18:02
hatchif you're filtering on 'far' but 'subordinate' is still shown18:02
hatchthen that'll be a UI bug18:02
hatchbut not sure if that's a real issue :)18:02
hatchthanks for looking into it'18:05
hatchI know know where the canvas bugs are comign from but still groking how best to fix18:05
hatchlunching18:19
kadams54hatch: verified that subordinate and peer relationships use the same data structure.19:05
hatchkadams54: awesome thanks19:13
kadams54hatch: you a +1 to land that?19:19
hatchoh yeah19:19
hatch:)19:19
hatchsorry19:19
urulamanice to see CS surviving floods of icon requests :D20:02
rick_h_:)20:03
hatchmoar pichures20:03
urulama:D :D20:04
hatchrick_h_: jcsackett do you guys know if I can install GUI'd applications in an lxc?20:18
rick_h_huh?20:18
rick_h_what's a GUI'd application?20:19
hatchwell anything with a GUI, say Eclipse IDE20:19
urulamahatch: ssh -X ?20:19
hatchor sublime, etc20:19
rick_h_yea, probably have to do X forwarding/etc but sure20:19
rick_h_hatch: I think serge had a blog post on doing that20:19
rick_h_https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/ 20:19
hatchessentially I'm wondering if I could create a charm for developing with dart which would include the ide and such20:19
rick_h_hatch: ^20:19
hatchahh excellent20:20
hatchyet another weekend project that may or may not get started on :)20:20
hatchit would be super awesome to juju bootstrap local; juju deploy dart-dev-env :)20:21
hatchI'm just using dart as an example - this could be very helpful for many different dev envuironments20:21
=== arosales_ is now known as arosales
huwshimiMorning22:05
hatchyooooo22:05
rick_h_huwshimi: morning 22:57
rick_h_huwshimi: hatch sorry, doing dishes and lost track of time22:58
huwshimirick_h_: Hey, no problems22:58
rick_h_hatch: did you need to do weekly call?22:58
rick_h_huwshimi: let's just meet there in case he wants to jump in22:58
rick_h_https://plus.google.com/hangouts/_/calendar/cmljay5oYXJkaW5nQGNhbm9uaWNhbC5jb20.dd77sn7kjl6unba21lutdr0p70?authuser=123:00
huwshimirick_h_: Yep, just joined23:00
huwshimioh23:00
huwshimijoinoing23:00
huwshimirick_h_: The issue from Maddison's branch is actually an issue already on trunk, so I might just ship his branch and then do a tiny followup branch to fix the issue. Sound OK?23:25
rick_h_huwshimi: rgr23:26
rick_h_huwshimi: thanks!23:26
huwshimirick_h_: np, thank you!23:29

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