00:08:11 #startmeeting api wg 00:08:12 Meeting started Thu Nov 13 00:08:11 2014 UTC and is due to finish in 60 minutes. The chair is ycombinator_. Information about MeetBot at http://wiki.debian.org/MeetBot. 00:08:13 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 00:08:15 The meeting name has been set to 'api_wg' 00:08:39 #topic roll call 00:08:47 Shaunak Kashyap, Rackspace 00:10:15 Ian Cordasco, Rackspace 00:10:43 * sigmavirus24 looks at miguelgrinberg 00:10:51 Miguel Grinberg, Rackspace (heh) 00:10:58 #topic agenda 00:11:01 https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 00:11:15 actually I think that should be #link https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 00:11:46 I think the first topic would be "Summit Review" anyway 00:12:02 #topic summit review 00:12:14 @sigmavirus24, @miguelgrinberg were either of you at the summit? 00:12:24 No 00:12:25 I don't think either of us were, no 00:12:56 okay, should we skip to the next topic then? 00:13:17 was there any related discussions in Paris? 00:13:33 I wasn't at the summit either so I can't say 00:13:33 miguelgrinberg: judging by the etherpad, yes 00:13:38 https://etherpad.openstack.org/p/kilo-crossproject-api-wg 00:13:46 thanks @sigmavirus24 00:14:16 maybe we push it for later when others that were there join? 00:14:32 sounds good to me 00:14:58 #topic additional meeting time 00:14:59 https://review.openstack.org/#/c/132668/ 00:15:10 Looks like it was already accepted 00:15:34 yeah, its on the agenda but I think its already done 00:15:36 So next week's meeting will be 4 hours earlier :) 00:15:48 e 8 hours 00:15:55 * sigmavirus24 keeps thinking it's 2000 utc still 00:16:02 yeah, it's 8 I think 00:16:17 yeah 8 hours earlier 00:16:19 8am for me :-( 00:16:43 hold on, won't it be 16 hours later? 00:17:11 don't listen to me about timezones 00:17:31 it's 8 hours earlier time of day, but it is the next day, so yes, 16 hours later 00:17:37 haha, ok 00:17:49 moving to next item in agenda :) 00:18:03 #topic wiki page updates 00:18:06 #link https://wiki.openstack.org/wiki/API_Working_Group 00:18:43 I'm not sure what there is to do on this one 00:18:46 do either of you know? 00:19:16 maybe review this? I don't know, looks pretty good to me 00:20:14 yeah it's much fuller than it used to be 00:20:24 Looks a lot better than it did pre-summit 00:20:36 yeah, I don't have anything to add on this item 00:21:01 #topic APIImpact flag 00:21:09 #link https://review.openstack.org/#/q/status:open+AND+(message:ApiImpact+OR+message:APIImpact),n,z 00:21:31 for these, maybe we can go through the -1 and -2 reviews? 00:22:04 #link https://review.openstack.org/#/c/132342/ 00:22:09 I think we can do that after the meeting 00:22:31 It looks like most of them are cyeoh and etoews adding requirements for APIImpact to projects 00:23:45 yeah, most of them appear to be just that 00:24:16 I don't see much to comment on either 00:25:55 okay... moving on then 00:26:09 #topic review 201-header-and-body 00:26:15 https://review.openstack.org/#/c/133087/ 00:26:18 #link https://review.openstack.org/#/c/133087/ 00:27:11 So I agree with cyeoh's most recent feedback that async operations should be 202. 202 best fits that case 00:27:37 I have provided as much justification I could find for not requiring a body (i.e making it a recommendation, but optional) 00:27:38 Otherwise, I agree with miguelgrinberg about representations being optional 00:28:06 If we can get etoews to address those concerns I think we'll have something that everyone but Sam will approve 00:28:06 if the representation is optional, shouldn't the response code be 204, then? 00:28:21 I'm also in agreement with cyeoh 00:28:21 ycombinator_: 204s shouldn't be used for creates semantically 00:28:42 There are APIs which also return a short representation of the resource instead of returning nothing 00:28:43 right, I agree with 201 for synchronous create and 202 for asynch create 00:29:06 201s don't require a body, just a 0 Content-Length if there is no body 00:29:07 but if we don't return any representation, are we required to use 204/ 00:29:14 No 00:29:23 I would say no to the 204, it's too odd 00:29:33 Just like right now when methods for a route aren't defined, we return a 404 instead of the proper 405 00:29:34 I prefer a 201 with empty body 00:29:59 405 would be the canonical response to something like that (and something every framework gives us for free) but we don't do it 00:30:02 ok, if 201 with empty body is acceptable by spec, that makes sense to me for synch creation 00:30:21 So I mean, we can define OS-REST but I'd really rather not have something that is our own standard *just because* 00:30:31 201 explicitly signals "created" 00:30:39 which is the information we want to know. 00:30:49 right, 204 does not confirm creation 00:30:50 204 is typically tied to "no content" which is terribly ambiguous 00:31:13 plus, I have never seen 204 tied to a location header 00:31:21 ditto 00:31:30 I have seen 201 and 202 w/location header, that is pretty standard 00:31:38 yeah, me too 00:31:48 but I've also never seen a 201/202 without a body 00:32:03 all that said, I can't find anything in the HTTP spec that says a 201 must have a body 00:32:13 You won't because it doesn't have to have a body 00:32:28 :) 00:32:42 right, so I'm down with 201 for synch creation and 202 for asynch creation (with or without body) 00:32:53 so what's the next step here? :) 00:33:06 location header mandatory or optional? 00:33:19 if it is optional, then that means that it is somewhere in the body 00:33:26 which can be confusing 00:33:30 I'd say mandatory, even if the link is in the body 00:33:34 rather, the link in the body is optional 00:33:36 +1 00:33:39 +1 00:33:44 but having the location header makes it uniform 00:33:49 even for the 202 00:34:00 though for a 202 it may not be a resource link 00:34:10 it can be a get-status link for a resource that doesn't exist yet 00:34:14 mhm 00:34:18 +1 00:34:22 you may not know the resource link 00:34:24 +1 00:35:01 so should someone take over this patchset and amend it with what's been discussed here? 00:35:09 yes, I can do that 00:35:16 to confirm, I captured two things: 00:35:34 1. synchronous creation should respond with 201, asynchronous with 202; body is optional 00:35:56 2. in either synchronous or asynchronous creation, there must be a location header 00:35:59 correct? 00:36:09 looks good to me 00:36:11 #action ycombinator_ will update https://review.openstack.org/#/c/133087/ with 1. synchronous creation should respond with 201, asynchronous with 202; body is optional and 2. in either synchronous or asynchronous creation, there must be a location header 00:36:18 thanks @sigmavirus24 00:36:27 you're welcome I constructed it as you spoke :) 00:36:30 moving to next item 00:36:43 #topic reviews 00:36:47 #link https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z 00:37:14 So I'd like to discuss https://review.openstack.org/#/c/132248/ and https://review.openstack.org/#/c/131320/ 00:37:31 The first we've just agreed against and we should probably point that out to Sam 00:37:47 The second is what my mini-rant was about above 00:38:10 so cyeoh complains that it may be impractical to implement the 405 00:38:29 I suggested he looks at my proposal for the heat API, which generates the 405s and the Allow header automatically 00:39:02 And since that seems like it might be desirable in other libraries, we should probably move it into oslo-incubator if we can get dhellmann's approval 00:39:57 @sigmavirus24 do you want to take an action for commenting on the first one for Sam? 00:40:09 ycombinator_: certainly 00:40:23 agreed 00:40:32 #action sigmavirus24 will comment on https://review.openstack.org/#/c/132248/ re: no 204 for creation 00:40:34 it should be part of the framework 00:40:52 If you're talking about Routes, I discussed this with Ben and he vehemently disagreees 00:41:00 Unless you want to bring it up again 00:41:10 It could also be a third party package that's maintained and not included in oslo at all 00:41:22 That may be harder to have added to global-requirements.txt though 00:41:33 Unless this review is approved 00:41:35 I mean framework in a relaxed way, maybe something on top of the routes pkg 00:41:44 Fair enough 00:42:00 or we should just switch everything to Flask and be done with it ;-) 00:42:12 smh 00:43:11 hi 00:43:17 hi :) 00:43:33 hey etoews 00:43:41 we started without you, hope you don't miind 00:43:48 not at all 00:44:10 sigmavirus24, miguelgrinberg: so what's the next step on https://review.openstack.org/#/c/131320/? 00:44:18 so sorry i'm late. i could've sworn it was 7 pm for me. 00:44:39 yeah DST got a few of us :) 00:44:40 I think we need to talk to cyeoh 00:44:40 ycombinator_: coming to a decision about whether we want to enforce the standard of every other API on OpenStack regardless of convenience 00:44:43 after this one we can circle back to the first couple of items on the agenda 00:45:01 ycombinator_: unless there are other reviews people would like to highlight/discuss 00:45:18 yes 00:45:19 right 00:45:35 https://review.openstack.org/#/c/133087/ 00:45:40 miguelgrinberg: do you want to take the action on initiating the conversation with cyeoh? 00:45:50 yes, I can do that 00:45:56 #link https://review.openstack.org/#/c/133087/ 00:46:02 #action miguelgrinberg to start conversation with cyeoh re: https://review.openstack.org/#/c/131320/ 00:46:36 etoews: thoughts? 00:46:39 that's the proposal i started at the summit with the entire group present. 00:46:53 Right 00:47:24 sadly i haven't even had a chance to really review the comments since i got back :( 00:47:41 etoews: it's okay :) we discussed it earlier 00:48:14 the arguments are as follows (for a tl;dr): 1. 201s body should be recommended but optional 00:48:28 2. 201s should always have a Location header pointing to the created resource 00:48:47 that's reasonable. 00:48:53 or a status resource, right sigmavirus24 ? 00:48:56 3. 202s should be returned for asynchronous creation tasks and should include a Location header (which does not need to be the resource URL) 00:49:02 nvm - 201 00:49:04 continue 00:49:37 Even though a 201 may have no body, it's better (and more consistent) to return a 201 to signal successful creation than a 204 which has no intrinsic meaning of "yes we created that" 00:50:52 Basically cyeoh asked for the 202 specific information to be included. We all agree with them on that. Miguel is requesting that we not ever use 204 for POSTs whose representation is too large to reasonably returned in a 201 00:51:43 one of the things we discussed at the summit was being opinionated and using strong language (like "must") in our proposals. if we get good counter arguments, we can adjust the language. makes for better history and stronger guidelines. 00:52:28 I like the stronger language, but that may put some of the APIs at fault until the rev their specs to comply 00:52:30 I'm not sure I follow 00:52:43 i'll read the eavesdrop and the review comments and update the proposal for 201-header-and-body 00:53:17 thanks etoews 00:53:54 miguelgrinberg: so we don't want to use language that encompasses current practice. we want to use language that encompasses best/preferred/recommended practice, regardless of what the current apis do. 00:54:06 fine with me 00:54:17 just pointing out that it may look confusing 00:54:45 etoews: that sounds excellent 00:55:24 #action etoews to update proposal for 201 header and body in https://review.openstack.org/#/c/133087/ 00:55:36 any other reviews to go over? 00:55:52 also, we have 5 minutes left technically 00:56:43 that's one of the things that came up in the design summit. what to do about "old" apis that don't follow the guidelines. i updated the deliverables and #5 reflects that. https://wiki.openstack.org/wiki/API_Working_Group 00:57:31 #topic additional meeting time 00:57:43 so that review was accepted. 00:57:48 yep 00:58:02 personally (obviously?) that time works a bit better for me. 00:58:11 i'll be switching to that one. 00:59:08 #topic wiki page updates 00:59:13 i updated the wiki 00:59:21 the updates look awesome. thank you 00:59:30 based on feedback at the summit. 00:59:31 please to review :) 00:59:47 i'll try to send out a summit summary sometime this week. 00:59:59 summit summary sometime summit summary sometime summit summary sometime 01:00:15 aaaaaaand time 01:00:59 #endmeeting