16:01:08 #startmeeting api wg 16:01:10 Meeting started Thu May 7 16:01:08 2015 UTC and is due to finish in 60 minutes. The chair is etoews. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:01:11 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:01:13 The meeting name has been set to 'api_wg' 16:01:22 yo/ 16:01:25 bye 16:01:27 sound off if you're here for api wg 16:01:33 o/ 16:01:36 o/ 16:01:54 o/ 16:01:55 welcome alex_xu! 16:02:01 etoews: thanks :) 16:02:46 hi 16:02:48 o/ 16:03:02 excellent 16:03:11 #topic agenda 16:03:18 #link https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 16:03:36 #topic previous meeting action items 16:04:07 hmmm...not the right link in the wiki. 1 sec. 16:04:43 hi guys, sorry for being late. 16:04:44 #link http://eavesdrop.openstack.org/meetings/api_wg/2015/api_wg.2015-04-30-00.01.html 16:04:50 np 16:04:53 jaypipes: I'm later =P 16:05:01 :) 16:05:11 i missed last week so i'm the latest there is 16:05:21 so, i put the evaluating api changes up as a guideline for review, #link https://review.openstack.org/#/c/180612/ 16:05:30 getting good comments so far 16:05:49 that was my action item from 2 weeks ago 16:05:59 ah 16:06:00 and jaypipes i responded to your comments =) 16:06:23 i haven't had a chance to look at that one yet. thx for getting to it. 16:06:33 np, i hope it ends up working out 16:06:58 o/ 16:07:11 I like the move towards microversion rather than extension 16:07:29 yep. the knives are out for extensions. 16:08:13 i will change the language to mention microversions instead of extensions in the next version, i wanted to leave it open for more comments before revising though. 16:08:33 makes sense 16:08:49 so, I am also commenting inline, but in order to point out inadequate documentation, we need to define adequate. 16:09:02 I can take a stab at it if you like I have some ideas/background in this. 16:09:17 sure! any help would be appreciated =) 16:09:19 where would that "adequacy" go? 16:09:27 in a new guideline? 16:09:47 "some ideas/background in this" ...snort...that's putting it mildly. 16:10:04 etoews: snort 16:10:09 hmm, would a guideline about creating documentation be appropriate? i'm not sure 16:10:25 elmiko: ty sir! will respond again soon. sorry, meeting day today. 16:10:38 jaypipes: np, you made some great suggestions 16:10:58 elmiko: I should probably write "these are the current expectations for docs" in an API WG guideline 16:11:10 annegentle: yea, that makes sense 16:11:18 elmiko: ok, I'll take that on 16:12:04 so just to be clear about it. we're saying that api docs are in scope for the api wg. 16:12:26 sounds like it 16:12:35 or maybe it's recommendations about api docs are in scope? 16:12:51 i'm more comfortable with that statement 16:12:59 I'd think yeah recommendations 16:13:21 etoews: guidelines are in scope 16:13:27 ya. and i do think it's something we should have an opinion on. 16:13:29 etoews: I think. Yeah, recommendations 16:13:37 etoews: at least to let the WG do reviews 16:13:52 in the current state of the art, apis and api docs are highly coupled. 16:13:56 etoews: and I plan to be general, not to the tool level 16:14:12 annegentle: sgtm 16:14:16 etoews: cool 16:14:35 this could have wider impact with the whole autogen doc thingie that going on currently 16:14:53 elmiko: yeah it really is "while I'm workign with teams on that, might as well write guidelines" 16:15:01 annegentle: +1 16:15:02 right. we'll have to feel our way through this one. 16:15:07 true dat 16:15:28 I've reached out to the Image team to see if they'd be interested in proof-of-concept. their API is still smallish 16:16:07 though it took 7 months to get metadata definitions documented :) https://review.openstack.org/#/c/121248/ 16:16:30 that's like overnight in openstack time 16:16:33 etoews: LOL 16:16:36 lol 16:17:14 so we kind of veered into the next topic with these action items. 16:17:17 #topic API Reference information 16:17:21 ya! 16:17:33 #link http://libertydesignsummit.sched.org/event/29e7d4effc10832b4d6aa50339e0c973#.VUuJ6dNViko 16:17:34 #link https://review.openstack.org/#/c/177934/ 16:17:49 that's the session also, didn't get that added to the agenda 16:17:54 (in time) 16:18:20 So I'm making progress and drafted again, also had a question from Celiometer dev ildiko about openstack versions v microversions 16:18:49 #link http://lists.openstack.org/pipermail/openstack-docs/2015-May/006560.html 16:19:14 So I wanted to ask here: does it make sense to "lag" the OpenStack release with Dev Guides targeted for a particular release? 16:19:21 As in, now we'd work on a Dev Guide for Kilo 16:19:51 what's in scope for "dev guides" 16:20:49 So, the idea is to scrape code ONLY for params, errors, headers, and put that info into a Swagger 2.0 spec. Then build Dev Guides around that API ref info -- so that the experience feels like crafted docs, not roboted docs. 16:21:24 The vision is a nicer information experience for developer.openstack.org rather than "just" an API reference. 16:21:46 that sounds cool 16:21:47 is that amenable? I share etoews concerns about utter crappiness. 16:21:56 as in, any time you automate it sucks for the user. 16:22:09 and yeah, i think doing it for kilo makes some amount of sense 16:22:20 moving the reviews to the teams and hand-in-hand with WG guidelines for docs feels like it's the right direction. 16:22:42 also relevant #link http://lists.openstack.org/pipermail/openstack-docs/2015-April/006502.html 16:22:43 the only part that gives me pause is that we'd be backporting strings to stable/kilo potentially... across multiple repos. 16:22:46 although, i also like the idea of the projects being able to autogen some part of the doc for themselves 16:22:47 It's scary right. 16:23:20 Also, check out this automation starting point 16:23:21 #link https://review.openstack.org/#/c/179051/ 16:23:34 I really need eyes on that ^^ as a potential solution 16:23:46 for the scrape 16:23:48 and generate 16:25:44 annegentle: so that patch uses some python to generate swagger from the python api source code? 16:25:44 heh I gave you all too much to read 16:25:48 etoews: yes 16:25:51 annegentle: i looked at that the other day, would the idea be that each project provides a function that will get called by external tools? 16:26:05 elmiko: possibly in oslo like we do for the configuration reference currently 16:26:16 annegentle: cool, that's nice 16:26:19 There was some discussion a while ago about being able to pecan -> swagger and it faltered becasue pecan makes it rather hard 16:26:28 cdent: yeah 16:26:41 cdent: I want to say ceilometer does pecan > WADL now 16:26:45 cdent: i did some work on a markup package to generate swagger from pecan 16:26:45 I think it's generally a good idea and if it drives us to use more readable frameworks then all the better 16:27:04 elmiko: how'd that go? say more. :) 16:27:06 and if this works reasonably well in nailgun (whatever that is) it could potentially be rolled out to other projects via oslo? 16:27:13 #link https://github.com/elmiko/pecan-swagger 16:27:19 elmiko: yeah, I think that's what I'm remembering. You were unable to do it by inspection though, right? 16:27:27 etoews: maybe? Stackforge licensing doesn't exactly make it straightforward but I'm investigating 16:27:36 it's a poc currently, but you need to add a little markup to the controller classes to help inform the hierarchy for swagger 16:27:39 etoews: I need to talk to a few people 16:27:56 elmiko: how many projects use pecan now? 16:27:58 cdent: correct, pecan doesn't carry any information about the ordering of it's controllers 16:28:15 annegentle: not sure on exact numbers, but i know of 2 16:28:27 elmiko: ok, ceilometer and which? 16:28:31 barbican 16:28:34 (I have a hard stop in 2 mins) 16:28:35 ok 16:28:49 I'm really wanting to get it right for "core compute" first tbh 16:28:56 have to prioritize 16:29:08 annegentle: so what are the action items here before you go? 16:29:09 i did a test for barbican swagger and sahara swagger in #link https://github.com/elmiko/os-swagger-docs 16:29:21 monty posted a list of all the pecan using projects to os-dev recently 16:29:27 cdent: yeah 16:29:30 same as last week. ;) 16:29:35 aug, sorry I have to get going :) 16:29:38 np 16:29:41 thanks everyone 16:29:44 * cdent wave 16:29:45 s 16:29:45 see you in Vancouver :) 16:29:48 annegentle: later 16:29:55 see you 16:30:20 #action all: comment on https://review.openstack.org/#/c/177934/ 16:30:43 #action all: comment on https://review.openstack.org/#/c/179051/ 16:30:51 i'm less sure about that one ^ 16:31:19 i like the idea of each project having a standard entry point that some external tool can use to harvest the swagger 16:32:07 yes. machine readable api doc would be nice. 16:32:19 lots of good use cases for that. 16:32:22 #topic summit sessions galore 16:32:46 #link https://libertydesignsummit.sched.org/event/e14d84514003140fe30e984027299a44 16:32:46 #link https://openstacksummitmay2015vancouver.sched.org/event/c61ab30c4547a6c70612017e43cd6076 16:32:46 #link https://openstacksummitmay2015vancouver.sched.org/event/0b86e7b3b74c44705d46dc1694272d63 16:33:36 so we hit the jackpot on summit sessions. we'll be a busy bunch. i suppose that's a good problem to have. 16:34:07 lol, so many sched conflicts 16:34:10 this must be a huge convention center, lots of people have surplus sessions 16:34:17 i'd ask that everybody make a real effort to at least get to https://libertydesignsummit.sched.org/event/e14d84514003140fe30e984027299a44 16:34:28 that will be the most high profile session 16:35:25 i'll do my best to do a good "where we were, where we are, and where we're going" but naturally i'll need help 16:35:35 nice 16:36:01 then the other 2 sessions i see as being working sessions for us 16:36:47 if we can actually get some work done, great. if not, that's okay too. 16:37:27 does anybody want to highlight any other api wg related sessions at the summit? 16:37:27 maybe we can arg^H^H^Hdiscuss some of the open reviews ;) 16:37:40 elmiko: exactly 16:37:46 define: API 16:37:53 and fight 16:37:54 lol 16:37:57 :troll: 16:38:05 :) 16:38:19 define: pragmatic 16:38:25 ouch... 16:38:27 snap! 16:38:34 cdent: oh great. now you've got me doing it. 16:39:31 actually you and dkranz's comments on that thread yesterday helped clarify or explain some cognitive dissonance I've been experiencing in some of my api-wg interactions 16:39:32 miguelgrinberg and i are doing a api wg related session #link http://libertydesignsummit.sched.org/event/602a2acdca6f546cef89dc0c4356e3d8#.VUuVL9pViko 16:39:56 cdent: say more 16:39:58 etoews: that one looks cool 16:40:07 jaypipes and I have this: https://libertydesignsummit.sched.org/event/bf6f86afe58148a96ab9d1dd0d30a554 16:40:21 cdent: that looked nice too 16:40:24 I'll be demo-ing gabbi which makes life easier 16:40:26 which I still owe cdent slides on... coming soon! damn $work 16:40:46 ha! i owe miguelgrinberg slides 16:41:13 etoews: on the cognitive dissonance? I had thought that a notional API already exists sort of in the ether and we were intentionally trying to create resource oriented http apis (and guidelines for such things) 16:41:17 etoews: we can wing it :) 16:41:35 the comments made it clear that at least some people have a different approach (which is expected and fine, I just hadn't crystallized the difference) 16:42:03 cdent: ah 16:42:13 cdent: i also really liked your response to "Changing 403 Forbidden to 400" on os-dev 16:42:35 (╯°□°)╯︵ ┻━┻ 16:42:38 yea, that post definitely made me more confused about which was more correct lol 16:42:44 etoews: yes! 16:43:05 we looked around and it seems that 403 is common out there in web land for such things 16:43:16 but that doesn't really address the underlying issue about dealing with ambiguity 16:43:21 which is a _hard_ problem 16:43:29 cdent: i know what elmiko means. the email could have used a "and i recommend X in particular" 16:43:56 You didn't take away that I still think 403 is right? 16:44:26 cdent: i did. but i was starting to think 400 sounded proper, then you blew me out of the water. now i'm not sure 16:44:27 that was my impression but it wasn't stated explicitly...or was it? 16:45:02 let's move on in a minute 16:45:04 i do like the idea of being able to have better categorization using the 4XX codes 16:45:24 etoews: cool, i have a guideline related topic too 16:45:35 #topic guidelines 16:45:44 \o/ 16:46:08 so, woodster_ from the barbican team had brought up some questions about proper usage of POST/PUT for doing creation and updating 16:46:15 have we started a guideline for this yet? 16:46:19 also, woodster_ ^^ 16:46:20 elmiko: ha, thanks for bring that up 16:46:28 ;) 16:46:46 I hadn't seen guidance on the proper usage of POST vs PUT 16:47:10 this is another one of those topics with years of discussion and rules of thumb that seem to move around a lot 16:47:21 i thought the prevailing guidance was use POST for creation PUT for update, but apparently keystone has a situation where PUT is used for creation. (did i get that correct woodster_ ?) 16:47:22 I'd always thought POST was creational, and PUT was replacement. PATCH was a delta change to an existing resource 16:47:37 right. so let's set the rule of thumb for openstack. 16:47:38 elmiko: that's correct 16:47:47 etoews: please =) 16:48:05 the rule of thumb I use is: if you are creating and you don't know already what the resulting URI is, they you POST 16:48:09 otherwise you PUT 16:48:28 +1 that's how I do it 16:48:35 so for the vast majority of situations in openstack I would think POST for create because id's are generated on the backend 16:48:35 cdent: that was my thinking as well 16:48:42 cdent: yes 16:48:54 ++ 16:49:04 my rule is a little different from what cdent stated 16:49:07 i think the case if Keystone you are talking about we knows the uri and don't care if something is there or not 16:49:22 wow, that was easier than expected :) 16:49:25 mostly the same result but different point of inflection 16:49:33 dstanek: that was the one that changes the password for an existing user, correct? 16:49:41 Well, can I ask a followup question? 16:50:00 of course 16:50:06 miguelgrinberg: I believe so 16:50:07 miguelgrinberg: i was thinking about some of the assignment stuff - i'd have to look at password 16:50:08 So let's say you POST to create a thing, is the appropriate response either a 201, or a 300 Here's-where-the-thing-with-the-new-id is? 16:50:26 201 with a location header 16:50:34 that we have a guideline for! 16:50:39 Oh good! 16:50:43 * krotscheck goes away now :) 16:50:54 sounds like we need an action item for a POST/PUT guideline? 16:51:10 krotscheck: #link http://specs.openstack.org/openstack/api-wg/guidelines/http.html#xx-success-codes 16:51:18 I'll take that action if nobody else wants it 16:51:19 dstanek: this http://docs.openstack.org/developer/keystone/api_curl_examples.html#post-v3-users-user-id-password 16:51:35 * krotscheck thinks redirect is more "REST pure", but vastly prefers not adding additional HTTP noise. 16:51:44 dstanek: it's a pretty odd one, as it requires the old password, even though you must authenticate to have access 16:51:48 cdent: sounds good to me =) 16:51:51 krotscheck: pragmatic :) 16:52:01 lol 16:52:18 so if the URI is known, then a PUT is a better approach? 16:52:30 etoews: I've written one too many browser clients to be a purist :) 16:52:40 if your representation is complete and accurate, including the URI then PUT is correct 16:52:42 #action cdent: create a POST/PUT guideline 16:52:45 krotscheck: the problem with a redirect is that browers (inc js in browsers) will follow the redirect and the vast amount of time you dont' want to 16:52:50 thanks etoews 16:53:17 any generated properties would recommend POST, not just ID 16:53:22 miguelgrinberg: ah yes, that's a post because we are not actually replacing a resource, but rather doing some processing 16:53:59 cdent: i'm not sure if it's a totally new guideline and should use elmiko's template #link http://specs.openstack.org/openstack/api-wg/template.html or if it's an update to an existing page. 16:54:04 We have added access control lists to our entities, so we would expose a resource like this to modify the ACL (for example): /secrets/{UUID}/acl Then it sounds like we can just PUT to that URI 16:54:17 maybe it depends in part on how complicated/hairy it gets 16:54:25 woodster_: +1 16:54:37 I'll adapt and be pragmatic etoews ;) 16:54:39 woodster_: you just said it, you are modifying, not creating, so PUT is right 16:54:43 :) 16:55:01 nice! Thanks for the guidance then folks 16:55:43 woodster_: thanks for reaching out to us! 16:55:56 5 min left 16:56:04 just question, if we have sub-error-code in the future, whether the client still depend on the status code? 16:56:44 in that case i expect the status code becomes a "top level filter" for clients 16:57:14 alex_xu: you would then group the sub-error codes and return them under the parent status code that makes more sense 16:57:27 then perhaps some real action can be taken based on the sub-error-code 16:57:42 for example, under 400 you can have an error code for missing arg, another for invalid arg, etc. 16:57:48 ya 16:57:54 that's how i see it too 16:58:08 ah, I see, that sounds make sense, group some process for kind of errors 16:58:18 right 16:58:30 i won't be able to make it to the meeting next week 16:59:01 miguelgrinberg etoews, thanks 16:59:24 etoews: ack, i should be around 16:59:31 thx elmiko! 16:59:49 i love the api-wg after hours meetings ;) 17:00:01 they seem very relaxed ;) 17:00:05 heh 17:00:19 see some/all? of you at the summit! 17:00:19 * cdent looks at the clock 17:00:21 #endmeeting