16:00:30 #startmeeting api wg 16:00:36 Meeting started Thu Dec 18 16:00:30 2014 UTC and is due to finish in 60 minutes. The chair is etoews. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:37 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:39 The meeting name has been set to 'api_wg' 16:00:42 o/ 16:00:47 o/ 16:00:52 \o/ 16:00:55 o/ 16:00:57 o/ 16:01:06 seasons greetings :) 16:01:30 #topic agenda 16:01:33 I season my greetings lightly but that's personal taste 16:01:39 #link https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 16:01:40 lol 16:02:09 #topic api definition formats 16:02:27 swagger go-go 16:02:29 elmiko: was it you that brought this up at the end of the last meeting? 16:02:32 yea 16:02:40 swagger a go-go 16:02:50 mainly in the guise of creating a swagger generator for sahara 16:03:01 guises are good 16:03:09 can you share that link again? 16:03:10 the larger effort i was getting at was trying to generate something for the api-ref website 16:03:22 that is a larger effort 16:03:25 but worthwhile 16:03:29 #link https://github.com/elmiko/sahara-doc 16:03:46 it's pretty basic so far, but generates the minimum required doc for swagger2.0 16:04:08 do you have the generated doc somewhere? 16:04:19 1sec, i can make one 16:04:35 sure then gist or paste or whatever 16:04:52 so let's discuss the more general issue 16:05:06 http://paste.openstack.org/show/152783/ 16:05:40 i'm totally in favour of having api definition formats a thing that the api wg advocates for. that is to say, i think it's in scope for us. thoughts? 16:05:56 ++ 16:05:56 total agreement from me 16:06:06 yes please 16:06:14 etoews: agreed 16:06:29 ++ 16:06:44 alright. i need to update the scope section of the wiki page anyway. 16:07:05 #action etoews update the scope section of the wiki page and include api definition format 16:07:46 at the moment i'm totally undecided on which one we should recommend or even if we should recommend one. 16:08:14 if we are going to have them all on api-ref we need to at least provide a set of formats that are acceptable 16:08:26 is it better to just say we recommend an api def format, here are some examples. 16:08:39 wadl is ok, if you like xml. but i'm finding swagger pretty easy to work with. 16:08:54 so here's another thing 16:09:01 also it has some nice overlap with jsonschema stuff 16:09:13 Is swagger integrated with sphinx somehow? 16:09:26 Or any other tool> 16:09:26 isviridov: that's a good question 16:09:34 one of the reasons i think wadl wasn't as useful as it could have been was because it was used as a documentation format. 16:09:52 we don't need documentation. we need definition. 16:10:03 we need the projects to own these definition files. 16:10:19 the defs should be the contract between client and server 16:10:33 but it would be great to generate some documentation from definition in already adopted format. I mean sphinx 16:10:45 isviridov: +1 16:11:24 so rather than having api-ref be the place where these defs live 16:11:34 I worked on a ruby project that used json schema to enforce a contract on a live server between client and server code 16:11:35 the defs live in the individual projects 16:11:51 and api-ref makes use of them 16:11:53 etoews: would the idea be that api-ref would pull from the projects? 16:12:00 I have a case-study up that we can look to as a reference for architecture if we're interested in something like that 16:12:04 elmiko: something like that 16:12:15 sigmavirus24: post a link! 16:12:22 sigmavirus24: yes. that's the direction we need to go. 16:12:29 #link https://github.com/bendyworks/caravan 16:12:41 I had thought of doing a case-study app with flask for simplicity but never got around to it 16:12:41 otherwise it's just another doc format that lags behind what the def actually is 16:12:54 I let my former employer publish it a few weeks ago for reasons like this :P 16:12:58 isviridov: do you have much familiarity with swagger? 16:13:08 stevelle not yet 16:13:26 #link https://github.com/swagger-api 16:13:28 fyi 16:13:36 i talked to the barbican folks about adopting a model like this. api def first dev. 16:13:41 they were open to the idea 16:13:48 elmiko thx 16:13:49 isviridov: swagger has tools to publish good human-readable documentation 16:13:50 but didn't have dev time to commit to it 16:14:16 stevelle I see 16:14:45 if we could help projects bootstrap their api def efforts, that might be one way to make it stick. 16:15:15 we would also want to demonstrate the benefits the project gained from adopting an api def 16:15:53 one thing i should mention is that this ruby project also used the API definition files to test/build clients and would probably be awesome to have something similar for openstack APIs 16:16:22 sigmavirus24: you're reading my mind 16:16:42 does anybody have the time to create a swagger def for barbican? 16:17:02 i wouldn't have time for it until next year but am willing to do it 16:17:07 etoews: i've been looking into barb, i could take a pass at it 16:17:42 elmiko: have you seen the barb api "docs" 16:17:49 etoews: yes 16:17:59 etoews: "docs" 16:18:02 lol 16:18:05 etoews: i might go through their pecan impl to pull out the swagger spec though 16:18:14 some wiki page somewhere. 16:18:20 _goes off to find link_ 16:18:28 i believe it's still under the cloudkeep stuff 16:18:50 #link https://github.com/cloudkeep/barbican/wiki/Application-Programming-Interface 16:19:05 the "docs" aren't sooooo bad :) 16:19:19 there are worse 16:19:23 oh etoews the other thing is that this format allowed for microversioning 16:19:25 their definitely workable, but non-ideal 16:19:47 sigmavirus24: "this format" == ?? 16:19:59 *the ruby project I referenced earlier 16:21:03 sigmavirus24: which is the api def format file in that project? 16:21:24 * sigmavirus24 goes to get a link 16:21:38 etoews: if i generate something for barb, should i just toss it on github? 16:21:44 https://github.com/bendyworks/caravan/blob/master/lib/endpoint_definitions/users/user.yml etoews 16:22:06 given how sinatra/rack work, the params in the URL are also documented in teh format so it's not just request/response body 16:22:30 elmiko: yes. at that point we can take it to the ml and see what barbican thinks. 16:22:36 etoews: cool 16:23:12 #action elmiko to generate swagger doc for barbican and commit to github somewhere 16:23:58 sigmavirus24: i that it that's a format defined by the framework? 16:24:18 etoews: interpol is the library there 16:24:21 we don't have to follow it to the T 16:24:29 but interpol is just using jsonschema under the covers 16:24:31 "Interpol is an open source toolkit for policing your HTTP JSON interface maintained by Moz. It uses YAML files with definitions of the expected request and the promised response. These are called endpoint definitions. Caravan uses Interpol to enforce a contract with the consumer of the JSON interface." 16:24:44 #link https://github.com/bendyworks/caravan#interpol-endpoint-validation 16:24:50 interesting. 16:25:18 i think we'd want to go with a more broadly known/accepted format moving forward though 16:25:22 yeah 16:25:31 but the behaviour is what I care about personally 16:25:36 right 16:25:43 it's just a concrete example 16:25:49 i particularly like "policing your HTTP JSON interface" 16:25:59 It's a strategy used by moz.com and it works really reallly well for them 16:26:11 such things require much policing 16:26:16 I'm not sure how much of their architecture I can talk about though =P 16:26:41 understood. thanks for the concrete example though. 16:26:51 you're quite welcome 16:27:15 what actually might be really helpful is if you could elaborate on the real benefits moz saw from adopting an api def. 16:27:35 we should discuss this on the ml 16:27:39 I'll write up a document to that effect 16:27:43 more viz 16:27:44 Action item forme? 16:27:48 i think another question about these generated formats is how much do we want to talk about generating the base reference, and then hand tailoring with custom info(e.g. descriptions)? 16:27:52 s/forme/for me/ 16:28:19 sigmavirus24: as in starting the discussion on the ml or just documenting benefits. 16:28:33 hmmmm...the benefits could be a reply to the discussion 16:29:10 elmiko: that's a good point. i'm not sure. 16:29:31 my understanding is that the wadl present on api-ref is a mix of auto-generate and handhack 16:29:32 if these formats are maintained by the projects themselves, it might be too much of a burden for them. 16:29:40 etoews: roger that 16:30:01 at least initially. 16:30:33 sigmavirus24: okay. i'll kick off a discussion and if you could reply with the benefits that would be really helpful. 16:30:39 etoews: would be awesome to see some sort of oslo package that could help with the generation 16:30:44 etoews: will do 16:30:56 #action etoews start discussion about api def formats on ml 16:31:25 #action sigmavirus24 reply to discussion with benefits moz saw from using an api def format 16:31:45 elmiko: i hadn't considered that. that could work. 16:32:11 i'm just thinking about how we could create something that would help the projects maintain their refs 16:32:29 elmiko: are you thinking generate the api def formats from the code using an oslo package? 16:32:44 etoews: not completely, but something to help. 16:32:54 many frameworks have decorators or the like to help with generating swagger docs. 16:32:58 we have enough different wsgi impls that we probably can't have a single package to generate 16:33:03 pecan doesn't, though 16:33:13 stevelle: yea... =( 16:33:26 nice thing about swagger though, is that json is easy to generate from python 16:33:56 this is all good fodder for a discussion on the ml 16:34:03 etoews: agreed 16:34:07 we should move on 16:34:46 #topic previous meeting action items 16:34:53 #link http://eavesdrop.openstack.org/meetings/api_wg/2014/api_wg.2014-12-11-00.00.html 16:35:26 hmmmm...i don't think miguelgrinberg or ycombinator are around 16:36:05 miguelgrinberg: might show up late 16:36:12 but he may also just not show up 16:37:24 gotcha. i do see he started a metadata guideline. 16:37:26 #link https://review.openstack.org/#/c/141229/ 16:37:50 so something i think we need to start doing more of is this. 16:38:39 #1 under #link https://wiki.openstack.org/wiki/API_Working_Group#Deliverables 16:38:58 analyze current design 16:39:19 yep 16:39:39 i don't want the wg to act like we're creating guidelines in a vacuum. 16:39:44 there was another review I looked at yesterday, on addressing collections, that also did that. 16:39:52 yep. 16:39:57 etoews: +1 16:40:35 okay. i'm going to make a point about that on the ml. 16:40:55 i have a feeling like it might uncover some gremlins 16:41:48 are we striving for a good enough design that's consistent or are we striving for an ideal like hateoas? 16:41:57 *ducks* 16:42:03 etoews: why not both? 16:42:03 =P 16:42:04 lol 16:42:08 pragmatic 16:42:29 pragmatic with a hint of idealism is what I've been thinking of personally 16:42:42 anyway, i just suspect that might fall out of such a discussion. 16:42:53 i might be over thinking it though. 16:43:10 sigmavirus24: +1 16:43:26 #action etoews start discussion on ml about doing more analysis of current design and not creating guidelines in a vacuum 16:43:35 a light scent of idealism should be detected :) 16:43:52 +1 for more analysis of current state 16:44:18 annegent_ has joined the game 16:44:40 put me in, coach! 16:44:43 back on prev action items. 16:45:17 i pinged jaypipes about merging some of the guidelines. he merged the infra ones and commented on others. 16:45:58 not much time left. 16:46:01 #topic APIImpact 16:46:06 #link https://review.openstack.org/#/q/status:open+AND+(message:ApiImpact+OR+message:APIImpact),n,z 16:46:18 blerg. anything we can discuss in 5 min? 16:47:01 https://review.openstack.org/139775 should be simple enough 16:47:05 also it's mine =P 16:47:26 that's fair. :) 16:47:46 glance supports downloading images in chunks (only when using the filesystem as a store) but doesn't return 206 when it responds properly. the problem is that every other storage device doesn't respect it 16:48:15 so it needs to change so that it returns the proper status code but can also simultaneously support the operation properly so there are some changes in the pipeline for that 16:49:08 It has APIImpact in the sense we're changing status codes midstream and I'm not convinced it's a good idea even if it's the right thing =P 16:49:57 I think our guidance generally was the guidelines can be applied to current API definitions but are meant for future designs. 16:50:31 from the patches i can't tell what the status code was originally 16:50:36 200 16:50:55 Which is correct when downloading the entire image at once 16:51:11 is that even remotely practical? 16:51:22 (download the entire image at once) 16:51:25 ¯\_(ツ)_/¯ 16:51:55 on 10G sure 16:52:04 lol 16:52:06 ha 16:52:11 this is probably off-topic at this moment 16:52:26 i don't think so 16:52:49 a 206 seems perfectly reasonable 16:52:53 I mean, an 8gb image would take around 8 seconds on a 10gigabit link 16:52:56 or necessary really 16:53:30 ryansb: assuming the network is reliable. ;) 16:53:31 etoews: yeah. 16:53:46 I meant the practicality of downloading the entire image is probably out of scope for discussion 16:53:59 ah yes. my tangent. 16:54:04 oops 16:54:20 but yeah, this makes me wonder if we should be defining all status codes (like usage of 206) in the WG too 16:54:28 we've had enough yaks shaved over 201/204 on creation and such 16:54:36 i think so 16:55:08 if there had been a guideline for something like this in the first place the proper status code might have even gotten used! 16:55:25 heh 16:55:34 there is a guideline... it's RFC 7233 16:55:36 =P 16:55:53 even in the case of the 201/204 discussion, we should document that even if no clear reccommendation is made to attempt to at least short-circuit the next time that discussion arises 16:56:02 5 min left. i think we'll have to skip the guidelines topic. 16:56:06 dtroyer: +1 16:56:10 dtroyer: +1 16:56:35 we can also think of the guidelines as providing mental heuristics for others. 16:56:39 it's tough work, especially getting a consensus, but very valuable to at least have a guide for response codes 16:56:50 #topic open topics 16:57:16 i'm assuming we're canceling next week's meeting. ;) 16:57:31 makes sense 16:57:32 +1 that 16:57:32 should probably cancel the week after too. 16:57:50 yeah 16:58:08 so cancel dec. 24 and jan. 1. 16:58:34 anything else anybody wants to fire off in 2 min or less? 16:58:48 happy holidays? 16:59:00 happy holidays 16:59:04 +1 16:59:04 enjoy the two week break? 16:59:08 (note the lack of question mark) 16:59:18 that's why i plus oned ;) 16:59:28 :D 16:59:46 awesome. thanks everyone! 16:59:58 cheers! 17:00:05 thanks etoews 17:00:15 cheers! 17:00:17 have fun all! 17:00:17 #endmeeting