/srv/irclogs.ubuntu.com/2012/11/29/#juju-gui.txt

=== Makyo is now known as Makyo|out
bachazmat: thanks for the subordinate addition.  it works now.13:03
hazmatbac, cool13:04
gary_posterteknico, everything good with bug 1074425?  Just checking since this was the first trans-Atlantic handoff we've had on the GUI team.13:30
_mup_Bug #1074425: Make charm turn off console and any other debug code <deploy-story> <juju-gui:Triaged> < https://launchpad.net/bugs/1074425 >13:30
frankbanjust deployed wordpress + mysql on ec2 using juju-gui charm! \o/ that's awesome, good work guys ;-) http://ec2-54-234-19-148.compute-1.amazonaws.com/13:43
frankbanjuju-gui inception: http://ec2-50-17-135-112.compute-1.amazonaws.com:8888/13:44
benjicool13:54
gary_posterThat's awesome frankban :-)14:04
gary_posterfrankban, ready for call anytime14:05
gary_posterI'm in hangout from calendar14:05
frankbangary_poster: joining14:05
* teknico is back from lunch14:05
teknicogary_poster, yep, got Makyo|out's email, working on it14:06
gary_postercool teknico 14:06
Makyo|out\o/14:06
Makyo|outRock on, frankban.14:06
* Makyo|out back to cooking breakfast.14:06
bcsallergary_poster: submitted those doc changes, working on the next branch14:41
gary_postergreat bcsaller thanks.14:41
=== Makyo|out is now known as Makyo
teknicoMakyo, quick call before the daily?15:10
Makyoteknico, sure15:10
teknicoMakyo, https://tinyurl.com/see-emily-code15:10
Makyoteknico, there15:14
teknicoMakyo, up and running: :-) http://ec2-54-242-61-222.compute-1.amazonaws.com:8888/15:16
gary_posterteknico, Maybe we should have our call after the call marathon?15:18
teknicogary_poster, oh, right, on a call with Makyo now15:18
gary_postercool15:18
gary_posterbcsaller, dragged the bug 1077067 into prototype lane.  Good, or coding?15:21
_mup_Bug #1077067: Simple topology integration into environment view <juju-gui:In Progress by bcsaller> < https://launchpad.net/bugs/1077067 >15:21
bcsallergary_poster: I think coding is fine15:22
gary_postercool, did it15:22
goodspudgary_poster, are our daily meetings at 3:30 from now on or just that time on Wednesday?15:29
gary_postergoodspud from now on, assuming it is 3:29 for you :-)15:29
goodspudWhy yes, it is 3:29.... tick tick tick15:29
gary_posterbac bcsaller benji frankban goodspud hazmat jovan2 Makyo teknico call in 115:29
gary_posterbcsaller, team call now in juju-ui15:30
gary_posterbenji hazmat starting without you15:31
gary_posterarosales, you about?15:44
gary_posterwe'd like to start the other call15:44
arosalesgary_poster: coming15:45
gary_postercool thanks15:45
arosalesgary_poster: G+?15:47
gary_posterarosales, check in canonical IRC15:48
gary_postergave you a link15:48
* arosales apologies I had this meeting starting at the top of the hour15:50
hazmathangout failure16:05
hazmatgary_poster, so advisory.. is word fraught with connotation..16:06
hazmatthe gui has a single point of communication with the backend16:06
hazmatif that point is precluded from write operations16:07
* hazmat senses a disturbance in the force16:08
jovan2Hi all, I've updated the Upload of Config File wireframes, if you'd like to review again: https://docs.google.com/a/canonical.com/document/d/1Wpvj8Kykcqx-aa8Alq8tsU_dbkoE8o4EBYh3ZBWmbCo/edit16:40
gary_posterjovan2, I don't have permission to comment16:41
jovan2gary_poster: should be able to comment now16:45
Makyohazmat, I ran into an issue getting the charm up and running on canonistack.  Who would be a good person to ask about that?16:47
=== teknico_ is now known as teknico
hazmatMakyo, just grabbing some lunch.. but what's the issue?17:06
hazmatMakyo, canonistack has a limited set of ip addresses, in the absence of using that you need an ssh proxy17:07
Makyounit_get('public-address') is returning the server-<GUID>.canonistack address, even with an allocated IP assigned to that machine.17:07
Makyohazmat, ^^^17:08
Makyohazmat, That's how the websocket url is set, so even though I can access the gui, it can't access the web socket.17:09
MakyoBut I can set up a proxy.17:09
hazmatMakyo, 2 options.. use-floating-ip: true ...  in environments.yaml.. which may or may not work..depending on how many free ip addresses are available.. or the proxy17:10
hazmatmy understanding is that there is a dearth of public ip addrs..17:11
Makyohazmat, alright17:11
teknicouhm, I'm trying to change the EC2 region in environments.yaml, but I get:17:11
teknicoerror: Environments configuration error: /home/nl/.juju/environments.yaml: environments.ec2.region: expected 'us-east-1', got 'eu-west-1b'17:11
teknico(when running "juju bootstrap")17:14
teknicoI wonder whether I need to set something on AWS17:14
gary_posterI haven't seen that and don't know, sorry.  Ben or Kapil might be good to ask teknico 17:17
gary_posterjovan2, commented17:17
jovan2gary_poster, thanks, I'll take a look.17:18
teknicobcsaller, hazmat, ^^ any idea on what's needed to change the EC2 region?17:18
hazmatteknico, region: us-west-2 in enviornments.yaml17:19
hazmatteknico, 1b is not region its an az17:19
hazmatteknico, try eu-west-117:19
bcsallerteknico: juju/environment/config.py shows the list of valid regions17:19
teknicohazmat, oh, I see, thanks17:19
hazmataz can be specified via constraint17:20
teknicoyep, it worked :-)17:20
gary_posterhazmat, you have mentioned to bac that the JS YAML parsers kinda suck.  I encountered that yesterday.  One is relatively robust in my limited tests but says it has problems working in the browser.  The other one I found works in the browser but is very limited in what it can understand (it didn't know about > or |, for instance).  Is there a known subset of YAML that juju relies on that we could test with, to see if17:22
gary_poster jovan2's design work might actually pan out, or does juju really effectively say "any YAML is good by us"?  If that's the case, the "parse YAML in the browser" may be a non-starter without more energy than we probably want to throw at it17:22
hazmatgary_poster, we shouldn't be doing it. i thought we had discussed it b417:23
hazmatyes.. there is  a subset.. but.. its better to avoid it entirely if possible17:23
hazmatgary_poster, for completeness.. this one looks good  https://github.com/nodeca/js-yaml17:24
hazmathttp://nodeca.github.com/js-yaml/17:25
hazmatdemo link17:25
hazmatthat's a big pile of javascript though17:25
hazmatfor very little value17:25
gary_posterhazmat, this is coming from UX.  Depends on how strongly they believe in this then as to how much we should push back/explore...17:26
gary_posterI saw that one17:26
gary_posterIn fact am using considering it in a branch on the server side17:26
gary_posterbut it says17:26
hazmatgary_poster, its not reasonable.. the server can barf on it, and we can present the error to theuser17:26
gary_poster"Browser support is still buggy, and mostly done to run online demo. If you can help to improve browser compatibility and AMD support - rise pull request."17:26
hazmatwe're not loading 100k of js to validate some yaml17:27
gary_posterhazmat, ok.  jovan2 ^^^17:27
gary_postersorry we didn't nail that down harder sooner jovan2 17:28
gary_posterhazmat, fwiw this is https://docs.google.com/a/canonical.com/document/d/1Wpvj8Kykcqx-aa8Alq8tsU_dbkoE8o4EBYh3ZBWmbCo/edit17:28
gary_posterwhich is second draft of something from earlier17:28
hazmat68k in fact17:29
hazmatgary_poster, we can have the server come up with a more fielded/strucutured error message for the ux.. but ux is not implementation17:30
hazmatmore than one way to skin a cat17:30
gary_posterhazmat, UX shows loading values and then letting people decide when to submit, after possibly mutating (or discarding!)17:31
hazmatgary_poster,  good error message support is something i'm comfortable with pushing on to the server fwiw17:31
gary_posterunless juju supports parsing yaml without acting on it17:32
hazmatgary_poster, the ux can do things optimistically but in the end the server is the src of truth..17:32
hazmatie.. that name is already taken..17:32
hazmatgary_poster, it parses the yaml b4 doing mods to the sys17:32
hazmatie. validates inputs17:32
gary_posterhazmat, my point is that the UX as given cannot be implemented with juju validating and then acting on YAML17:33
gary_posterSo either the UX gives17:33
gary_posteror we do it on the client or we add a "validation/parsing" only story to client17:33
gary_posters/to client/to juju/17:34
gary_posterstill confusing.  this is what I meant: "or we do it on the client or we add a "validation/parsing" only story to Juju"17:34
hazmatgary_poster, or we only validate that field when the user submits the action, and given them in context / form field error message from the server17:35
hazmatthat doesn't need a validation/parse only story17:36
gary_posterthat's still not the given UX.  Which, again, is fine.  But we aren't talking about how to implement the UX story, we are talking about how to change it.17:36
hazmatfair enough17:38
gary_posterI'm fine with however UX and you reconcile this.  It sounds like variations on the current UX for this feature are the only technical acceptable ones.17:38
hazmatif we had metrics on how often its an issue.. it would be worth discussing the cost of adding the js to do the front end work17:38
hazmatbut as it is.. our js is very large.. we should be slimming17:38
hazmatanother good reason to have separate files for framework/templates/app/libs 17:39
hazmatso we can monitor see growth 17:39
hazmatgary_poster, ic. the ux calls for the parsed values to field fill the form17:40
hazmati thought it was just validate for the file error message field17:41
hazmater file field17:41
gary_posterright17:41
hazmatright now the aggregate draws down at 674k of js..17:42
gary_posterwe should user tgz on that17:42
gary_posterwe can when we switch to apche or similar17:42
hazmatbenji, that's the skin loading stuff in the combo loader i think..17:42
hazmatre css combo17:43
hazmatgary_poster, user tgz?17:43
gary_postersorry use gzip17:43
hazmatgary_poster, transfer size speed is good/helpful with gz.. but the browser still has to parse/interpret17:43
hazmatthat's a boatload of js17:43
* hazmat wonders how much smaller it would be dropping the widgets..17:44
gary_posterhazmat, if that's actually a success metric then we should establish goals and start measuring17:44
gary_posterI suspect it is low on the scale of priorities but maybe I'm wrong17:44
hazmatgary_poster, i'm evaluating it  as part of the eventual mobile/tablet usage goal17:45
gary_posterok cool.17:46
gary_posteroh teknico you around?17:47
teknicogary_poster, yep17:47
gary_posterteknico, quick call in juju-ui?17:47
teknicogary_poster, ok17:48
Makyobenji, thanks for the review.  The docs only mentioned string and int.  However, when I tried boolean, I got consoleEnabled: False, a la python, not JS.  Would you say just do a lower case on that, or stick with string?18:13
frankbanMakyo: in my branch a boolean config type works using True/False18:21
gary_posterhazmat do you happen to be available for a quick talk with teknico and myself about how we can configure the GUI files to be served over HTTPS and other related topics?18:26
hazmatgary_poster, sure18:26
gary_posterthanks hazmat we are in juju-ui18:26
benjiMakyo: when you retrieved the configuration you got a string "False"?18:40
Makyobenji, Yes, because that's the string representation of that value in python.18:41
MakyoBut in javascript, it's false.18:41
Makyobenji, sorry, misunderstood.  The string happens when translating the boolean value in the template.18:42
MakyoI did get a boolean.18:42
benjicool18:42
MakyoSo should I just do a str(config['juju-gui-console-enabled']).lower(), or use a string?18:43
MakyoOr is there something I can do int he template?18:43
benjiMakyo: I don't understand the question.  Why do you need a string?  Is it to present it to the user?  If so, I bet it would be nicer to construct a sentence: "Console messages are disabled." instead of something like "Console messages enabled: False".18:47
Makyobenji, It's building the config.js file from a template using values from config.yaml.  If I pass in the boolean config value to the template, python translates it into the string representation of it, which has a capital F.  This is an error in javascript because False is an invalid token.18:49
benjiAh! Gotcha.  Since you are building a JSON value, I would look at the json module.18:51
* benji looks18:51
benji>>> import json18:52
benji>>> json.dumps(False)18:52
benji'false'18:52
benjiMakyo: ^^^18:52
Makyobenji, aha, gotcha.18:52
Makyobenji, That adds the line import json, and changes the line in question to: 'console_enabled': json.dumps(config['juju-gui-console-enabled'])18:54
benjiyep, looks good18:55
Makyobenji, Cool, thanks.18:55
benjimy pleasure18:55
gary_posterhazmat, do you have a plan on how to attack https://bugs.launchpad.net/juju-gui/+bug/1074419 given the chrome basic auth problem?  If you don't we can investigate, but if you already have a plan we should follow it.19:07
_mup_Bug #1074419: Enable simple user & password login to rapi-rollup websocket <deploy-story> <juju-gui:Triaged> < https://launchpad.net/bugs/1074419 >19:07
hazmatgary_poster, its not basic auth19:40
hazmatgary_poster, its a login dialog from the gui19:40
gary_posterhazmat, which we just sent over the ws after establishing the connection?19:40
gary_postersend19:40
gary_posteras a juju command, effectively?19:41
hazmatgary_poster, yes.. the login is a command on the websocket.. with auth enabled it rejects other commands on the conn without the auth20:04
gary_posterhazmat, ah!  this is already implemented, also?20:05
gary_posteror this is the plan you want to have implemented?20:05
hazmatgary_poster, its to be done20:10
hazmatgary_poster, that can wait till after the initial deploy story is complete20:10
hazmatgary_poster, the gui will need a login, and the websocket do auth 20:10
gary_posterhazmat, it would be great to have that sooner because otherwise we are blocked, one card after the other.  Also, without it, the deploy story is still security via obscurity, and not much of that, right?20:11
gary_posterin fact, it is one of probably two cards that are ready to start right now20:12
gary_postermaybe three tops20:12
hazmatgary_poster, huh.. 20:12
hazmathow is it  a blocker.. its orthogonal to deployment?20:12
gary_posterthe goal is easy charm based deployment for users to use, hazmat.  I don't think people will want to actually use this without some password protection, do you?20:13
hazmator your saying its orthogonal as well20:14
gary_posterI have two threads to the deployment story.  I define the goal of the deployment story as having a way to deploy the GUI and actually want to use it20:14
hazmatgary_poster, that's not the point i'm trying to make.. just saying its not a blocker to getting deployment working. and frankly considering the fairly sad nature of juju auth.. 20:14
hazmatbut fair enough.. its ready to start20:15
gary_posterok20:15
gary_posterso the story is:20:15
gary_posterwhen auth config is turned on for juju (with commandline, I guess?)...20:16
gary_posterthen you can connect to the ws20:16
gary_posterbut it will send nothing20:16
gary_posterand only accept an auth command20:17
gary_posteronce the auth command happens20:17
gary_posterit will proceed with handshake20:17
gary_posterand then accept other commands20:17
gary_posteras it does now20:17
hazmatclose.. accept the send nothing bit20:17
hazmatit sends server greeting on connect20:17
hazmats/accept/except20:17
gary_posterbut without the usual bits of info20:18
gary_posterlike the default series20:18
gary_posterright?20:18
* hazmat looks over greeting info20:19
hazmatgary_poster, yeah.. we could switch the extended info (type, series) to the login success response.20:20
hazmatinstead of the existing connect20:20
hazmatthe connect should continue to response with 'version', 'extensions', 'ready' flags20:21
gary_posterright, ok20:21
gary_posteris there an obvious point in rapi to be the stranglehold over the other commands?20:21
hazmatgary_poster, its probably more useful to do this at the gui level first20:21
hazmatgary_poster, its a state ful protocol.20:22
hazmatyes20:22
gary_postermore useful to do at gui level first: don't understand why yet20:22
hazmatfor pyjuju the gui will need to md5 checksum20:22
hazmatgary_poster, relative time and effort20:23
hazmatgary_poster, the backend can't go live till the front end is done20:23
hazmatgary_poster, the backend effort here is on the order of an 1-2hr.. the front end is more like 1-2 days20:23
gary_posterI guess they are not blocking one another20:23
gary_posterbackend effort for you  :-)20:23
gary_posterthe connect would also ideally explicitly clarify whether we were in an authentication situation20:24
gary_posterbackend effort for you: I mean we can do it but I expect it would be a day for someone else, not 1-2 hours20:25
gary_posterso what would gui need...20:25
* bac reboots20:26
gary_posterit would change the connect handshake to be able to handle the new authentication possibility20:26
gary_posterit would need a new authentication command20:26
gary_posterit would need to show a login on the connect handshake that specifies authentication is required20:27
gary_posterand not much of anything should be rendered or hooked up until the authentication is successful20:28
gary_posterhm...losing the websocket connection will be much more painful...20:28
gary_posterwe'll need to disable any changes and show the login immediately20:28
gary_posteror stash the password20:28
benjigary_poster: let me know when you're ready for our call20:30
gary_posterbenji I am in hangout from calendat20:30
gary_posterr20:30
hazmatgary_poster, re gui.. first thing is login dialog20:31
hazmatas interceptor to dispatch rulz20:31
hazmatconditional on presence of authenticated websocket20:31
hazmatgary_poster, we can store user name password in browser session20:31
gary_posteruse name password: ok20:32
hazmatthe interceptor stuff is basically a route match to "*" that doesn't let the next rule match proceed20:32
hazmatif login isn't there.. it will just do the login dialog display20:32
gary_posterinterceptor to dispatch rules: which ones? oh, you mean in app.  yeah ok, +1, I like it20:32
gary_posterhazmat, you agree that backend will explicitly say in connection that it wants authentication, yeah?20:33
hazmatgary_poster, sure.. it can do a challenge20:34
hazmatimap style20:34
gary_posterhazmat, show me what you want that to look like over the wire to juju, starting with the initial connection, and (even though I feel this one is more obvious) what the command looks like, and we can start with the gui part.  do you want to write the juju/rapi part or do you want us to?20:38
hazmatgary_poster, i'll do it.20:39
gary_postercool hazmat thanks.  can you give us the wire spelling today--at least high approximation--so we can start with the gui before then?20:40
hazmatgary_poster, sure working on it now20:41
gary_posterawesome thank you20:41
hazmatgary_poster, something along these lines.. http://paste.ubuntu.com/1397723/20:51
gary_posterack hazmat, will run with it.  thanks20:51
hazmatthere's an odd bug in the gui atm.. it requests get_endpoints like 5 times in the initial render..20:52
hazmatwith the same parameters.. quite odd20:52
Makyohazmat, will take a look.20:53
hazmatMakyo, thanks20:54
gary_posterrunning away21:46
gary_posternever took lunch21:46
gary_posterwill do some work later in the evening anyway21:46
gary_posterbye all21:46
hazmatgary_poster, cheers21:52
Makyohazmat, get_endpoints is requested whenever a service is added to the db (which happens 5 times with the first delta on the default improv script).22:53
MakyoCould move it to on_delta and only call if a service has been added, perhaps?22:55
MakyoOops, little late, I suppose.22:55
hazmatMakyo, it should get moved from add_service to delta evt sub23:03
hazmathmm23:03
hazmatwell that helps initially but subsequently it needs some better logic..23:04
hazmati think i had a proposal on the merge proposal for it..23:04
hazmatMakyo, that sounds reasonable re on_delta w/ service add23:04
Makyohazmat, Alright, I'll look into it.23:08
hazmatMakyo, yup that should be perfect.. move 2 on_delta subscriber, and compare endpoint map to service map break on new svc in service_map23:08
hazmatand update23:08
MakyoDelta should have whether or not a new service was added, right?23:09
hazmatthere's some gc stuff there as well, but that doesn't need the rpc 23:09
hazmatMakyo, in the delta subscriber.. (on_database_changed i think?) .. you'll need to compare the endpoint map (svc name keys) to the services in the db (key iteration).. if any adds, request the endpoints.. if dels remove from svc map, else pass.23:10
hazmats/svc map/endpoint map23:11
Makyohazmat, oh, I was figuring it'd be easier to see if there was a service add in the delta received since that would mean less matching-up of services.  Can do either.23:13
hazmatMakyo, i was just trying to keep the logic in the same place in the app.js.. the other needs the endpoint map/app ref to move into the db.. its pretty reasonable to consider this a db function though.. your choice23:16
hazmathmm23:16
hazmatcurrently the db doesn't ref the env connection23:16
hazmatgiven that its probably simpler to just update the logic in app.js .. since it has all the pieces needed (db, env)23:17
MakyoAlright.23:17
hazmatwe've tried hard not to get spaghetti references from various components..  but it feels a bit torturous when we have to move responsibilities out of their obvious location.23:19
hazmati'm curious what folks would think about  we need to have some form of global(ish) resolving/addressing function.. ala zope's getUtility.. a resolve method that can lookup components.. so we could do resolve('app') .. resolve('db') instead of reference passing.23:21
hazmatMakyo, hmm.. another way that matches well with what you referenced.. is to just do it the delta processor.. and fire an event up to the app after processing all new svcs to update the endpoint map23:24
Makyohazmat, oh, like fire a service_added event that the app could listen for and update endpoints?23:25
hazmatMakyo, its a bulk event or we end up in the same place we are today23:25
hazmatits got new svc names, old svc names... the old names are nesc to gc the old entries from the svc endpoint map23:25
Makyohazmat, yeah, do it alongside firing update (which is what triggers on_database_changed)23:25
Makyogc can take place in the db, though, correct? That doesn't need rpc.23:28
hazmatright. it doesn't rpc.. but the endpoint map would need to move to the db..23:28
hazmatlooking at the db code.. its not clear there is a good place for this logic..23:30
hazmaton_delta there would need to grow service obj specific code and keep a set..23:30
hazmatwhich feels a bit icky.. given how generic and clean it is atm23:31
hazmatand the list class just gets a single delta..23:31
hazmatMakyo, i'd recommend just doing it in app.js for now .. afaics its the simplest thing that works..  moving it to models.js is just going to complicate the sync logic.. which is nice to keep simple for now.. hopefully at some point we'll have some indexed db logic in there for some 3 way merge fun. 23:34
MakyoAlright23:35

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