00:00:21 #startmeeting api wg 00:00:22 Meeting started Thu Dec 11 00:00:21 2014 UTC and is due to finish in 60 minutes. The chair is etoews. Information about MeetBot at http://wiki.debian.org/MeetBot. 00:00:23 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 00:00:25 The meeting name has been set to 'api_wg' 00:00:36 anyone else here for the api wg meeting? 00:00:44 o/ 00:00:59 hello sir 00:01:01 o/ 00:01:08 o/ 00:01:24 good day/evening to all! 00:01:38 o/ 00:01:43 #topic agenda 00:01:49 #link https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 00:02:30 as you can probably tell i structured the wiki meeting page to be easy to copy/paste meetbot commands from 00:02:41 good idea 00:03:05 i'm thinking i'll put a "placeholder" in for *new* specific topics at the start 00:03:27 if there's something beyond our regular review and such, we should tackle it first. 00:03:54 so anyone is always welcome to update the agenda to put a specific topic 00:04:03 nice 00:04:04 #topic previous meeting action items 00:04:19 #link http://eavesdrop.openstack.org/meetings/api_wg/2014/api_wg.2014-12-04-16.01.html 00:05:03 cyeoh merged the Process for merging guideline changesets https://review.openstack.org/#/c/131358/ ! 00:05:21 yea, that was nice. seemed like we had a good consensus. 00:05:25 that really means we're off and running now 00:05:29 o/ 00:06:25 my guideline met that criteria and was merged today by jaypipes https://review.openstack.org/#/c/133087/ 00:06:53 very cool 00:06:57 when i say "my" i mean ours. that one started at the summit during a design session and a bunch of us worked on it. 00:07:51 i emailed the magnetodb team and gave them an intro to the api wg on the ml 00:07:59 it was pretty well received. 00:08:24 good to hear 00:08:28 yeah, saw that on the ML 00:08:35 isviridov is now our liaison https://wiki.openstack.org/wiki/CrossProjectLiaisons#API_Working_Group 00:09:17 ycombinator had an action item 00:09:56 looks like he's not online atm. 00:10:55 there's another action item for all of us but it belongs under apiimpact anyway 00:11:08 lol, nice 00:11:16 #topic APIImpact 00:11:29 #link https://review.openstack.org/#/q/status:open+AND+(message:ApiImpact+OR+message:APIImpact),n,z 00:11:46 the one we were requested to review was https://review.openstack.org/#/c/136760/ 00:11:49 #link https://review.openstack.org/#/c/136760/ 00:12:11 i confess i didn't get to it amongst everything else... :( 00:12:15 hello, late again :-) 00:12:35 did anyone have a look at it? 00:13:02 not me, but looks like that review has generated a large amount of comments. 00:13:07 sorry, no, i am way behind 00:14:08 no worries. 00:14:33 elmiko: good point. it's got a fair amount of eyes on it already. 00:15:07 anything else from https://review.openstack.org/#/q/status:open+AND+(message:ApiImpact+OR+message:APIImpact),n,z that someone would like to call out? 00:15:23 I reviewed https://review.openstack.org/#/c/136253/ 00:15:38 it's an interesting one, it has a definition on how to add/remove from a list of things 00:16:08 I suggested an approach that they did not like, because it is different to what they are doing now in other parts of the API 00:16:24 they use a PUT with a partial resource representation 00:17:34 I think we should decide what is the approach to recommend going forward for dealing with lists of things 00:17:55 is it a membership type of relationship or just a plain list of things? 00:18:18 it's not a list of resources, these are metadata items 00:18:27 okay 00:18:30 associated with a volume in this case 00:18:58 they want to send PUT with key:value for new items, and key with empty value to delete 00:19:15 oh 00:19:18 wouldn't that be normal for updating a resource? 00:19:19 a more correct approach IMHO would be to send the complete list in the PUT request 00:19:31 if you want to delete just not send what you want out 00:19:48 miguelgrinberg: that seems like a more complete solution 00:20:04 that's puts a bigger burden on the client 00:20:08 does it burden the client to carry too much info though? 00:20:08 it ensure you know what the collection is, if not it is kind of unpredictable 00:20:28 I guess, you need to issue a GET to have the list 00:20:43 but it is likely the client already has that 00:21:00 i wouldn't make that assumption 00:21:10 take a cli for example 00:21:27 it's not storing any info anywhere 00:21:30 also there's the "what if it changed" 00:21:35 starting from 0 every time 00:21:53 good points 00:21:54 yeah, but adding to a list of things without knowing what's there in the first place it is not safe 00:21:58 ryansb: yep. a kind of race condition scenario 00:22:03 if the list changed between your GET and PUT that would be bad 00:22:04 it forces the server to deal with duplicates 00:22:38 race conditions can happen in many other circumstances too 00:23:17 is adding/setting idempotent in this case (as its metadata)? 00:23:25 what about using some of the info, a partial record, to update with? ie just the essential plus your update 00:23:37 i think sending the whole list to delete 1 thing would be particularly susceptible to that 00:24:05 so going by the book, you would do that with a PATCH request, PUT should get the whole thing 00:25:18 ycombinator_: seems like it _should_ be... not sure how it's actually used in their code. 00:26:10 what about treating metadata as its own resource and just issuing a DELETE? 00:26:30 whether or not it is its own resource on the backend. 00:26:39 etoews: that works, but you need to treat each metadata item as an individual resource, it can be overkill 00:26:55 interesting idea though 00:27:09 a PATCH is just so much cleaner and easier to reason about 00:27:10 how it is stored in the server does not matter, but the API will have to expose each item as an individual resource with its own URI 00:27:16 overkill in that there could be a lot? 00:27:32 yeah, a lot of resources, and not much content in each 00:27:37 just a value 00:27:44 etoews: yes…a lot of round-trips 00:28:12 is there a compelling reason not to recommend the PATCH operation? 00:29:42 so I'm not completely happy with how they delete stuff, even with PATCH that would have to stay the same 00:29:51 they set a key with an empty value 00:30:09 (sorry, I'm having network issues) 00:30:41 even for a PATCH, that does not seem RESTful to me 00:31:19 I'm on the fence about that one…doing the key-only for delete simplified a bunch in OSC 00:31:20 miguelgrinberg: are you saying the even with a PATCH the whole list should be sent? 00:31:47 *that even 00:31:54 elmiko: I'm not sure what I'm saying, just that deleting something with a PATCH request seems odd 00:32:12 gotcha 00:32:22 what would be the possible responses to that? 200 if it worked, and what if the item does not exist? 00:32:24 400? 00:32:47 good questions 00:32:59 you can't send a 404, since it's not a resource you are deleting 00:33:01 is deleting an item that does not exist an error? 00:33:12 ycombinator_: another good question, it depends on that case I guess 00:33:38 for reference, nova treats metadata as a resource http://developer.openstack.org/api-ref-compute-v2.html#compute_server_metadata 00:34:08 I like the PATCH approach because its not chatty but my only concern is the representation of the key's value for deletion - what if null/0 are valid values for a key? 00:34:11 also, in this case at least, the metadata is a single field (a dict) at the volume record level. 00:34:43 well, we have a precedent, this looks much nicer than what they intend to do 00:35:02 having the metadata endpoint seems really nice 00:35:16 they even implemented PUT for the whole metadata set 00:35:20 cinder snapshots treat it as a resource http://developer.openstack.org/api-ref-blockstorage-v2.html#snapshots-v2 00:35:21 nice 00:36:09 heh. i forgot that this is a cinder spec! 00:36:35 they didn't look at their own api to ensure they were at least consistent with that? 00:36:50 do we need a spec on working with metadata items? 00:37:00 something we can refer to? 00:37:14 miguelgrinberg: do you mean a guideline? 00:37:21 sorry, yes, that's what I meant 00:37:31 yes. i think you're right. we do. 00:37:32 +1 00:37:35 desparately 00:37:54 is metadata a special case or do we need a guideline for updating some items in lists? 00:38:13 i think metadata is something of a special case 00:38:23 just because it's used in so many places. 00:38:25 yeah, metadata is special, it's key-value lists 00:38:40 for other resources you can use regular REST stuff 00:39:07 I guess that's what I'm getting at - what is the downside of applying regular REST to metadata as well? 00:39:14 miguelgrinberg: did you want to take an action item to comment about it on that review? 00:39:19 so the sub-resource for each metadata key idea that everett proposed earlier 00:39:23 yes, I will do that 00:40:03 ycombinator_: I think we are saying that we need to apply REST to metadata items, but we also need ways to get or replace this data in one chunk, for practical purposes 00:40:19 the nova example llinked above is a good one in my opinion 00:40:33 #action miguelgrinberg to comment on https://review.openstack.org/#/c/136253/ to point out that metadata works better as its own resource, just like for cinder snapshots http://developer.openstack.org/api-ref-blockstorage-v2.html#snapshots-v2 00:40:54 okay, so metadata is special because unlike other lists of resources, it needs to be updated en-masse more frequently - got it! 00:41:01 we should probably clarify that in the guideline 00:41:36 is there an action item here to create a guideline for metadata? 00:41:51 sounds like it 00:41:52 if so, who's got it? 00:41:52 I think it would be useful 00:42:00 I'm happy to take a crack at it 00:42:29 unless it makes sense to keep both actions with miguelgrinberg since they are related 00:42:48 I'm fine either way, I can write an initial doc to review next week if you want 00:43:00 +1 00:43:36 #action miguelgrinberg to write up an initial guideline to review for metadata to be consistent across openstack 00:43:44 let's move on 00:43:53 #topic guidelines 00:44:00 #link https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z 00:44:48 i think we had an action item from before to review ycombinator_ guideline https://review.openstack.org/#/c/133660/ 00:45:19 yes, I was supposed to put some stats in a comment 00:45:26 I have not had a chance to get to it :( 00:45:41 my initial thought is that trying to cover both singular and collection resources in the same proposal was biting off too much 00:45:45 I'm also wondering if its better to split this guideline into two 00:45:47 ha 00:45:49 heh 00:45:57 there's consensus on collections, I think 00:46:01 so I'd rather just start with that 00:46:05 sounds good 00:46:23 +1, let's get collections done first 00:46:29 #action ycombinator to restrict scope of https://review.openstack.org/#/c/133660/ to collections only 00:46:58 or close that one completely and start fresh? 00:47:24 but then you lose easy access to the historical discussion on collections. 00:47:25 sure 00:47:29 your call 00:47:29 yeah 00:48:08 hmmm...considering you'd have to change the commit message a new one might be advisable. then link to the old one in the comments. 00:48:17 true - okay, I'll do that 00:48:20 anyone else have advice on how to proceed here? 00:48:43 i dunno, seems a shame to lose the history 00:48:58 I'd go ahead and change the review 00:48:59 what is the concern about changing the commit message? 00:49:07 (not make a new CR) 00:49:12 I can put in a comment saying I'm going to rework the patch, including changing the commit message 00:49:21 that way if someone read the comments, they'll know what happened 00:49:36 the change to the commit message will be part of the patch 00:49:40 right 00:49:46 so folks could see anyways 00:49:52 sgtm 00:50:11 5 min to discuss anything else in https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z 00:50:59 https://review.openstack.org/#/c/137490/ might need a few more eyes 00:51:00 or if folks don 00:51:16 *don't have other topics, we can probably adjourn early 00:51:23 when are we going to start merging these guidelines? 00:51:44 that's what i was just looking at... 00:51:49 https://review.openstack.org/#/c/130825/ looks mergable. 00:51:49 ryansb: i have a topic for open discussion 00:52:09 i have an item for open disc. too 00:52:29 to look up the merge permissions on any project, use a URL like this: 00:52:29 https://review.openstack.org/#/admin/projects/openstack/api-wg,access 00:52:42 you can click to see who belongs in the group with access control: 00:52:42 https://review.openstack.org/#/admin/groups/468,members 00:52:56 cyeoh and jaypipes can merge. 00:53:28 i know cyeoh is still recovering. i'll ping jay to review the queue and merge what meets the criteria. 00:54:01 #action etoews ping jay to review the queue https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z and merge what meets the criteria. 00:54:23 #topic open topics 00:54:28 shoot rosmaita 00:54:54 anyone have a reaction to nova dropping xml in v2 ? 00:55:06 didn't bother me when i thought there would be v3 00:55:16 but it seems a bit weird 00:55:21 i had a reaction to it a long time ago but then i got over it. 00:55:33 i am late to the party 00:55:34 somebody somewhere is probably using it 00:55:40 definitely 00:55:57 guess that train has left the station 00:56:23 i think so. i fought it for a bit but then folded like a house of cards. :( 00:56:26 it would be awesome if some day content types are abstracted in a framework that all APIs use 00:56:39 miguelgrinberg: +1 00:56:41 then it does not matter, all we see are Python dicts 00:56:42 that would indeed be awesome 00:56:51 ok, that's all i had 00:57:05 mine is mainly informational 00:57:12 at summit we talked briefly about swagger 00:57:25 yes 00:57:30 i have a poc prototype up for sahara to generate the base required doc for swagger 2.0 00:57:35 https://github.com/elmiko/sahara-doc 00:57:54 very proto still, but i'm going to add more to it and create a WADL->Swagger generator as well 00:58:18 right now it just dumps the json output, but i want to build a server in too 00:58:24 said wadl > swagger generator may already exist. 00:58:39 let's make this a top level topic for next meeting! 00:58:44 yea, i think Max Lincoln had something going, i still need to get in touch with him. 00:58:52 https://pypi.python.org/pypi/wadl2swagger/0.0.2 00:58:58 oh awesome! 00:59:04 ycombinator_: thanks 00:59:19 it would be awesome to omit the syntax of reousrces in API docs, just saying 00:59:32 so that people are not encouraged to build URLs on the client side 00:59:47 +1 00:59:51 miguelgrinberg: not sure i follow, could you elaborate a little? 01:00:03 you do not need to show how URLs are formed 01:00:15 because we want clients to get URLs from links in other resources 01:00:22 ahh ok 01:00:24 miguelgrinberg: do you have an example? 01:00:27 the only URLs that should be public are the top-level ones 01:00:35 makes good sense 01:00:38 gonna have to end the meeting now... 01:00:40 I need to dig for one, I promise to bring one next week 01:00:47 cool 01:00:52 bye 01:00:57 bye guys 01:00:58 bye 01:01:01 #endmeeting