14:00:18 <vkramskikh> #startmeeting javascript 14:00:19 <openstack> Meeting started Wed Jul 20 14:00:18 2016 UTC and is due to finish in 60 minutes. The chair is vkramskikh. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:00:20 <openstack> Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 14:00:23 <openstack> The meeting name has been set to 'javascript' 14:00:25 <vkramskikh> hi everyone! who's here? 14:00:28 <betherly> o/ 14:00:31 <cardeois> Hey ! 14:00:43 <jprivard> I'm here 14:00:43 <vkramskikh> #link https://etherpad.openstack.org/p/javascript-meeting-2016-07-20 14:00:45 <yujunz> hello 14:00:46 <vkramskikh> here is the agenda 14:01:09 <vkramskikh> #topic where shall we publish the api doc built by jsdoc? 14:01:28 <jaranovich> hi! 14:01:30 <cardeois> Is there any hosted place for openstack docs we could use? 14:01:43 <yujunz> I have the same question 14:01:47 <krotscheck> o/ 14:02:10 <vkramskikh> I know there is http://docs.openstack.org/ , but don't know how to post anything there 14:02:17 * krotscheck is here, but had to skip chairing this time because his son's too sick for daycare. 14:02:36 * krotscheck isn't certain about docs. 14:02:44 <betherly> krotscheck: hope he gets well soon!! 14:02:59 <krotscheck> I can check with the docs team, I beleive it's just another job that we need to add. 14:03:25 <cardeois> Yeah, it would definitely be cool to be in an official openstack doc 14:03:37 <betherly> docs.openstack can be amended from within the project i think 14:03:41 <cardeois> so it's let's confusing for people using the lib 14:03:44 <vkramskikh> #action krotscheck to contact docs team regarding jsdoc hosting 14:03:49 <krotscheck> Well, we're not an official project, we're just in the big tent, but I'll explore options. 14:03:58 <betherly> so if you have a section called docs and set the project up for doc jobs i think it sorts itself... 14:04:08 <yujunz> It seems there is an catagory of api doc in docs 14:04:13 <krotscheck> betherly++ 14:04:32 <krotscheck> Also, there's docs vis-a-vis getting started with the openstack libs, i.e. shade and so forth, which we should probably hook into. 14:04:42 <betherly> krotscheck: indeed, neither is ironic-ui technically as its a subproject, but since it has its own repo it should have the ability to have docs within it 14:04:44 <krotscheck> Lots of things for me to look at :) 14:05:07 <betherly> krotscheck: do you want me to take a look into the docs side from within the project and see if that can be done in this scenario? 14:05:23 <krotscheck> betherly: If you're volunteering, sure! 14:05:28 <krotscheck> :D 14:05:39 <betherly> krotscheck: sure ill add it to my agenda for tomorrow 14:05:46 <krotscheck> betherly: ALrightey 14:06:08 <vkramskikh> #action betherly to help krotscheck with the docs 14:06:32 <vkramskikh> awesome, next topic :) 14:06:37 <vkramskikh> #topic We've just merged all build/testing stuff - what next? Project architecture - what should it be? 14:07:03 <vkramskikh> it was a topic for the previous meeting, but I failed to answer this question 14:07:20 <vkramskikh> I believe krotscheck has lots of ideas what to do next :) 14:07:20 <krotscheck> it's a bit of a broad topic, no? 14:07:37 <cardeois> I think we should adopt an architecture similar to pythonopenstack-sdk. I actually don't know how it's architectured, but would be nice to have a seamless transition for people using python or js sdk 14:07:53 <jprivard> I agree 14:07:56 <krotscheck> Either that or shade. 14:08:00 <azemlyanov> python is very different from js 14:08:04 <krotscheck> Honestly, shade seems to be a bit more popular. 14:08:18 <krotscheck> With that in mind, we can also draw inspiration from pkgcloud 14:08:29 <vkramskikh> could you please give me a link to that shade? I have no idea what it is 14:08:32 <cardeois> Alright with shade then 14:08:43 <krotscheck> http://docs.openstack.org/infra/shade/ 14:08:46 <krotscheck> #link http://docs.openstack.org/infra/shade/ 14:08:57 <vkramskikh> thanks, I'll take a look 14:09:16 <cardeois> azemlyanov I agree we should code for js, but have our public api similar to one of those sdk in python 14:09:21 <krotscheck> My initial thoughts were: "let thing = new OSCloud(config);" 14:09:23 <cardeois> Internals is another matter I guess 14:10:05 <krotscheck> The tricky thing is- what does that instance look like, since different clouds may have different services available. 14:10:15 <krotscheck> And discovery can't happen until we're authenticated against keystone 14:10:16 <azemlyanov> JS discourage exceptions that is standard in Python, JS is async and rely on promices 14:10:30 <azemlyanov> promises 14:10:32 <krotscheck> azemlyanov: Promises or callbacks ;) 14:10:39 <azemlyanov> or callbacks of cause 14:10:40 <krotscheck> (Anyone here prefer callbacks to promises? I don't) 14:10:57 <msmol> would be nice to support both 14:11:03 <azemlyanov> both are better 14:11:24 <azemlyanov> in simple cases callback is often prefferable 14:11:27 <cardeois> You're right, promises is definitively better 14:11:46 <cardeois> Well it's nice for chaining calls 14:12:17 <vkramskikh> I suggest to support promises only, don't see any value in supporting both. jquery 3 dropped support for callback for jqXHR 14:12:36 <cardeois> +1 14:13:25 <krotscheck> We'll see how it shakes out once we start writing code. I'm more curious about the "create api instance, discover services" step. 14:13:26 <vkramskikh> I think we should try to implement something simple like Keystone client and discuss all that stuff in gerrit 14:13:32 <msmol> okay, so what kind of promises? does ES6 have "official" promises built-in, or was that pushed to ES7 or whatever it's going to be called 14:14:08 <vkramskikh> msmol: yes there are native Promises, and fetch() already utilizes them 14:14:08 <krotscheck> #link http://caniuse.com/#search=promise 14:14:08 <timothyb89> msmol: yes, they are built in: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise 14:14:52 <krotscheck> I agree with vkramskikh: MOst of the complicated bits regarding initialization of a cloud, including auth, config structure, and service discovery, will be best discussed in code. 14:15:03 <krotscheck> And, well, keystone is the first thing we really need to implement. 14:15:18 <cardeois> Yes 14:15:35 <krotscheck> One thing I'd like to make sure we keep in mind though is that services may not be deployed with keystone, so that auth layer should be optional. 14:15:37 <jprivard> indubitably 14:17:02 <krotscheck> Does anyone want to take a stab at it? Gathrt requirements from this discussion and throw some code at the wall? 14:17:58 <cardeois> I'd like to, but I'm already late with the devstack setup 14:18:36 <krotscheck> Sounds like we don't have resources this coming week to write that code. 14:18:49 * msmol slowly raises his hand 14:18:58 <krotscheck> Wooo! 14:19:46 <msmol> I'll do my best, hopefully either of cardeois or jprivard will be able to lend a hand or two as well, seeing as they're sitting right next to me ;-) 14:19:54 <jprivard> I can 14:20:13 <krotscheck> That actually sounds perfect, three brains can think of more edge cases than one :) 14:20:16 <vkramskikh> so what do we want to do by the next week? simple keystone client? 14:20:32 <msmol> that's my understanding 14:20:32 <krotscheck> msmol: What do you want to commit to by wednesday? 14:21:25 <msmol> I suppose a simple client that can authenticate with keystone and a test or two 14:21:46 <vkramskikh> #action msmol to try to implement a simple keystone client 14:21:50 <krotscheck> ALrightey 14:22:05 <krotscheck> msmol: Thanks for taking this on :) 14:22:14 <vkramskikh> #topic Open discussion 14:22:32 <krotscheck> nodejs6 jobs are currently under review by infra: https://review.openstack.org/#/q/topic:npm_jobs 14:22:34 <msmol> hehe I'll do my best :D 14:22:48 <vkramskikh> does anyone have anything else to discuss? 14:23:00 <cardeois> I have a subject ! How to we mock "fetch" calls for our unit tests? 14:23:17 <cardeois> There is this thing https://www.npmjs.com/package/fetch-mock but didn't try it 14:23:42 <cardeois> However it says it handles node-fetch and the webpack polyfill, so that would be cool to give it a try. 14:23:49 <vkramskikh> cardeois: we're trying out https://github.com/wheresrhys/fetch-mock in fuel: https://review.openstack.org/#/c/338338/ it seems to work fine 14:24:24 <cardeois> Ok cool ! so we could give it a try to 14:24:28 <krotscheck> I have a topic: Has anyone submitted JS-related sessions to Barcelona? 14:24:55 * krotscheck has one titled: "Beyond Horizon: Building custom interfaces with the JavaScript SDK" 14:25:06 <krotscheck> So, yeah, I kinda have to deliver this thing by barcelona ;) 14:25:25 <vkramskikh> :) 14:25:54 <cardeois> haha nice. We'll try to do our best 14:26:36 <vkramskikh> since everyone is here, I'd like to discuss my review request enabling ES2015 rules for the project: https://review.openstack.org/#/c/342228/1/.eslintrc 14:26:58 <vkramskikh> they're needed not to mix ES5 and ES2015 syntax in the library code 14:27:13 <vkramskikh> though I was asked by krotscheck to add these rules to eslint-config-openstack 14:27:17 <krotscheck> I took a look at those, overall my view on those rules are either "meh" or OMG yes we need that. 14:27:45 <vkramskikh> but adding these rules will lead to breaking existing ES5 code - we cannot enforce using arrow functions for ES5 code 14:28:05 <vkramskikh> does anyone have any idea how to deal with such rules? 14:28:43 <cardeois> So if I understand we can either use eslint-config-openstack which is the default for all js project? or override our own? 14:29:08 <vkramskikh> we're using eslint-config-openstack, and adding extra rules 14:29:26 <cardeois> In that case changing the default would be nice, but yeah it will break existing ES5. So is it possible to have ES2015 default in eslint-config-openstack ? 14:29:47 <krotscheck> Well, we have a couple of options. 14:29:48 <cardeois> like "extends: openstack-es2015" instead of "extends: openstack" ? 14:30:02 <krotscheck> .eslintrc can live in different directories and define the rules for all subdirectories 14:30:33 <krotscheck> Secondly, eslint rule packages can have multiple rule sets in them, so eslint-config-openstack could ship with an es2015 rule est. 14:30:54 <krotscheck> I'm partial to the latter. 14:31:01 <cardeois> For the first: But do we want different rules inside our project? 14:31:01 <cardeois> and +1 for second 14:31:07 <vkramskikh> interesting, didn't notice such feature in the docs 14:31:08 * krotscheck thinks the syntax would be extends: openstack:es2015 14:31:12 <krotscheck> (or something like that) 14:31:24 <cardeois> sure 14:31:43 <krotscheck> vkramskikh: eslint itself does that with its default rules, I don't know how easy it is for third-party packages, but I can investigate. 14:32:11 <vkramskikh> I can take care of this since I proposed that review requet 14:32:31 <krotscheck> x``Here we go: http://eslint.org/docs/developer-guide/shareable-configs 14:32:39 <vkramskikh> If I have any obstacles I'll reach you out 14:32:40 <krotscheck> There's a section called "sharing multiple configs. 14:33:12 <vkramskikh> awesome 14:33:39 <vkramskikh> #action vkramskikh to create a review request to eslint-config-openstack with es2015-only rules 14:34:11 <krotscheck> wfm. 14:34:41 <vkramskikh> though I believe this request https://review.openstack.org/#/c/342228/1 still need to be fixed and merged first 14:34:53 <vkramskikh> so people won't start writing ES5 code :) 14:35:02 <krotscheck> :D 14:35:08 <cardeois> I agree 14:35:23 <vkramskikh> any other topics? 14:35:26 <cardeois> We can merge it, and create another review when the es2015 default exists 14:35:33 <krotscheck> +1 14:35:48 * krotscheck thought he had one, but can't remember. 14:36:11 <cardeois> Yeah, I'm working on devstack gate (slowly), any idea how to setup CORS headers globally for devstack? 14:36:54 <cardeois> I can do it for one config (keystone), but don't want to setup one conf for every component we'll talk to in our functional tests (because browsers test need cors) 14:37:50 <krotscheck> cardeois: i have a few thoughts, but myt son jyust went ballistic. rain check? 14:38:47 <jprivard> son > us 14:39:07 <krotscheck> thanks 14:39:12 * krotscheck tags out 14:39:35 <krotscheck> #action krotscheck talk to cardeois about cors 14:40:00 <cardeois> cool, we could talk about that in #openstack-javascript later 14:41:57 <msmol> anyone have anything else they want to discuss? 14:42:07 <jprivard> not on my side 14:42:17 <cardeois> me neither 14:42:28 <vkramskikh> fine, if there are any other topics left, let's continue in #openstack-javascript 14:42:33 <vkramskikh> #endmeeting