*** tetsuro has joined #openstack-placement | 02:01 | |
*** tetsuro has quit IRC | 03:37 | |
*** tetsuro has joined #openstack-placement | 04:06 | |
*** tetsuro has quit IRC | 05:30 | |
*** e0ne has joined #openstack-placement | 05:41 | |
*** takashin has quit IRC | 06:04 | |
*** e0ne has quit IRC | 06:11 | |
*** tetsuro has joined #openstack-placement | 06:38 | |
*** ttsiouts has joined #openstack-placement | 06:56 | |
*** tssurya has joined #openstack-placement | 07:14 | |
*** tetsuro has quit IRC | 07:17 | |
*** ttsiouts has quit IRC | 07:25 | |
*** tetsuro has joined #openstack-placement | 07:45 | |
*** tetsuro has quit IRC | 07:50 | |
*** ttsiouts has joined #openstack-placement | 07:57 | |
*** tetsuro has joined #openstack-placement | 08:43 | |
*** tetsuro has quit IRC | 08:47 | |
*** e0ne has joined #openstack-placement | 09:08 | |
*** altlogbot_2 has quit IRC | 09:24 | |
*** altlogbot_2 has joined #openstack-placement | 09:25 | |
*** takashin has joined #openstack-placement | 09:34 | |
*** takashin has left #openstack-placement | 09:36 | |
*** cdent has joined #openstack-placement | 09:37 | |
*** cdent has quit IRC | 10:41 | |
*** jaypipes has joined #openstack-placement | 11:26 | |
*** cdent has joined #openstack-placement | 11:46 | |
*** artom has joined #openstack-placement | 12:20 | |
*** mriedem has joined #openstack-placement | 12:47 | |
*** cdent has quit IRC | 12:47 | |
*** jroll has quit IRC | 13:07 | |
*** jroll has joined #openstack-placement | 13:08 | |
*** cdent has joined #openstack-placement | 13:14 | |
*** cdent has quit IRC | 13:23 | |
*** cdent has joined #openstack-placement | 13:48 | |
efried | cdent: Going to propose a new os-traits release (unless you already did that) | 13:50 |
---|---|---|
cdent | i have not, please go ahead | 13:52 |
efried | cdent: https://review.opendev.org/673294 | 13:52 |
*** artom has quit IRC | 13:54 | |
*** dklyle has quit IRC | 14:00 | |
*** dklyle has joined #openstack-placement | 14:00 | |
*** tetsuro has joined #openstack-placement | 14:20 | |
efried | tetsuro: you blew my freaking mind, again. | 14:23 |
efried | (apologies for the idiom - this is a good thing) | 14:24 |
*** tetsuro has quit IRC | 14:24 | |
efried | cdent: any idea where it's documented that "smaller dict compares smaller"? | 14:25 |
cdent | efried: I was just reading/thinking about that and don't have anything (yet) | 14:26 |
efried | It turns out to be a really hard thing to google for. | 14:27 |
efried | according to this, it's consistent but undefined: https://docs.python.org/2.3/ref/comparisons.html | 14:28 |
cdent | efried: well I don't think what you think is happening is happening | 14:29 |
cdent | because in python3 your example is TypeError | 14:29 |
efried | which example? | 14:29 |
cdent | d1 > d2 | 14:29 |
efried | mm | 14:30 |
efried | so then | 14:30 |
cdent | so something else than what you think is being sorted, I reckon | 14:30 |
cdent | tetsuro was saying it should be the keys | 14:30 |
cdent | which is the rp uuids | 14:30 |
cdent | but even then, it's not clear | 14:31 |
efried | I get the same TypeError for sorted([d1, d2]) | 14:31 |
cdent | yes, you would | 14:31 |
cdent | which is why it is something else | 14:31 |
efried | so let me try his solution in py3 for the gabbi... | 14:31 |
cdent | my guess is that /allocations is returning/operating something to the parser/processor that is not immediately obvious | 14:32 |
efried | cause if it works, it means gabbi (or jsonpath?) is overriding that sort impl somehow. | 14:32 |
cdent | I think it is more likely the case that we're not interpreting /allocations correctly | 14:32 |
efried | ah, nope, py3 gives that same TypeError. | 14:32 |
cdent | it's not gabbi | 14:32 |
cdent | it's jsonpath | 14:32 |
cdent | so is perhaps the answer to "I assume you tried it?" is "no"? | 14:33 |
efried | or tried it in py2, where it *does* work. | 14:34 |
efried | at least it worked for me. | 14:34 |
efried | And I would say it was sorting on rp UUIDs and I just got lucky, except the isolated test where I used 'zzz' and 'aaa','bbb' | 14:34 |
efried | It could also be sorting on like __id__ or something | 14:35 |
efried | and again just getting luckiy. | 14:35 |
efried | lucky | 14:35 |
efried | but the fact that it explodes in py3 makes it a no go anyway. | 14:35 |
cdent | that either of you are testing py2 is _huge_ bug | 14:35 |
cdent | forget about py2 | 14:35 |
*** ttsiouts has quit IRC | 14:35 | |
cdent | its only for the gate and distros. it is not our concern | 14:35 |
*** ttsiouts has joined #openstack-placement | 14:36 | |
*** ttsiouts has quit IRC | 14:40 | |
*** ttsiouts has joined #openstack-placement | 14:41 | |
*** jaypipes has quit IRC | 14:46 | |
*** belmoreira has joined #openstack-placement | 14:51 | |
openstackgerrit | Eric Fried proposed openstack/placement master: Extra gabbi tests for same_subtree https://review.opendev.org/669930 | 15:09 |
*** artom has joined #openstack-placement | 15:20 | |
*** ttsiouts has quit IRC | 15:23 | |
*** ttsiouts has joined #openstack-placement | 15:24 | |
*** tssurya has quit IRC | 15:26 | |
*** ttsiouts has quit IRC | 15:29 | |
*** e0ne has quit IRC | 15:30 | |
efried | cdent: Moving the logger "in the way you think you're moving it" | 15:34 |
efried | cdent: ==> "...until it works" | 15:35 |
efried | which is why I need your help to make it also be "...and makes sense" | 15:35 |
efried | because middleware is a big mystery to me. | 15:35 |
cdent | was my explanation (made before I had enough coffee) insufficiently clear to suss a next step? | 15:36 |
efried | Upon first reading, very unclear, but I'm 99% sure that's due to my ignorance and lack of context, not your explanation. | 15:36 |
cdent | how can I help? | 15:36 |
* efried reads a couple more times | 15:37 | |
cdent | it's not a one way stack, they are wrappers | 15:37 |
cdent | that have code on both sides of the "wrap" | 15:37 |
efried | oy | 15:42 |
efried | it's not clear from the comment in the code which thingy is being referred to as "microversion middleware" | 15:43 |
efried | but yeah, in any case it appears as though the comment is out of date wrt the req_id_middleware. | 15:43 |
cdent | the comment is out of date because the microversion middlware is now above the comment | 15:45 |
cdent | $the_stack(middleware(handler.py)) | 15:45 |
efried | oh, look, there it is. | 15:45 |
efried | Is it called the same way on both sides of the application? | 15:46 |
efried | "it" being the things in that list | 15:46 |
efried | so if the list is [a,b,c] what I'm understanding is we call | 15:48 |
efried | c(), b(), a(), application(), a(), b(), c() | 15:48 |
efried | right? | 15:48 |
efried | but are those calls all just __call__? Or, it kinda looks like it might be the responsibility of __call__ to set up whatever the call winds up being on the post-side | 15:50 |
efried | and some of them don't do that, so they in fact only get called on the pre-side? | 15:50 |
cdent | sorry efried, I'm in several conversations at once | 15:55 |
cdent | but yes, that interpretation is correcty | 15:56 |
cdent | if no 'replacement_start_response' is defined, then they generally only operate on the "in" side | 15:56 |
cdent | (what you're calling pre) | 15:56 |
efried | cdent: I got it sussed | 15:57 |
efried | based on this: https://opendev.org/openstack/placement/src/branch/master/placement/tests/unit/test_requestlog.py#L34-L35 | 15:57 |
efried | ...it's just a hole in the test fixture being used | 15:58 |
efried | added that same thing to the failing test and it works. | 15:58 |
openstackgerrit | Eric Fried proposed openstack/placement master: Do request_log middleware last https://review.opendev.org/673027 | 15:59 |
efried | cdent: ^ | 16:00 |
cdent | right, that's what I was trying to say when I pointed to blank's signature when leaving my comment | 16:00 |
cdent | will look in a sec, I'm trying to dredge my memory for why I ordered things as I did, all those years ago | 16:00 |
cdent | because there were reasons | 16:00 |
cdent | but some of it may have been as useless as "don't mix your ugly nova shit in my cookies" | 16:01 |
cdent | so probably time to re-evaluate | 16:01 |
efried | cdent: Your explanation now makes a lot more sense. | 16:01 |
efried | remember a week or two ago when I said some people learn by reading things and some by looking at examples. | 16:01 |
efried | Totally what happened here. | 16:01 |
* cdent nods | 16:02 | |
cdent | I tend to forget that "knowing wsgi" is not a required thing in the openstack community | 16:02 |
*** belmoreira has quit IRC | 16:05 | |
efried | I would expect that "knowing X" is not a required thing in the openstack community for all X except, like, git/gerrit | 16:05 |
efried | Even python isn't necessary for some projects | 16:05 |
* cdent sighs | 16:06 | |
efried | the thing that supposedly makes it work is that no one person needs to know all the things, as long as *somebody* (preferably more than one somebody, in case lottery/bus) knows each thing. | 16:06 |
efried | because the whole is greater than the sum of the parts and all that. | 16:06 |
* cdent knows all this | 16:06 | |
cdent | I wasn't commenting that people _should_ know wsgi | 16:06 |
cdent | just that I forget | 16:06 |
efried | looks like it *might* be oslo.middleware that's adding REMOTE_ADDR | 16:09 |
efried | none of the other thingies appear to reference it. | 16:09 |
cdent | that might be a bug, not really sure | 16:09 |
efried | I updated the patch in a way that I reckon makes sense anyway, so I reckon we can just move on. | 16:11 |
efried | The thing works in real life, and adding that env var to the blank thingy has precedent from the other test, so... | 16:12 |
cdent | yeah, it's not a bug in placement, but might be a bug in the oslo stuff | 16:13 |
efried | unrelated note, it looks like test_deploy.py and test_requestlog.py could probably be combined | 16:13 |
cdent | could be | 16:14 |
cdent | they were probably created as a "test this file", "test this other file" | 16:14 |
cdent | which for unit files at least, makes sense | 16:14 |
cdent | s/files/tests/ | 16:14 |
cdent | i'm super duper allergic today | 16:14 |
cdent | so not very smart | 16:14 |
efried | I'm not going to take the time to do it right now. Bigger fish. | 16:16 |
efried | but now I've mentioned it. | 16:16 |
cdent | efried: so | 16:21 |
cdent | if we put request_log after request_id_middleware, then the debug message in request_log (on the way in) will not have the request id, only the info long (on the way out) | 16:22 |
cdent | it should probably be request_id, requrest_log, everything else | 16:22 |
cdent | efried: since I'm in there, I will fix it, cool? | 16:24 |
efried | meaning request_id last in the list, so it happens first on the way in, and then request_log will pick it up in both directions? | 16:25 |
cdent | yes | 16:25 |
efried | that makes sense to me (now) | 16:26 |
efried | cdent: should I just reswizzle my patch? | 16:26 |
cdent | i already have something based off yours | 16:26 |
cdent | so will push them both up | 16:26 |
efried | since it's essentially going to be nullified by yours? | 16:26 |
efried | okay, shrug | 16:26 |
cdent | (this computer is so slow) | 16:31 |
openstackgerrit | Chris Dent proposed openstack/placement master: Do request_log middleware next to last https://review.opendev.org/673027 | 16:35 |
openstackgerrit | Chris Dent proposed openstack/placement master: Clarify the NOTE associated with ordering of middleware https://review.opendev.org/673335 | 16:35 |
cdent | hmm, I suppose I've confused the summary line now | 16:36 |
*** N3l1x has joined #openstack-placement | 16:43 | |
efried | cdent: perhaps the point is now "do request_id first" | 16:50 |
efried | although "do logging last so it gets the closest thing to the real payload" is also the point | 16:51 |
efried | but the both-sides-of-the-application thing makes first/last kind of a bendy concept | 16:51 |
efried | not so for reqid, which doesn't have an "after". | 16:52 |
efried | But for req log it's all or nothing. | 16:52 |
efried | it's almost like we should have two req log middlewares: on for the way in, which is done "last" (so first in the list) and another for the way out, which is also done "last" (so first on the list, but a no-op on the way in). | 16:52 |
efried | see, now I understand this thing juuuust enough to be really dangerous. | 16:53 |
efried | sorry, that last 'first' should have been 'last' | 16:54 |
efried | edit: it's almost like we should have two req log middlewares: on for the way in, which is done "last" (so first in the list) and another for the way out, which is also done "last" (so *last* on the list, but a no-op on the way in). | 16:54 |
cdent | at some point you have to accept that you middlware is middlware and that it works | 16:56 |
cdent | even without the e | 16:56 |
cdent | I reckon that my typing/spelling will improve at least 50% when I'm able to get rid of this macbook pro | 16:57 |
cdent | anyway, I'm going to soak my head | 16:57 |
* cdent waves | 16:57 | |
*** cdent has quit IRC | 16:57 | |
*** e0ne has joined #openstack-placement | 17:14 | |
*** artom has quit IRC | 17:14 | |
*** e0ne has quit IRC | 17:20 | |
*** artom has joined #openstack-placement | 17:44 | |
*** e0ne has joined #openstack-placement | 19:22 | |
*** belmoreira has joined #openstack-placement | 20:09 | |
*** e0ne has quit IRC | 20:46 | |
*** belmoreira has quit IRC | 21:17 | |
*** tetsuro has joined #openstack-placement | 21:45 | |
*** artom has quit IRC | 21:54 | |
*** mriedem has quit IRC | 22:11 | |
*** tetsuro has quit IRC | 22:49 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!