Friday, 2015-06-19

*** openstack has joined #openstack-api00:55
*** woodster_ has quit IRC01:31
*** Apoorva has quit IRC01:33
*** e0ne has joined #openstack-api06:25
*** e0ne has quit IRC06:31
*** fzdarsky has joined #openstack-api07:16
*** alex_klimov has joined #openstack-api07:45
*** cdent has joined #openstack-api08:16
*** lucasagomes has joined #openstack-api08:17
*** e0ne has joined #openstack-api08:18
*** e0ne has quit IRC08:25
*** e0ne has joined #openstack-api09:28
*** e0ne is now known as e0ne_09:52
*** e0ne_ is now known as e0ne09:54
*** e0ne is now known as e0ne_11:19
*** e0ne_ has quit IRC11:29
*** lucasagomes is now known as lucas-hungry11:32
*** e0ne has joined #openstack-api12:08
*** lucas-hungry is now known as lucasagomes12:35
*** woodster_ has joined #openstack-api12:40
openstackgerritRyan Brown proposed openstack/api-wg: Add section clarifying PUT vs PATCH semantics  https://review.openstack.org/18394512:42
*** HenryG has quit IRC13:05
*** HenryG has joined #openstack-api13:05
*** HenryG has quit IRC13:06
*** HenryG has joined #openstack-api13:07
*** _elmiko is now known as elmiko13:08
*** subscope has quit IRC13:56
elmikoso, i'm looking at the comments on the 1xx review(thanks btw), and in rewriting this i'm looking at 2 main points. 1) talking about this from the api behavior level, which is to say that most of the time the implementors will not have to deal with 1xx codes as they will be handled by the framework. and 2) in the cases where an implementor needs to use 100 continue that they should take care in implementing it as there are details both from13:56
elmikoi'd like to capture those sentiments and then provide some example links for the challenges.13:56
elmikosigmavirus24_awa, lifeless, notmyname, cdent, ^^ does this sound reasonable, and does anyone have suggestions for the links?13:57
cdentelmiko: makes sense but I'm afraid I don't really have any suggested links13:59
cdentI wasn't quite able to tease out the point lifeless was making in his question13:59
elmikoi think i get what lifeless is getting at, but i'm trying to figure out if i can provide something more concrete than just "be careful"14:00
cdentCan you rephrase it to me for the sake my poor bwains?14:02
elmikohere's my take:14:02
elmiko1. in most cases, implementors should not be concerned with generating 1xx responses in their code. this will be handled by the framework used.14:03
elmiko2. in the cases where implementors do need to use them, most likely for 100 continue, that they should take care in implementing these returns as the wsgi frameworks provide varying levels of coverage and the clients may have issues recieving them.14:04
*** pballand has quit IRC14:04
elmikothat's my understanding so far14:05
cdentyeah, I got that part too, what I didn't understand was:14:05
cdent"Is the WG issueing advice on *implementation*, or advice on *API behaviour*.14:05
cdentIf the former, we should be tailoring to wsme, pecan, falcon, and potentially java and go stacks. "14:05
elmikomy take was that lifeless was looking for more resolution on our scope.14:06
elmikoand i'm solidly in the "we are advising api behavior" camp, i suppose14:07
elmikoi just means all the research is on the implementor in terms of figuring out *how* to return the necessary responses14:07
elmiko*it just...14:07
dstanekelmiko: ++ on that scope14:08
cdentah okay. I think there's a considerable bit of "if you are trying to do X in your code then you are maybe trying to do the wrong thing"14:08
cdentthat's part of the educational mission14:08
cdente.g: if you find yourself wanting to "start_repsonse('100 ..." think14:09
elmikoagreed cdent, which i think we need to keep this 1xx language high level. but i recognize the we need to acknowledge there are legitimate uses for 1xx and those impls may be complicated.14:09
cdentyeah14:09
elmikoman.. too early for typing... /me sighs14:09
*** sigmavirus24_awa is now known as sigmavirus2414:12
elmikosigmavirus24: would love your opinion on the convo up there ^^14:31
sigmavirus24So I'm also in agreement with the scope, but these are also guidelines for OpenStack, and I think we should at least have a footnote explaining that WSGI (and frameworks sitting atop it) all woefully lack proper support for 100 continue, although I need to see how swift does it14:35
sigmavirus24lifeless: also was pointing out that, in his opinion, the 100 continue should be the responsibility of apache (I think that's the "framework" he was referring to)14:36
elmikointeresting...14:36
elmiko(about the apache part)14:36
sigmavirus24The other thing that I think we should stress is that 100 continue is not a response14:36
sigmavirus24elmiko: ah, lifeless called it the gateway14:37
sigmavirus24not the framework14:37
sigmavirus24"sigmavirus24: but thats a separate discussion: - the gateway in this case - e.g. apache2 - has to send it"14:37
elmikohmm14:37
elmikook, i need to read the rfc about 1xx again.14:37
sigmavirus241xx are not "responses", I forget the exact name that the RFCs have for it though14:37
elmikoright, interim codes or w/e14:38
sigmavirus24right14:38
sigmavirus24so let's please not confuse people by calling it a response14:38
sigmavirus24Otherwise we might see someone try to return 2 responses, one with 100 continue and the other after the upload, which is probably wrong in every wsgi application14:38
elmikook, that just makes it more confusing from the "providing api behavior guidance" level14:39
sigmavirus24elmiko: https://tools.ietf.org/html/rfc7231#section-6.2 calls it an "Interim Response"14:39
sigmavirus24yeah14:39
sigmavirus24I mean that's implementation details14:39
elmikoand that's the language i used in the guidance "interim response"14:39
sigmavirus24Which we don't have to mention explicitly14:39
sigmavirus24But I think these should be at least considerations. I think we should definitely encourage best practices, but we should also consider the reality of OpenStack's technical limitations14:40
elmikoso, is it accurate if we say something like; these interim responses *should not* be implemented in application code, unless there is a specific need for them (most usually 100 continue), and in those cases where they are needed *extreme caution* should be exercised by implementors. ?14:41
elmiko(i'm paraphrasing)14:41
cdentI think that's what we've been trying to say all along but haven't quite nailed it14:42
elmikoyea14:42
elmikowell, we didn't mention the "danger don't step on the tracks" or "sometimes these might be needed" parts14:42
sigmavirus24Re-reading https://tools.ietf.org/html/rfc7231#section-5.1.1 for the first time in a while makes me thing requests is not spec compliant. I don't think we do any reads before we finish sending the body14:42
elmikosigmavirus24: but we shouldn't have to worry about talking to that level in the guidance?14:43
sigmavirus24elmiko: more like "Danger, the third rail is electrified"14:43
sigmavirus24Yeah14:43
elmikohehe14:43
sigmavirus24This becomes the trick then14:44
elmikoi never realized how sticky this one would get lol, i'm learning a bunch though =)14:44
sigmavirus24Because the 5xx guideline also talks about application code14:44
sigmavirus24Which is an implementation detail14:44
elmikoyea14:44
sigmavirus24Not an API behaviour14:44
elmikoi need to revisit that as well14:44
sigmavirus24Which makes me wonder, do we need to split the guidance into implementation details and behaviour details?14:45
elmikoright, but i think the usage of broad language like "application code" shouldn't be too deep a dive into impl details14:45
sigmavirus24I was one of the people firmly against talking about oslo.utils for the truthy/falsey values14:45
sigmavirus24Yeah, I would hope it's not considered that way14:45
elmikoi'd be ok with creating impl details advice, but i agree it should entirely separate14:45
sigmavirus24I hope people are okay with shades of grey around this14:45
elmikome too14:46
elmikoeven if we are just doing api behavior advice, we will need to use terminology that references the part of this that is not just high-level api stuff. which is why i chose the term "application code"14:46
elmikooh well, i'll spin again and we'll see how it goes.14:47
sigmavirus24The comments on http://grammarist.com/spelling/gray-grey/ are golden14:47
sigmavirus24Because I always use "grey" and people tell me it's "gray" and I was curious what the difference was just now14:48
cdentI think there's a big difference between talking about oslo and talking about WSGI apps choosing to 100 or not (and advising that that in general they should not)14:49
elmikocdent: yea, agreed14:50
ryansbwhen folks t a chance, please review https://review.openstack.org/186546 so we can update the guideline template14:52
ryansbs/t a/get a/14:52
elmikoryansb: done14:53
ryansbHoping to bring it up for freeze next meeting14:56
elmikocool, not sure if we need to freeze the temple, but add it to the agenda ryansb14:56
elmikoactually, i need to fix up the agenda wiki for next week. needs a little trimming14:57
ryansbyeah, I'll add when I get a few more reviews, so I'm sure it'll be set to go.14:58
elmikocool, thanks!14:58
ryansbI think the template is important enough to freeze for, since it matters to all guidelines going forward14:59
ryansbbut that's just IMO14:59
elmikogood point, and that makes sense to me14:59
lifelesssigmavirus24: FWIW i'm ok with shades of grey15:00
lifelessi asked about scope to tailor my reviews of the guidelines15:00
sigmavirus24lifeless: yeah that's fair15:00
sigmavirus24I just think we're all more heavily on the "Behaviour" side15:01
lifelessor gray15:01
elmikolifeless: thanks for bringing it up, i think it helps me too as i can better understand how to approach these in a more complete manner15:01
lifelessor greay15:01
lifelessor graey15:01
sigmavirus24But there are caveats where we might serve the readers best by dipping into some minor impl details15:01
lifelessexactly15:02
elmikoand that's where i could use some helpful nudging, i'm a little unsure as to how far into impl we need to dip15:02
* ryansb senses a guideline for proper spelling of grey coming soon to a WG near you15:02
elmikohaha!15:03
cdentelmiko: ItDependsā„¢15:03
cdentI don't think there's going to be a magical heuristic that tells us what to do15:03
elmikoagreed15:04
elmikook, so here's a question along those lines. should i be using the term "HTTP framework" or "WSGI framework"?15:05
elmiko(when referring to whence these codes should commence)15:05
cdentFor sake of fleshing out the context: why would you ever want to say either?15:05
cdentmy feeling is that these guidelines are >90% for people writing python code that happens to be able to return http response codes some of the time15:06
elmikohmm, i don't think so, but i want to be sure that "WSGI framework" covers the extend of libraries we use for doing http stuff15:06
cdentI call that code "the app"15:06
cdentswift has special cases all over the map, but that's what swift does15:06
elmikothat's how i brek it down internally as well, app = code that you wrote which runs on top of a framework15:07
cdentbut if you are sending and receiving JSON objects back and forth...?15:07
elmikofor me, framework = the library which is helping to negotiate all the HTTP factors involved15:07
cdentearly on we decided that we were not going to try to police frameworks (e.g. pecan not being able to do 405 (it almost fixed it btw, but there are bugs))15:07
cdentbut there's no reason we can't police how frameworks are called15:08
elmikook, yea. that's kinda what i was thinking too15:08
cdentso if you have a situation where you want to say "don't explicitly do 500"15:08
cdentit doesn't matter if you are talking about the framework or app code or whatever15:09
cdentit's: in the place where you have control, don't do this bad thing15:09
elmikoright15:09
elmikounless you absolutely need to, and understand the implications15:09
elmikoi feel like that should be a caveat for all these guidelines though...15:09
elmikothanks, that helped. i gotta run out for a bit, back later15:10
* cdent waves and bows15:10
elmikosigmavirus24, lifeless, thanks to you guys as well. i'm sure i'll have more questions later =)15:10
sigmavirus24lifeless: and I should form an information team "RFC Wonks"15:11
elmikoha!15:11
lifelessso yeah15:11
lifelessI'm going back to bed but15:11
* elmiko wishes he had more time for rfc wonking15:11
lifelessa) we have a wide spread of pure WSGI through to eventlet-extensions-of-WSGI depending on what tree and what framework15:11
lifelessfor 100 specifically WSGI doesn't deliver useful 100 continue functionality.15:12
lifelesshttps://www.python.org/dev/peps/pep-3333/#http-1-1-expect-continue is the spec15:12
lifelessnotice: the server or gateway must do that - thats the thing that actually is on the HTTP socket, not the WSGI app or WSGI middleware15:12
lifelesseventlet offers an extension, which swift uses to customise the 100 response sent, but in general it should be entirely automatic15:13
lifelessand - in WSGI land including the swift use of eventlet extensions, anyone doing yield ([('100', 'Continue'),.... is going to break things so badly its not funny15:13
elmikook, so neither the "app code" nor the "framework code" should be making these interim responses directly. they should deligating that to the gateway?15:14
ryansbcdent: do we have the "no explicit 500" rule in a guideline yet?15:14
lifelessbut at the API level 100's are a MUST15:14
ryansbelmiko: lifeless ^^15:14
cdentryansb, yeah, lemme find it15:14
ryansbthanks15:14
elmikoryansb: i'm working on this https://review.openstack.org/#/c/18369815:14
cdenthttps://review.openstack.org/#/c/179365/15:14
lifelesselmiko: I think a block diagram might be useful15:15
cdentI guess the "no explicit" part faded out of that15:15
elmikolifeless: interesting, i might have to circle back around on that when you are up again. what timezone are you in?15:15
lifelesselmiko: client <here we care about the RFC's and 100's are a must> Server .... WSGI gateway/server [here we must not care about 100] Python code15:15
lifelesselmiko: UTC+1215:16
lifelesselmiko: the API behaviour is speciying what folk see from the outside, but the impl hints are for the inside15:16
lifelesselmiko: and they are diametrically opposed for this case, for the impl-is-WSGI set15:16
elmikolifeless: ok, thanks. i'm gonna need to let this settle in more. expect another revision of the 1xx stuff, but i imagine i will need more help refining it.15:17
lifelesscdent: why would we say 'no explicit 500's' ?15:17
cdents/no/rare/15:18
cdentbecause if you know an exception happened, such that you can trap it, you also can decode it to something more meaningful15:18
cdentpeople have a tendency to use 500 as a way of sort of throwing up their hands, rather than being properly defensive and informative15:19
cdentanother way to put it: a lof of 500s could be 4xx with some effort15:19
lifelessI think thats a lot better way to put it15:20
lifelessotherwise we'll get noddy reviews where folk have to climb a high barrier to do the right thing15:21
cdentor sometimes 50215:21
lifelessif we have a direct test, thats much better than saying 'X should be very rare' and making everything a special case15:21
lifelessjay's prose is entirely good to me15:21
* cdent sighs15:22
cdentI lost the network there for a bit15:22
lifelessoh, I thought that was on my comments ;)15:22
lifelessanyhow, I really must go back to sleep or I'll be a wreck in the daytime15:22
lifelessciao15:22
* cdent waves15:22
*** cdent_ has joined #openstack-api15:25
*** pballand has joined #openstack-api15:26
cdent_nnnnnggg15:26
*** cdent has quit IRC15:29
*** cdent_ is now known as cdent15:29
*** alex_klimov has quit IRC15:56
*** e0ne has quit IRC16:10
*** Apoorva has joined #openstack-api16:54
*** lucasagomes is now known as lucas-beer17:01
*** e0ne has joined #openstack-api17:38
*** cdent has quit IRC17:45
elmikoanyone know if i can have a change depend on 2 patches?18:40
elmikobasically, i want to rebase on top of 2 different commit to ensure that those advice is in the patch i'm creating18:40
sigmavirus24elmiko: no18:45
sigmavirus24The only commits that can have 2 parents are a merge commit18:45
sigmavirus24afaik18:45
sigmavirus24You're essentially saying "This commit has two parents" which I've never seen otherwise and I'm not certain if git gives you a way to do it18:45
elmikosigmavirus24: ok, thanks. i thought it kinda had a bad smell to it18:46
ryansbyeah, has to be a merge (afaik) to have many parents18:46
elmikoi'm rewriting the 5xx advice thing, and i want to add a sentence about looking at the 500 and 501 specific advice18:46
sigmavirus24elmiko: if it has to depend on two other changes, one of those changes has to have the other as a parent18:46
elmikoack, makes perfect sense18:46
elmikosigmavirus24: 502, 503, 504 and 505 should never be generated by application code? these should only come from some sort of gateway device or something?18:56
sigmavirus24yeah18:57
sigmavirus24that's my inkling at least18:57
sigmavirus24let me look at what those codes typically are18:57
elmikook, i'm mentioning 500 and 501 specifically. i might as well call out those as not being generated by app. code18:57
*** lucas-beer has quit IRC19:17
elmikosigmavirus24: hmm, i'm wondering about 503 (service unavailable) now. i could see a situation where someone might make a case for wanting to return this from application code. for example, if the server implements some sort of "maintenance mode" or something. what do you think?19:25
sigmavirus24But that wouldn't be returned from a single endpoint, that'd be in middleware, no?19:25
sigmavirus24I would expect the middleware, not the application, to be implementing that19:26
sigmavirus24Although, I'm not sure how realistic that use case is19:26
elmikoi would expect it to be from middleware, or some specific app in place. maybe i'm overthinking this19:26
stevelleI would say it is from reverse proxies and gateways.19:29
elmikothanks, that makes sense19:30
stevelleNginx rate throttling unfortunately uses 503, for example19:30
stevelleAmazon's rate throttling gives 503s as well, again misuse.19:30
stevellethat may or may not be Nginx19:31
openstackgerritMichael McCune proposed openstack/api-wg: Adding 5xx guidance  https://review.openstack.org/18369819:31
elmikook, lets see how that works19:31
elmikodstanek: ^^ i'm curious if this is closer to what we've been talking about with respect to keystone19:32
dstanekelmiko: i think so, yes19:45
elmikodstanek: awesome, thanks for helping me out =)19:45
dstanekelmiko: hey, you're doing all of the work, so thank you!19:46
elmikohehe19:47
sigmavirus24If-Modified-Since is a really confusing header20:04
elmikohow so, seems kinda straight forward in the rfc20:11
elmiko?20:11
*** e0ne has quit IRC20:11
sigmavirus24Most people don't read that20:26
sigmavirus24see the mailing list20:26
elmikok20:27
notmynameelmiko: I'm here now20:43
elmikonotmyname: hey20:44
elmikoso, i'm just curious to understand a little more about how swift uses the 100-continue from the application layer, i think i understand conceptually why it's needed20:44
elmikoto frame this,20:45
elmikoi'm trying to rewrite the guidance in a way that pays attention to the need for some application to generate the continue, but i'm a little confused after reading the rfc about where this code comes from20:45
*** fzdarsky has quit IRC20:46
notmynamethere are some interesting things we're using for internally (ie between swift processes), but the basic user-facing use case is pretty simple20:46
notmynameif you send a "Expect: 100" header in a request, we'll send back a 100 Continue response line based on the contents of the headers (ie before we read any bytes from the body)20:47
notmynameso it's a way to fast-fail if eg you want to upload something bigger than the max object size and have a content-length header20:48
notmynameor otherwise bad headers/request info20:48
notmynameI can give you an example pretty easily. let me star t up my saio20:48
elmikocool20:49
notmynamesuccessful example: https://gist.github.com/notmyname/efa3ddca6e1fb3083d6f20:50
* elmiko reading20:51
elmikook, that makes sense20:51
elmikoand is the swift application code handling the logic about sending the 100 ?20:51
notmynameI set the max object size to 10MB and here's a failure example: https://gist.github.com/notmyname/f87d19ccca7800bfee9a20:52
notmynamein this case, the application is curl, and yes20:52
elmikoand on the server (swift) end, how does it handle returning the 100, followed by the 201?20:53
notmynameswift does that in with our HTTPConnection wrapper, but actually it's handled by eventlet20:53
elmikointeresting20:54
notmynameif the expect header was in the request, the 100 Continue is sent when we start reading the bytes off the body (ie the app_iter)20:54
notmynameunless we've already sent/set a response, in which case that's what you get on the client side20:54
elmikohow do you coordinate the error example with that?20:55
elmikolike, how does eventlet know to send the 413?20:55
elmikoer HTTPConnection wrapper20:55
elmikoor i guess, is it just "if Content-Length > max object size then return 413"20:57
notmynamelet me trace that through to give you some links20:57
elmikocool, i appreciate it =)20:57
notmynameok, thanks for waiting. took me a bit to walk through it21:07
elmikonp21:07
notmynameit's been a while since I've looked at that part of the code :-)21:07
elmikohehe21:07
elmikoi'm keeping you on your toes ;)21:07
notmynamehttps://github.com/openstack/swift/blob/master/swift/common/bufferedhttp.py21:09
notmynameoh wait :-)21:10
notmynameI may have found something else21:10
notmynamebut that BufferedHTTPConnection class is kinda where swift consolidates it21:10
notmynameah. there it is21:12
notmynameok, 2 places. one in swift, one in eventlet21:12
elmikok21:12
lifelesselmiko: so the WSGI spec is this: the WSGI gateway MUST be responsibe for it.21:12
lifelesselmiko: eventlet then offers an extension API that lets you explictly trigger it with some custom headers21:12
notmynamenot quite21:12
lifelessnotmyname: I climbed through the code last night, so I'm curious what I've missed21:13
notmynameso the eventlet.wsgi.Input class has the feature21:13
lifelessnotmyname: https://www.python.org/dev/peps/pep-3333/#http-1-1-expect-continue is the WSGI spec bit21:13
lifelesshttp://eventlet.net/doc/modules/wsgi.html#continue-response-headers is the eventlet extension21:13
notmynamein Input()._do_read() as soon as you start reading the input, eventlet sends the 100-continue response21:13
elmikolifeless: i did read that in the wsgi spec after you posted it yesterday21:13
lifelessnotmyname: yes, thats conformant with WSGI (and isn't even an extension)21:14
lifelessnotmyname: swift/obj/server.py is where I found the eventlet extension use21:15
lifelesslines 632 and 56221:16
notmynamelifeless: what method? that doesn't seem to line up with current master? what's it look like?21:17
notmynameelmiko: because of that eventlet behavior, if you set a response before you read anything from wsgi.input, you get the 100-continue handling. swift's buffered connection wrappers (linked above) provide us some helpers to read those from the storage servers and then we can return the right thing to the client21:18
lifelessnotmyname: oh, I'm a month out21:18
notmynameelmiko: but mostly, like with the examples I pasted above, that's free from event. ie we didn't write special code to handle that other than just setting a response _before_ reading anything from wsgi.input21:19
lifelesslet me update my tree21:19
notmynamelifeless: are you talking about the multi-phase commit stuff?21:19
elmikonotmyname: ack, makes sense. you need to intercept the call to ensure that hte object is not too big before doing the read from eventlet or it will automatically return the 100, is that accurate?21:19
lifelessnotmyname: 'set a response' - where are you doing that pattern? - middleware response objects aren't part of WSGI21:19
notmynameelmiko: yes. as soon as you call Request.environ['wsgi.input'].read(), the 100-continue handling is done in eventlet21:20
lifelessnotmyname: line 562 and line 632 still in swift/obj/server.py21:20
lifelessnotmyname: thats done for both multiphase *and* has-metadata-footer21:21
elmikonotmyname: got it. so would it fair to say that in this case the swift code is very much reaching through the boundary between "application code" and "wsgi framework code" to achieve the desired result?21:21
lifelessnotmyname: if you can help me find this 'set a response' thing tat would be grand?21:21
notmynamelifeless: nah, no special extensions there. but we did patch upstream eventlet to support header values returned with a 100 continue response. that's what we're using there21:22
notmynamelifeless: both of those parts are part of the same "multiphase commit" thing21:22
lifelessnotmyname: so the metadata_footer is only used in multiphase commit ?21:23
notmynameelmiko: I don't know that I'd agree with that phrasing. let me find a specific place we do the response before reading for you and lifeless. that might make it more clear21:23
notmynamelifeless: yes. that's actually one of the "phases" in multi-phase ;-)21:23
lifelessnotmyname: ack21:23
lifelessso yeah, please do find the other place you do manual 100 stuff21:23
elmikonotmyname: ok, maybe a poor choice of words21:24
notmynamelifeless: that's our wacky internal protocol way to implement footers instead of headers. http says you can do footers, but _nothing_ supports that. this was easier, believe it or not :-)21:24
notmynamelifeless: well, we don't do manual 100 checking. that is, the only "manual" step is not to read wsgi.input21:24
elmikonotmyname: i feel like you are definitely working the border of the framework code though, this is some deep dive type stuff imo21:25
notmynamehttps://github.com/openstack/swift/blob/master/swift/proxy/controllers/obj.py#L883-L92021:25
notmynameso look at that section21:26
lifelessnotmyname: oh, I'm well aware about how spotty trailer support is21:26
notmynamefirst we do some basic sanity checking21:26
* elmiko reads21:26
notmynamethen we check auth21:26
lifelessnotmyname: you forget my heritage in HTTP :)21:26
notmynamethen we check constraints (object length, metadata, etc) in check_object_creation()21:26
notmynamelifeless: or didn't/don't know it ;-)21:26
notmynameif anythign is amiss, we return the response object.21:27
lifelessnotmyname: oh, squid core developer (inactive these days, but very active in early 2000's)21:27
notmynamenote that we don't actually call the wsgi.read until the _store_object(). actually, that has some more checking too before we call read()21:28
lifelessnotmyname: ok, but - this is just PEP-3333 expect handling, isn't it?21:28
lifelessnotmyname: 'don't read from input unless you're willing to have 100 sent'21:29
notmynamethe read() isn't called until in _transer_data() in line 78221:29
lifelessnotmyname: btw, are you interested in h2 support in swift?21:29
notmyname(note it's in an iter by that point)21:29
elmikonotmyname: just to continue my understanding, when you call the reader at https://github.com/openstack/swift/blob/master/swift/proxy/controllers/obj.py#L936 is when eventlet will automatically send the 100?21:30
notmynameelmiko: that just wraps it in an iter. doesn't call it yet :-)21:30
elmikonotmyname: wow, the rabbit hole goes deeper ;)21:30
notmynameelmiko: look at line 78221:30
elmikook, got it21:31
lifelessnotmyname: ok, so this isn't what I'd call 100 utilisation - in that you're not specifically generating or customising the 10021:31
elmikohmm, this gives me much food for thought.21:31
lifelessnotmyname: what I tink you're saying is just that you wrote things carefully to ensure the gateway (eventlet here) doesn't send a 100 until you've actually done your pre-flight checks for auth etc21:32
notmynamelifeless: from the client point of view, we are using the functionality. but to implement it, we're "just" doing the right thing with eventlet21:32
lifelessright21:32
notmynamelifeless: correct21:32
notmynameand I think it's pretty important21:32
lifelessI agree21:32
notmynamenow, internally, we're doing something more interesting21:32
lifelessmy issue with the advice that was drafted was that it was nonconformant with the RFC :)21:32
notmynamethat's the multiphase stuff for EC that uses http with 100 Continue as a request/response protocol ;-)21:32
notmyname(yes it's rather icky)21:33
elmikothis is very nuanced, but i think we need to explain some of it if only for the purpose of helping a new developer understand to not just return Response(100, ...) (for example)21:33
lifeless100 is essential for 1.1 clients (except Python clients, because most of them are broken)21:33
lifelesselmiko: I don't think you do.21:33
lifelesselmiko: because that simply won't work.21:33
elmikolifeless: right, but i think we want to say that the framework should be responsible for the 100, but that if you need to control behavior around it you better understand the rfc and understand how the framework handles it. does that seem fair?21:34
elmikonotmyname: ^^21:37
notmynameor "don't do dumb things"?21:38
elmikohaha21:38
elmikosomeone i don't think i'll get away with that ;)21:38
notmynameI don't see a lot of value in guidelines that basically say "follow the RFC and know what you're doing"21:39
notmynameand as an extension, I don't see what clarification to the RFC is needed for the API-WG21:39
elmikoagreed, i was actually going to call out the example of needing to validate an input for sizing or something to help drive the point home21:39
elmikodo you think we should just skip the 1xx advice then?21:40
notmynameie if you want to offer 100-continue support in your openstack project, do that. however is appropriate for your chosen framework21:40
elmikoright, that makes sense21:40
notmynameyeah, I'd be totally fine with no API-WG voice on 1xx support21:40
notmyname(less is better)21:40
elmikook, i'll add this to the agenda for the next meeting21:40
notmynameI'm sure you're shocked (shocked! I tell you) to hear me of all people say that ;-)21:40
elmikowell, i've mainly been trying to implement some guidance for the sections we had listed. i was under the, false, impression that 1xx would be straight forward, but it's actually a little more nuanced than that.21:41
elmikothe other part of this is that the wg has decided that part of the goal of these documents should be informative, so i disagree with you a little about not having anything for 1xx.21:43
notmyname:-)21:43
elmikoregardless, many thanks for helping me understand this better. i do appreciate you taking the time to walk me through it.21:44
notmynamein that case, using swift as an example of how 100 continue can be effectively used is ok :-)21:44
notmynamemy pleasure21:44
notmynameI like the chance to walk through dusty sections of the code21:44
elmikonotmyname: you don't happen to have an opinion on the use of 101?   ;)21:44
elmikohehe21:44
sigmavirus24lol21:45
notmyname101 is eg switching to http/2 right?21:45
sigmavirus24I think Swift is the best use case for using 100 continue21:45
notmynamelifeless: oh you asked me about that21:45
elmikosigmavirus24: total agreement21:45
sigmavirus24Glance would be too21:45
sigmavirus24But ... well ... glance is glance ;)21:45
elmikoi might file off the serial numbers though, i think the use case in general is very applicapable21:45
sigmavirus24Maybe we can introduce it in artifacts21:45
elmikonotmyname: yea, 101 is switching protocols21:46
sigmavirus24elmiko: for large request bodies being uploaded, yes21:46
sigmavirus24How applicable that is to openstack, I'm not sure21:46
elmikosigmavirus24: i just don't like mentioning projects by name in the guidelines21:46
notmynameI'd say there's more use to 100 than just swift/glance. mostly it's a question of if processing the body is cheaper than transferring the body. ie 100 is good when it's expensive to put the body of the request ont he wire21:47
notmynamelifeless: you asked me about http/2 right?21:47
sigmavirus24we can't even pat projects on the back for doing the right thing?21:47
elmikosigmavirus24: maybe we can have an accolades section ;)21:47
notmynamelifeless: sure, and I've talked with mnot briefly about it a while back. but it would be a lot of work, and so it's a matter of prioritization. compared to other stuff going on, there's not a lot of demand for http/2.21:48
elmikosigmavirus24: seriously though, i think we should just tend not to because, imo, it introduces a level of brittleness into the docs. like, would we need to continue checking on those projects/implementation to ensure they have continued to "do the right thing".21:49
sigmavirus24proposal, if a project breaks our docs21:49
notmynamethere's only marginal benefit for swift supporting http/2. yes, some use cases would be great (eg content served to web browsers). but eg with storing backups or file-sync/share, it doesn't help a lot21:50
sigmavirus24they're put in the wall of shame21:50
elmikosigmavirus24: LOL21:50
notmynamelifeless: but, that's just, like, my opinion, man21:50
elmikoi think we need a new project for openstack, the Wall of Shame as a Service21:50
sigmavirus24openstack wall of shame21:52
notmynameI'm sad that everyone hates on glance. there's so much potential there. I'd love to see glance as a general indexing service for other projects. it already tracks compute images. it would be cool eg for it to also track objects in swift (show me all the images that are blue that were uploaded before last week).21:52
sigmavirus24notmyname: I'm a glance core/driver21:52
sigmavirus24So I'm mostly making fun of myself at this point21:52
sigmavirus24That said, we have a lot of split focus in glance21:52
sigmavirus24A lot21:52
elmikoi must be too new to openstack, i seriously do not pickup on all this hate21:52
sigmavirus24elmiko: did you see termie's talk at the summit?21:53
notmynamesigmavirus24: one thing we're working on in swift is metadata indexing. I think it would be great to store that in glance (or notify glance for glance to index it). instead, it seems I'm going to need to work with elasticsearch or something and add somethign new to the mix21:54
elmikosigmavirus24: not sure, which one was that?21:54
sigmavirus24elmiko: https://www.openstack.org/summit/vancouver-2015/summit-videos/presentation/openstack-is-doomed-and-it-is-your-fault21:54
sigmavirus24notmyname: that's what OpenStack Searchlight is for21:54
sigmavirus24Searchlight sits atop Elasticsearch and provides search/indexing21:54
sigmavirus24Searchlight is being ripped out of Glance during Liberty21:54
elmikosigmavirus24: no, i did not see this. gonna have to watch it.21:54
sigmavirus24elmiko: I won't spoil the talk for you21:55
* elmiko goes off to watch21:55
sigmavirus24It was enjoyable21:56
elmikothe description looked funny, can't remember why i missed it. probably talking too much lol21:56
sigmavirus24yeah21:58
*** pballand has quit IRC22:06
etoewsbest quote from termie's prez "stop with the terrible apis already"22:12
sigmavirus24yep22:18
*** alex_klimov has joined #openstack-api22:23
elmikosigmavirus24: good talk, although a bit depressing for a friday afternoon22:39
sigmavirus24yeah sorry22:40
elmikolol, no you're not!  ;P22:40
sigmavirus24true22:41
elmikoHAHA22:41
*** alex_klimov has quit IRC22:41
elmikohonestly thought, really good feedback from termie. i worked in closed source for almost all of my career (20yrs), and this has been the most fun project i've worked on.22:45
elmiko(maybe some of my early days as a game dev come close)22:45
*** terrylhowe has left #openstack-api23:00
openstackgerritEverett Toews proposed openstack/api-wg: Add reviewers to an API WG review  https://review.openstack.org/19375323:16

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!