00:00:35 #startmeeting api wg 00:00:36 Meeting started Thu Oct 30 00:00:35 2014 UTC and is due to finish in 60 minutes. The chair is cyeoh. Information about MeetBot at http://wiki.debian.org/MeetBot. 00:00:37 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 00:00:39 The meeting name has been set to 'api_wg' 00:00:52 Hi is anyone here for the API Workgroup meeting? 00:00:59 o/ 00:01:06 hi gm cyeoh. 00:01:12 yes, hi 00:02:03 cool - ok wasn't sure who would be able to attend given summit is next week. 00:02:33 I don't think I've ever met anyone here in person before so maybe we could start with some intros? 00:03:02 eg. why you're intested in the API WG (user of API, operator, developer) and what you'd like to contribute. 00:03:30 o/ 00:03:40 cyeoh, i'm late! 00:03:51 I'm happy to start off - I work on the Nova API and I'd like to see a lot more consistency both within the Nova API and across the openstack APIs 00:04:05 stevemar: hi :-) Just started going around doing some intros 00:04:49 hi, michael mccune here, i'm a developer with red hat and i've been working on the sahara project for the last 7 months or so. recently i've been doing some research into implementing a swagger/wadl generator for our project. 00:05:25 hi, this is shaunak kashyap. I'm a developer advocate at rackspace 00:05:59 I'm Miguel Grinberg. I'm a dev with Rackspace. Interested in REST APIs, have been working with Heat and also would like more uniform and more RESTful APIs all around. 00:06:17 hi, Eli Qiao , work for nova-api , and join openstack from Juno, a fresh man :) 00:06:28 i mostly work with keystone, and just looking for make things a bit more consistent across the APIs :) 00:06:56 hi, I'm Alex Xu, work on nova API 00:07:31 cool - I think that's everyone? 00:07:56 I'm Ian. I'm working on openstack sdk right now as I ease into OpenStack 00:08:58 ok. I don't really have an agenda, so I'm going to wing it a bit 00:09:03 #topic reviews 00:09:11 #link https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z 00:09:16 sounds good =) 00:09:28 we have a few in the queue atm 00:09:54 only one has a -1/-2 at the moment: 00:10:03 #link https://review.openstack.org/#/c/130690/ 00:10:27 It's the use of 207 multistatus as a response 00:11:06 Background is that its actually a webdav response originally which we normally avoid, but from what I've seen is more widely used than webdav these days for calls that require multiple status returns 00:11:46 We currently use it in Nova for registering for external events and had planned on using it for multiple server creation where some can succeed and some can fail 00:12:23 But given it was originally a webdav response there has been some opposition to standardising on it. 00:12:31 Does anyone have any opinions on this? 00:12:44 any suggestions for better alternatives? 00:12:49 So I've been looking for examples of other popular APIs that return a 207 and I can't find any that return a 207 00:13:11 Granted, none of them also allow for batch operations either, so I don't think my search is in anyway conclusive 00:13:58 is 207 specifically used when there is partial completion of the operation? 00:14:00 sigmavirus24: ok I can go back and have another search again (we first looked at it for nova a couple of years ago and we found a few, but they weren't the big APIs) 00:14:17 which is the endpoint that returns 207? Can't find it 00:14:28 elmiko: we only use it when there is at least one failure 00:14:57 miguelgrinberg: I'll just go look for the nova ref 00:15:38 cyeoh: i haven't read this rfc associated(4918), i'm curious what it has to say 00:16:07 because it seems "multi-status" would be appropriate 00:16:24 #link http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/contrib/server_external_events.py#n68 00:16:25 is it _only_ supposed to be used for webdav? 00:16:35 elmiko: its in the webdav rfc 00:16:37 better late than never I always say o/ 00:16:42 elmiko: it's a status code defined for webdav which is an extension of http 00:16:47 annegentle: hi ;-) 00:16:51 got it 00:17:04 as such it should really only be used then but that doesn't prevent people from doing something else 00:17:14 elmiko: I haven't however managed to find an alternative 00:17:31 right, and this does seem like a situation where a binary pass/fail might not be specific enough 00:17:44 technically teh rfcs allow us to return 227 with a custom reason if we want, but that's still going to be wildly unexpected to anyone who is more familiar with other apis 00:17:58 sigmavirus24: agreed 00:18:06 yep 00:19:25 so unless someone points out something better, I think Nova is continue its use of 207 and will use it for server creation as well. I don't know if other projects have a similar need for multi-status? 00:19:27 cyeoh: man... really starting with a tough cookie ;) 00:19:38 heh :-) 00:19:51 i imagine sahara will have need to multi-status 00:20:11 we don't use it now, but it seems like something we could use 00:21:01 ok. does anyone here really hate the thought of using 207 across openstack? 00:21:02 would sahara survive without it? 00:21:11 definitely 00:21:32 i meant that to sigmavirus24's question 00:21:46 what does multi-status mean with batch operations? 00:22:03 annegentle: for async type calls? 00:22:39 so we haven't used it in Nova for aync type calls, but server creation is an example of this. 00:22:46 cyeoh: i'm curious why not 206, if only part of the operation succeeded it could be returned. 00:23:26 annegentle: because we do some prechecking in server create we can know for sure that some will fail, though we don't know what will succeed in the end (we plan to use tasks for this) 00:23:27 elmiko: that's typically when the server is delivering a file but doesn't want to transmit it all at once. the client is expected to use teh range headers to request the other parts of the file 00:23:47 question re: using 207 - does that mean the response will /have/ to be XML? 00:23:52 elmiko: doesn't mean we *couldn't* apprioriate it, just that it seems odd 00:24:06 so you get a 207 until all operations are complete? (I can also ask these on the review, not here) 00:24:23 ycombinator: no we don't support xml at all 00:24:38 sigmavirus24: yea, a little round hole/square peg, but i imagine if you requested X servers be created and the response was only X-2 were actually created, that's a little similar to a count 00:24:59 elmiko: yeah 00:25:38 elmiko, sigmavirus24: we kind of could, but we still want to be able return an error code for the failures (they may differ for each failure case) 00:25:50 I apologize in advance if this doesn't make sense, but if you are sending a request that includes a list of operations in the body, shouldn't the status of said operations be reported in the body of the response, with the response being a 200, regardless of teh status of the individual operations? 00:25:51 If openstack as a whole *really* needs this, I would rather see it be 207 frankly. But if we're going to standardize it off of one project's behaviour (that is already a little odd) I don't know if we should be concerned with it so early 00:26:55 annegentle: so if some fail/succeed straight away you get a 207. If its an async case and none have failed you get a 202 accept 00:27:44 cyeoh: i feel like we're kinda bumping against the idea from the mailing list of operation status objects. like if you knew some entities failed, why not query those entity's statuses for increased info, if you care to see it. 00:27:51 sigmavirus24: so if only Nova is doing this I'm ok with it not being standardised, but as soon as another project wants to do a multi-status-type thing then I think we should do it all the same 00:28:20 ok thanks cyeoh... I'm looking for other apis needing this now... 00:28:26 cyeoh: yeah that's kind of what I'm thinking. That said, I agree with miguelgrinberg. I'm not sure I understand the need for a separate status code in this case 00:29:00 the status code of the response applies to the operation as a whole, not the individual sub-operations 00:29:22 well a 207 is a success code right? 00:29:32 technically 00:29:49 i guess it means at least 1 operation was successful? 00:29:59 not that we should really return a 200 in the server create case because its async 00:30:12 a 200 response with an array of successes and an array of failures is good too 00:30:48 sigmavirus24: yep, though thats essentially doing a 207 type content, just returning 200 instead isn't it? 00:31:17 cyeoh: i would think you will check the return object anyways, so why not 200? 00:31:47 so the way we've used it so far (only one case) is we return 200 if everything succeeds 00:31:58 so you don't need to check any further 00:32:13 if we have at least one failure then we return 207. 00:32:27 no please 00:32:30 with details about the individual fail/succeeds 00:32:45 don't return different success codes based on some logic 00:32:55 I think the response code should be same regardless of # of failures 00:33:04 can you return a more expected 4xx if at least one operation failed? 00:33:06 same return code with same body interpreted the same way every time. 00:33:21 have to say, i'm seeing the 200 side of this as being a little clearer 00:33:38 there's a progress attribute returned now, right? 00:33:49 annegentle: nope, we don't have tasks yet 00:34:03 cyeoh: ah. 00:34:21 and before we have tasks we need to implement microversions.... 00:34:35 cyeoh: are you aware of any examples of a 207 being used in the wild? 00:34:44 (unfortunate long chain of dependencies) 00:34:55 etoews: in openstack or outside of openstack? 00:35:00 both 00:35:24 etoews: so in openstack we use it for os-external-server-events 00:35:45 cyeoh: there's a progress: 0-100% returned in v2.0 now 00:36:09 annegentle: is that the instance actions thing? 00:36:30 I see it in GET servers/detail 00:36:59 cyeoh: maybe it never goes up from 0? :) 00:37:04 question: what does an "all operations successful/in-progress" response body look like? is that documented somewhere? maybe that will help steer toward a certain status code 00:37:32 etoews: for outside I don't have any references handy but did at the time a couple of years ago (I can come back later with some probably) 00:37:43 annegentle: i suspect it might not 00:38:15 annegentle: instance actions was sort of an interim progress thing before someone came up with the tasks proposal 00:39:28 cyeoh: k. it would just be interesting to see some other examples. (if you can't find any i wouldn't consider that a blocker though) 00:40:27 etoews: ok there were a few at the time - basically I was looking for a way to do multi-status and didn't want to invent something. anyway I'll get back to the group 00:40:44 ycombinator: is this sort of what you were looking for? https://wiki.openstack.org/wiki/Nova/ExternalEventAPI 00:40:49 ycombinator: there might be some in the nova api samples for server-external-events 00:41:08 yeah, thanks 00:41:30 ok well I didn't intend for this topic to suck up so much time, maybe we should shelve it for a bit (I can come back with more info) 00:41:57 cyeoh: sounds like a good idea. Maybe put it on the agenda for next week or the week after 00:42:14 sigmavirus24: +1 00:42:15 sigmavirus24: ok, will do. I'm assuming no irc meeting next week because of summit 00:42:49 I think this one should be a lot less controversial: 00:42:54 #link https://review.openstack.org/#/c/131358/ 00:43:33 cyeoh: one question, have we determined the voting for "merge" 00:43:34 just advertising it because its a proposal for the process of how we vote on changes etc. 00:43:36 cyeoh: I hope it's less controversial, for the meeting's sake ;) 00:44:05 * annegentle reads more 00:44:39 heh. so I'm fine with the fairly short notice for changes to guidelines while we're still bootstrapping. 00:44:45 hopefully it is :) 00:45:47 yeah I think it's okay, but commenting in the review itself 00:45:52 cyeoh: looks solid to me, i might make the time a little longer for #3 bit i agree about the bootstrapping period. 00:46:05 what is not yet defined is who can vote when it comes to contentious issues 00:46:24 cyeoh: you might consider exceptions around known busy times like milestones 00:46:42 cyeoh, PTLs seems like a good idea 00:46:43 annegentle: oh good point - milestones and summit when people just get really busy 00:47:09 I definitely think we need +1 from any affected PTL for the process. 00:47:41 annegentle: so for contentious issues or all of them? 00:47:43 annegentle: do we want to require PTL participation or should there be a cross project person that the project/ptl chooses? 00:47:59 sigmavirus24: I think we assume the PTL can delegate? 00:48:06 So who gets to count as one of the four +1s? That's way too small a number in my mind. 00:48:50 I think we have to get PTL involvement, and with the cross-project and integration emphasis coming, it can just be the 2 affected PTLs. 00:48:52 annegentle: at the moment anyone because we're trying to get some momentum. Maybe we need a PTL rep vote before the 1.0 release? 00:48:56 so it might vary 00:49:04 and I do think PTLs can designate a voter 00:49:25 this will all have to be encoded in the infra anyway so might as well say what we want/think will work. 00:49:53 there are now 20 REST API definitions for integrated/incubated 00:50:01 I think we'll need 10-12 +1s 00:50:15 annegentle, whered you find that so quickly :) 00:50:29 annegentle: do we need that many at this stage though? 00:50:42 stevemar: I live/breath/eat this stuff :) 00:50:54 annegentle: this early in the life of the working group though? 00:50:57 annegentle: I suspect we're not going to have that much interest from projects until we have something substantial? 00:51:03 cyeoh: are you following much of the "layers" discussion? 00:51:07 I could see growing towards that, but not right now 00:51:12 cyeoh: we need to build interest 00:51:13 ya. i'm concerned about making this too process heavy too early too and killing momentum. 00:51:34 etoews: not too heavy, just need votes and interest 00:51:40 annegentle: re: layers, only a bit (read a few blog posts) 00:52:17 etoews: it's a balancing act - if guidances merges unexpectedly and people get grumpy they weren't "asked" they're less likely to comply 00:52:44 annegentle: so we'll be clearly marked as draft for now 00:52:45 etoews: so we need to give people votes and voices. I'm for more votes mo' bettah 00:52:56 cyeoh: ah well that's one way to handle it, heh. 00:53:02 cyeoh: merge all you want then! 00:53:29 annegentle: heh. well we can do a clear PTL delegated vote before moving out of draft 00:53:33 still think we'll need vested PTLs -- TC is definitely interested 00:53:49 cyeoh: okay then that approach solves my concerns :) 00:53:49 annegentle: and a reasonable long review time before draft goes to vote. 00:54:11 it might go to the TC for the final, is that okay with us? 00:54:12 annegentle: cool :-) 00:54:19 annegentle: true enough. to me that that still seems like a lot of time from a lot of people. 00:54:20 cyeoh: yeah I think that's very fair. that's kind of how I was imagining this would go as we moved towards making this a standards thing 00:54:32 annegentle: I think that would be good to get the TC to formally review it 00:54:48 Most groups, like IETF working groups will through together a draft in private and then ask for comments. We're doing it in public but it's also very different 00:54:57 we'll still have to be careful about chunks... not overwhelming people in reviews nor drafts 00:55:12 so what we're discussing here is all very "top down". 00:55:22 I think we can move quickly as a small WG 00:55:51 what about (initially anyway) a more "bottom up" approach where we draft guidelines and use those guidelines in reviews. 00:56:45 although i certainly agree having the TC and PTLs aligned with us is great. 00:57:26 etoews: for example, we come up with a draft and look for reviews that it might affect and offer feedback to see if we can influence the review? 00:57:50 sigmavirus24: exactly 00:57:51 etoews: so I think even in draft people will start following them if they seem reasonable (and have some reasoning as to why) 00:57:54 a more, go forth and see if we can convince others that it's a better idea to do X than Y using the draft as X? 00:58:06 etoews: that works until a PTL disagrees with you on a review, but it's a great approach for making the guidelines stick! 00:58:45 don't want to go down a rabbit hole, but what incentive to projects have to follow these guidelines? 00:58:47 annegentle: and hopefully by that point, that draft hasn't been suggested for use and accepted in too many places because then it might need to be changed 00:58:56 right. i'd just like to see us come at this both from the top down (TC and PTL) and bottom up (API WG members doing reviews). 00:59:26 ycombinator: so the inconsistencies I've mostly seen within Nova have been due to people not knowing and so making stuff up. I think we just start with guidance first 00:59:29 etoews: definitely like "review guidance, pronto" then we also see where any areas lie that need more consensus building 00:59:39 cyeoh: heh good point 00:59:51 ycombinator: if we need more stick then thats probably something the TC should be doing 01:00:07 right, I'm thinking if there's a carrot instead 01:00:31 ycombinator: we print stickers :-) 01:00:35 lol 01:00:44 heh 01:00:49 getting +1's from API WG members on your reviews is a pretty good carrot. 01:01:04 and stickers. 01:01:09 etoews: agreed ;-) 01:01:16 anyway I think we're out of time. 01:01:25 1 more thing. 01:01:28 meet again in 2 weeks or is that too soon after summit? 01:01:39 the APIImpact flag that didn't appear on the web page. 01:01:43 that'll help keep momentum 01:02:01 cyeoh: +1 for 2weeks 01:02:15 etoews: yea I saw your comment I haven't had a chance to hunt that down yet. Odd since its been published once at least. 01:02:33 okay. 01:02:43 cyeoh: I think it didn't get built it's because it's not part of index.rst any more 01:02:52 too many it's 01:03:01 it's okay 01:03:10 annegentle: ok I'll try submitting a patch which adds the templates back in 01:03:20 cyeoh: ok 01:03:33 thanks cyeoh for running this meeting! 01:03:40 yea, thanks! 01:03:44 yes, thanks! 01:03:48 anyway. i'd like to send the idea of APIImapct out to openstack-dev when it gets published to encourage other programs to do the same. 01:03:55 thanks for everything cyeoh! 01:04:01 thanks everyone for attending! 01:04:06 #endmeeting