16:00:15 #startmeeting api wg 16:00:15 Meeting started Thu Jun 4 16:00:15 2015 UTC and is due to finish in 60 minutes. The chair is elmiko. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:16 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:18 The meeting name has been set to 'api_wg' 16:00:19 there we go 16:00:23 slow bot 16:00:35 i think i had spaces in front that messed it up 16:00:41 probably 16:00:41 #topic agenda 16:00:48 #link https://wiki.openstack.org/wiki/Meetings/API-WG#Agenda 16:01:34 #topic previous meeting action items 16:01:51 etoews is out, so we'll skip his action 16:02:02 just finished my review of https://review.openstack.org/#/c/177397/ a few minutes ago 16:02:08 awesome 16:02:12 lots of things I did not like 16:02:49 anything specific you'd like to bring up? 16:02:58 o/ 16:03:18 they have optional components in the URL, in the middle 16:03:49 o.O 16:04:02 something like /artifacts/{type_version}/something_else 16:04:09 and type_version can be omitted 16:04:29 that's confusing 16:04:33 agreed 16:04:43 * sigmavirus24 sees if any of them are around 16:04:44 I suggested a different structure, let's see how it goes 16:04:47 and not very URI 16:04:53 o/ 16:05:12 o/ sdague 16:05:13 what is a "type version" 16:05:54 it defines the version of the artifact structure 16:05:59 or so I understand 16:06:01 cdent: so artifacts are a very generic abstraction of "things" 16:06:12 a type is a specialization of sorts, e.g., an image 16:06:15 or a heat template 16:06:37 so... this version thing seems like it would be better done in a psuedo content negotiation model 16:06:40 I think the type_version is the artifact's version (since all artifacts are semantically versioned) 16:06:53 ^ that 16:06:54 sdague++ 16:07:27 I proposed to move the optional stuff to the end, but content negotiation would work too 16:07:31 (it's getting a bit boring agreeing with you so much sdague, can you say some stupid stuff every now and again just to keep me on my toes?) 16:07:50 artifact_type seems to be completely mime types, so I don't understand why that's in the uri at all 16:07:57 cdent: having never met you, I'm not convinced you and sdague aren't the same person 16:08:03 heh 16:08:08 sdague: they define it as a semver 16:08:15 sigmavirus24: lol 16:08:27 miguelgrinberg: no, that's type_version 16:08:29 Has anyone ever seen cdent and sdague in the same room together? I doubt it ;) 16:08:38 The `artifact_type` constant should unambiguously identify the 16:08:38 artifact type, so the values of this constants should be unique among all the 16:08:38 artifact types defined by the active plugins. 16:08:39 sdague: ah, sorry, right 16:08:41 I think I saw sdague at summit, but I may have been imagining it, talking to myself 16:08:48 Oh I could be wrong 16:08:56 They might allow versioning of artifact plugin types 16:09:25 right, that seems to be what it is. But that really seems like it should just be mime types 16:09:29 jaypipes: might know more about artifacts since he's their bossman =P 16:09:36 with Accept headers 16:09:36 sdague: I don't disagree :D 16:09:37 they allow versioning the types as well as the artifacts, yes 16:09:48 stevelle: right, I was confused for a few minutes there 16:10:06 * edleafe arrives late and sits in the back row 16:10:42 sounds like miguelgrinberg is on top of this, do we need another action item or does this seem on track? 16:10:58 or would other folks want to checkout #link https://review.openstack.org/#/c/177397/ as well? 16:11:06 is it worth getting more people on the review or will that just seem like piling on? 16:11:09 o/ 16:11:16 cdent: yea, that's my concern too 16:11:29 cdent: I think one or two other people to back up miguelgrinberg's concerns is fine 16:11:32 I think 10 people is piling on 16:11:55 I think a couple more is not going to hurt 16:11:57 ativelkov: has been working on artifacts 16:11:58 cdent, sdague, would either of you be able to take a look at that review as well? 16:12:11 yeah, I've just put in my think about this queue 16:12:16 hi folks 16:12:19 cool 16:12:22 elmiko: yes, I can. 16:12:24 ativelkov: hi 16:12:31 awesome, thanks 16:12:31 so if y'all have questions, ativelkov can answer them very well 16:12:52 #action cdent and sdague to review https://review.openstack.org/#/c/177397/ and comment 16:13:01 ok, next action item 16:13:19 stevelle, and ryansb, do you guys have anything to talk about for the filtering guideline? 16:13:51 Nothing except to call for more reviews on the updates 16:13:58 #link https://review.openstack.org/#/c/177468/ 16:14:07 elmiko: I don't think so 16:14:16 yeah, what stevelle said 16:14:20 ok, cool. is that the correct link? 16:14:29 yup 16:14:52 #topic merge process status 16:15:02 #link https://review.openstack.org/#/c/186836/ 16:15:15 so, it looks like we are getting good acceptance of the process that etoews put together 16:15:37 i wonder if we should post something to the ml about this, or can we merge maybe early next week? 16:16:39 send something to the ML 16:16:41 just to be safe 16:16:44 posting to the ML never hurts 16:16:56 and more communication the better on a lot of this, so there is less surprise to people 16:16:57 well, sometimes it does ;) 16:17:03 ok, i won't freeze it though, since it's not really a guideline. does that make sense? 16:17:12 or if people are surprised, then we can say "you should have read the ML" 16:17:14 sounds reasonable 16:17:15 elmiko: yep 16:17:17 #action elmiko make post to ml about the merge process review 16:17:38 #topic guideline freeze 16:17:51 the review chain starting with #link https://review.openstack.org/#/c/179365/ 16:18:02 seems to have good reviews and i think it's mostly ready for merge 16:18:25 should we freeze the main 3 and make a post, following the new process, or are these small enough to skip that? 16:19:33 they are small, but they make statements about response codes that seem to stir people up 16:19:33 i'm kinda leaning towards freeze and post, but i wanted to get other's opinions 16:19:40 yeah 16:19:45 yeh, freeze and post seems safe 16:19:52 k, sounds good 16:20:04 #action elmiko freeze https://review.openstack.org/#/c/179365/ chain and post to ml 16:20:19 #topic guidelines 16:20:33 #link https://review.openstack.org/#/q/status:open+project:openstack/api-wg,n,z 16:20:42 are there any other guidelines we should be looking at? 16:21:46 I think we should send the 501 stuff out for a global fight or it's going to linger and never actually be followed 16:22:12 each time someone outside the group comes along they say "but wait, no!" and drop a -1 on it 16:22:20 this one https://review.openstack.org/#/c/183456/ ? 16:22:42 yeah 16:22:58 I agree with cdent 16:23:07 hmm, what's the next step here. sdague is there room to update this? 16:23:09 I thought we were supposed to be telling people that they were doing it wrong though 16:23:15 * sigmavirus24 kids 16:23:17 what I think the problem is here is that we are not talking about specific examples 16:23:22 I'm starting to think that maybe sigmavirus24 is me too 16:23:27 lol 16:23:37 who's to say that I'm not? 16:23:41 exactly! 16:23:55 elmiko: so beyond merge conflicts, I think there were a couple of minor wording corrections, right? 16:24:16 The reason I bring this up now is because it is one of the main areas where there are a lot of implementations are using 501 to mean "that functionality is not currently configured" 16:24:22 sdague: yea, but it's picked up a few -1s that look like content issues 16:24:23 I can make those changes for sure, I don't know where the balance of the 501 fight is right now though, as I'm still getting my hread around it 16:24:30 elmiko: yeh, those are fixable 16:24:36 I can do that later today 16:24:39 and making the guidline not to do that tests whether are guidelines are enforceable 16:24:42 sdague: awesome, thanks 16:24:53 s/are/our/ 16:24:59 #action sdague review and repost #link https://review.openstack.org/#/c/183456/ 16:25:21 sdague: if you could list examples it would be awesome. I can follow your reasoning all the way until you say 400, then it does not make sense to me, so looking at specific examples might help 16:25:45 miguelgrinberg: so, honestly, 400 is to me the default answer when nothing else fits 16:26:00 sorry I'm late guys. 16:26:05 because, you know, the http codes were designed around clients and servers before there were dynamic applications 16:26:06 sdague: so I want to see why 404 does not fit better 16:26:18 sigmavirus24: I still have to do the review on the API of the artifacts, sorry :( 16:26:25 and I'm not the boss man :) 16:26:51 you're sort of a boss, man ;) 16:26:52 miguelgrinberg: so, honestly, I don't have a hugely strong opinion on it, it's mostly the practical bit from the mailing list scuff between cdent and I 16:27:12 sdague: but you understand the push back on 400 correct? 16:27:12 I think if anything beyond 400 has multiple meanings, it gets weird on client side coding 16:27:17 miguelgrinberg: yes 16:27:36 404 should only be used when there's nothing responding on the URL 16:27:58 miguelgrinberg: http://lists.openstack.org/pipermail/openstack-dev/2015-May/063396.html is the crux of my practical argument around 400 fall back 16:28:32 cdent: so I'd like to see an example where a service that is not configured still can have a valid URL 16:28:43 miguelgrinberg: oh, that's easy 16:29:13 POST volume-attach to /servers/ID/action 16:29:18 for a docker driver based cloud 16:30:08 a lot of these are things where the more RPCish stuff is being done for features that not all backend drivers support 16:30:33 http://docs.openstack.org/developer/nova/support-matrix.html 16:30:51 POST stop /severs/ID/action to an ironic based cloud 16:31:31 sdague: okay, so side effect of using actions instead of resources. Good example. 16:31:50 yeh, I can include that in the updated text 16:31:55 would it help to have some of the example codified in the guideline? 16:31:58 k, thanks sdague 16:32:16 when do we write the guideline that says /servers/ID/action is a bad idea? 16:32:24 sdague: I think it does help to justify the 400 with examples 16:32:25 yeh, I'm totally happy adding more rationale to the docs, I think that's huge part of the value 16:32:29 * elmiko backs away slowly 16:32:42 cdent: lets see if we can get past this 501 thing first :) 16:32:43 * cdent pokes elmiko 16:32:47 :) 16:32:50 hehe 16:33:05 and drink a lot of sake in tokyo and convince ourselves the action fight is worth fighting 16:33:14 because I'm still mixed on that one 16:33:20 i think at some point we should circle back around on the http guideline and format it more closely to the template, 16:33:21 :) 16:33:24 yeah, "worth" is a good question 16:33:35 we could add examples to each sub-section 16:33:39 worth putting off 16:33:50 elmiko: yeh, examples would be great 16:34:11 ok, any other guidelines we should be looking at, or might be ready for a freeze? 16:34:17 I think every rule should end up with a why (rationale), what (here is the edict), and how (examples) 16:34:23 sdague: +1 16:34:50 i think part of the issue is that the http guideline started before we agreed on a format, so we'll need to clean it up at some point. 16:35:02 yeh, no worries, I like that it's evolving that way 16:35:08 cool 16:35:46 ok, moving along 16:35:52 #topic APIImpact 16:36:02 #link https://review.openstack.org/#/q/status:open+AND+(message:ApiImpact+OR+message:APIImpact),n,z 16:36:21 anything there that folks would like to point out? 16:37:10 i know this one, #link https://review.openstack.org/#/c/187443/ 16:37:23 got discussed in channel a bit, not sure if it needs any eyeballs or not 16:37:55 looks like they dropped the PATCH ideas, so maybe not 16:39:35 ok then 16:39:40 elmiko: seems pretty clean design 16:39:42 #topic open discussion 16:39:51 Yeah, they seem like they're fine 16:39:56 (the barbican review) 16:39:59 miguelgrinberg: yea, i think they hashed out all the ideas with you in irc 16:40:12 I had dropped on the agenda earlier in the week but it went missing: 16:40:41 there's a downstream request that all apis that list time oriented data support some form of changes-since, akin to what nova has on at least some stuff 16:40:59 a) is changes-since well and proper? 16:41:04 b) is it a portable concept? 16:41:38 so, would this be a request that could be made for changes-since? 16:41:47 (i'm not quite following the usage) 16:42:26 I'm not sure I quite follow it either because I'm not clear on what the existing implementation is doing 16:42:33 lol, ok 16:42:33 it's a filter 16:42:39 cdent: is the idea to get the entities that changed since a time, or the individual changes on them? 16:42:45 ah, that makes sense 16:42:47 why just "changes-since" instead of proper filtering on sortable property? 16:43:27 because changes-since is a baked in contruct in some of the sqla apis in projects 16:43:35 what does the existing thing do? 16:43:47 the construct is updated_at and also supports created_at iirc 16:44:09 right, so it turns into an sql filter around updated_at 16:44:21 and returns everything updated_at > changes-since 16:44:30 so what I'm asking is why not allow < or <= as well 16:44:30 for various data slices 16:44:32 this can be integrated into ryansb guideline on filtering I think 16:44:58 stevelle: could be, this is legacy stuff that's been there for a while 16:45:09 o/ 16:45:13 miguelgrinberg: +1 16:45:15 miguelgrinberg: yeah that probably gets to the core of my question: is changes-since is an implementation dependent use of generic sorting 16:45:19 and I agree, the filtering guide probably is an appropriate place to talk about it 16:45:32 sounds like it is 16:45:33 changes-since is very non-scalable (my 2 cents) 16:45:36 cdent: I see it as a query on a field of type timestamp 16:45:45 nikhil_k: why is it non scalable? 16:45:46 or datetime if you are Pythonic 16:46:29 If your database is N years old and your tenant has X thousand rows, this may result into a gigantic scan + join query 16:46:49 nikhil_k: no, it's scanning updated_at, which you've got an index on 16:46:54 so it's super scalable 16:47:04 you should index your datetime fields 16:47:24 right, exactly, if you don't... well good luck 16:47:27 right, but it won't return just the indexed rows 16:47:29 It actually helps scalability, as you don't pull data that hasn't changed 16:47:36 nikhil_k: yes it will 16:47:43 nikhil_k: explain the join bit 16:47:49 how about joins on other tables? 16:47:56 One example 16:48:04 nikhil_k: well, don't crazy overnormalize your tables :) 16:48:17 I can say without numbers on Rackspace public cloud that 16:48:29 nikhil_k: why is that worse than any other WHERE clause? 16:48:32 elmiko: (thanks for the barbican mention above btw, just caught up) 16:48:46 edleafe: right, exactly 16:48:52 The database is at least 5 years old and we have to purge the whole thing to keep only 90 days worth data to let the query run using chages-since 16:48:52 woodster_: np, i know you had some questions about it 16:49:16 The worst case scenario is in image properties table 16:49:34 well, images have other tables that join over images one (like locations) 16:49:34 nikhil_k: so I'd say that is a schema design problem 16:49:56 I don't think that changes-since is inherently non scalable, any more than any other criteria 16:50:19 So, for example a tenant asks for changes-since 2 years. All images that are public, shared (And visible) and self creates would be retrieved 16:50:45 nikhil_k: using pagination, correct? you are not going to get all in one batch 16:50:55 right, exactly 16:50:55 But it would be a mandatory thing for api that don't scale with it (unless I read the proposal wrond) 16:50:58 wrong( 16:51:11 the fact that you aren't paging is a different problem 16:51:25 miguelgrinberg: pagination is another big issue. 16:51:48 what's the problem? 16:51:55 we can set page sizes on clients, servers and apis that nova proxies 16:51:58 does the change-since topic need a post on ML, or can we debate it in the filtering review? 16:52:11 also, <10 min. left 16:52:12 so, the latency of fetching can be inconsistent 16:52:20 I think on the review elmiko 16:52:31 yeh, the filtering review should be fine 16:52:32 I hadn't realized raising the issue would be so interesting 16:52:42 cdent: k, cool. 16:52:55 I was just trying to determine the extent to which it is worth considering for elsewhere 16:53:01 #action cdent add changes-since language to filtering review 16:53:01 nikhil_k: so I'd argue that if we need to support changes-since that we should be able to change the response we provide 16:53:08 cdent: is that ok ^^? 16:53:09 so that we aren't joining tables if we dont' need to 16:53:27 my takeaway is that the specifics of using that term are not germane, there are better more generic ways 16:53:30 yup elmiko 16:53:35 so, I think we're exposing design issues in some of the projects in the process, which is good. In getting towards consistent APIs we're going to realize a lot of projects were just reflecting up very different db schema 16:53:36 I see, also pagination can't be really trusted 16:53:48 cdent: it's pretty generic for data polling 16:53:49 well it's possible to do it as two queries, one with fewer/no joins and then a load of just the new records 16:54:50 sigmavirus24: yeh, I think there is a lot of useful db optimization on a bunch of projects that makes all this work better as well, fortunately we can do db migrations to help on that as well :) 16:55:17 a little side-note, i had an action item from summit to contact the CPLs and do some outreach 16:55:31 sdague: glance hasn't had a good recent history with migrations =P 16:55:44 i've shared the nova-inspired liaison responsibilities, and merge process review with most of the listed CPLs 16:55:46 if there are no other topics, would you guys want to chat about HTTP caching? 16:56:07 miguelgrinberg: in 5 minutes? ;) 16:56:12 sdague: +1 on db optimization, input would be appreciated. I would in general be hesitent on changes-since. we never had good experience with it 16:56:25 cdent: I'm a dreamer :) 16:56:27 we are still looking for CPLs from congress, designate, magnum, mistral, murano, rally, triple-o, and zaqar. if you know anyone, let me know =) 16:56:55 miguelgrinberg: go for it, we'll carry over into openstack-api for those who are interested 16:57:21 just wanted to test the waters and see what you guys think. I really like to propose that we start adding caching headers to all APIs 16:57:36 miguelgrinberg: ++ 16:57:38 a middleware that does the basic support would be nice 16:57:48 i really like the middleware idea 16:57:49 maybe setting etags on all responses, and interpreting the conditional requests 16:58:04 so, I was talking with krotscheck about that the other day 16:58:11 eh? wha? 16:58:18 I'm not sure that etags middleware is going to do us a ton of good 16:58:27 because you'll have to compute all the resources 16:58:41 sdague: yes, it only saves bandwidth 16:58:49 you still have to run the server side handler 16:58:55 right, and bw is rarely the concern here. 16:59:13 If we can get clients to not make calls they don't need to, that's a huge win 16:59:21 so I'm thinking we have to add caching to our ersponses, so we might as well do the etags, since it does not hurt 16:59:43 but I don't think you can solve that with middleware, it has to be deeper in the project about what the cache-control really is for things 16:59:46 sorry, almost out of time, can we take this to openstack-api? 16:59:51 yeh 16:59:51 but even adding a basiline cache-control header will be helpful 16:59:55 thanks everyone! 17:00:01 #endmeeting