clarkb | how do you coordinate betamax across multiple services? | 00:01 |
---|---|---|
clarkb | like that a thing? | 00:01 |
clarkb | for example booting from volume based on an image is going to hit all the apis | 00:02 |
clarkb | nova, neutron glance cinder keystone maybe swift | 00:02 |
mordred | clarkb: yah - it doesn't matter - betamax (And requests_mock) is mocking at the requests.Session level | 00:21 |
mordred | clarkb: all of teh client libs (where we're using them) and the direct calls all use a shared Session | 00:22 |
mordred | clarkb: so the betamax file just has full URLs for things | 00:23 |
mordred | clarkb: example (abandoned): https://review.openstack.org/#/c/343916/3/shade/tests/unit/fixtures/citycloud/test_create_flavor.yaml | 00:23 |
mordred | also the fact that create flavor serializes to 9334 lines of yaml with json payloads as multiline strings is ... well ... it's a bit verbose | 00:25 |
mordred | morgan: ooh - I just had an idea for a different betamax serializer format ... | 00:26 |
morgan | mordred: "pirate"-formatter | 00:27 |
morgan | mordred: it uses "Ar" to make the stuff smaller? | 00:28 |
mordred | morgan: a run-parts-style directory - file per request and response - with {index}-{verb}-{serialized_url}.{request|response} - and then the files are first time VERB url, followed by headers/body in rfc822 format | 00:28 |
morgan | mordred: /me sees self out | 00:28 |
mordred | it's not terribly hard to write or parse, but reading it should be super easy on the eyes | 00:28 |
morgan | mordred: i was thinking that early on, and then we use tar to bundle it into a single file in the repo | 00:28 |
mordred | sure - or it could just be a billion files if you wanted - but yah | 00:28 |
morgan | mordred: tar (optional) | 00:28 |
mordred | should be nice and easy to browse an interaction that way | 00:29 |
morgan | but if a single test was a tar file of responses... it would be nicely encapsulated | 00:29 |
mordred | yup | 00:29 |
morgan | and easy to view if you needed to dig in | 00:29 |
morgan | and highly compressible | 00:29 |
morgan | since.. text | 00:29 |
morgan | a | 00:29 |
mordred | yup | 00:29 |
morgan | and mostly whitespace at that | 00:29 |
clarkb | just remember to let git do the compression for you :) | 00:33 |
*** jamielennox is now known as jamielennox|away | 01:07 | |
*** jamielennox|away is now known as jamielennox | 01:21 | |
*** gouthamr has quit IRC | 04:33 | |
*** gouthamr has joined #openstack-shade | 04:55 | |
*** gouthamr_ has joined #openstack-shade | 04:57 | |
*** gouthamr has quit IRC | 05:00 | |
*** yfried has joined #openstack-shade | 05:44 | |
*** gouthamr_ has quit IRC | 05:52 | |
*** yfried has quit IRC | 06:25 | |
*** ioggstream has joined #openstack-shade | 08:31 | |
*** openstackgerrit has quit IRC | 10:18 | |
*** ioggstream has quit IRC | 12:25 | |
thingee | mordred: re fujitsu cloud, yeah got a notification on you responding to that. ugh... | 12:40 |
*** ioggstream has joined #openstack-shade | 13:23 | |
mordred | thingee: yah. :( | 13:33 |
Shrews | mordred: oh wow. bad fujitsu | 13:37 |
*** gouthamr has joined #openstack-shade | 13:56 | |
mordred | morgan: two thoughts inspired by your patches | 14:04 |
*** Shrews has quit IRC | 14:29 | |
*** Shrews has joined #openstack-shade | 14:32 | |
*** yolanda has quit IRC | 15:38 | |
*** yolanda has joined #openstack-shade | 15:38 | |
mordred | a) we should maybe make a method on OpenStackCloud that's similar to the first 2 things in _get_mock_url that gets an endpoint for a service type (I frequently dig in to the session directly to grab that as well) | 15:40 |
mordred | b) it might be nice to extend self.register_uri to include a service param - so that you could say "self.register_uri('GET', 'identity', '/users')" and have the _get_mock_url piece you've got there be in the base class (the way I did this for nova urls is wonky and gross) | 15:46 |
*** openstackgerrit has joined #openstack-shade | 15:48 | |
openstackgerrit | Monty Taylor proposed openstack-infra/shade master: Add accessor method to pull URLs from the catalog https://review.openstack.org/432358 | 15:48 |
openstackgerrit | Monty Taylor proposed openstack-infra/shade master: Add request validation to user v2 test https://review.openstack.org/432366 | 16:06 |
mordred | morgan: ^^ also, that second patch is an example of doing request validation as well | 16:13 |
openstackgerrit | Monty Taylor proposed openstack-infra/shade master: Add all_projects parameter to list and search servers https://review.openstack.org/432382 | 16:58 |
*** stevemar has left #openstack-shade | 17:10 | |
*** cdent has joined #openstack-shade | 17:45 | |
*** yolanda has quit IRC | 18:14 | |
*** yolanda has joined #openstack-shade | 18:16 | |
*** ioggstream has quit IRC | 18:21 | |
*** cdent has quit IRC | 18:34 | |
morgan | mordred: yeah i was going to a pass on the validation bit when nuking keystoneclient | 18:34 |
morgan | mordred: i figured keystoneclient knows how to format things sanely | 18:34 |
morgan | mordred: if it doesn't... :P | 18:35 |
mordred | morgan: yah - but we want to put the test there so that when we replace ksc with rest the tests don't change and we validate that our new code correctly submits the right thing | 18:54 |
morgan | mordred: dude...................... | 19:01 |
morgan | mordred: when we drop ksc we can be a ton less chatty | 19:01 |
morgan | mordred: yeha my plan was convert to mock_requests, add validation, drop ksc | 19:01 |
morgan | in that order | 19:01 |
morgan | just to try and keep the code more reviewable | 19:02 |
morgan | but i can bundle mock_requests + validate | 19:02 |
morgan | This is just silly: | 19:02 |
morgan | https://www.irccloud.com/pastebin/zvkzqgxA/ | 19:02 |
morgan | get users, get user, put user, get user, put user, get user | 19:03 |
morgan | that is absurd. | 19:03 |
morgan | well it's stupid cause OS-KSADM for password... which afaict isn't needed now | 19:04 |
mordred | morgan: yes to less chatty :) | 19:05 |
morgan | then again this whole V2 thing is still so awful to work with | 19:06 |
morgan | =/ | 19:06 |
mordred | morgan: well, luckily v3 coverage on public clouds seems to actually be quite good | 19:06 |
mordred | morgan: I was pleasantly surprised yesterday at how well it was covered | 19:07 |
* morgan nods. | 19:07 | |
morgan | oh ugh, i... i think i need to rebase a bunch of the stuff into a merged tree inc. your new change for the validate bits | 19:08 |
morgan | mordred: uh. validate=<blah> does nothing atm | 19:34 |
morgan | fyi | 19:34 |
morgan | we're not actually using that anywhere | 19:34 |
* morgan just checked with bogus values | 19:34 | |
morgan | and it still passes | 19:34 |
mordred | uhm - it totally does | 19:35 |
mordred | because I started that patch with validate=dict(json={}) | 19:35 |
mordred | and then looked at the diff that was reported in the error | 19:36 |
morgan | i just put a bogus dict in and the test(s) still pass | 19:36 |
morgan | oh blah | 19:37 |
morgan | it only works if you specify as json= | 19:37 |
morgan | we should make that more intuative. | 19:37 |
mordred | validate takes more than just json ... but yeah- we should maybe throw an error if you pass an unknown key to validate for sure | 19:38 |
morgan | exactly | 19:38 |
mordred | you can also validate headers and whatnot | 19:38 |
morgan | oh weird | 19:41 |
morgan | looks like keystoneclient does a blank put for an update on a v2 password update | 19:42 |
morgan | so it does: password-update, then update | 19:42 |
morgan | weeeiirrdddd | 19:42 |
mordred | morgan: wow. WHY??? | 19:43 |
morgan | well, i was just doing a password change | 19:43 |
morgan | not a full user-update | 19:43 |
morgan | or shade is doing something wonky | 19:43 |
morgan | but if i do cloud.update_user(id, password=newpassword) | 19:43 |
morgan | it does a put to the OS-KSADM then it does a put to the user | 19:43 |
morgan | but the user put is empty | 19:43 |
morgan | weeeeiiirrrdddd | 19:44 |
mordred | oh - I wonder | 19:44 |
mordred | if it's because it's just going through an update flow | 19:45 |
mordred | and passwords get changed differently | 19:45 |
morgan | it is. | 19:45 |
morgan | but keystoneclient is very picky about password changes | 19:45 |
mordred | so it's doing the blank put because there is nothing to update for theuser | 19:45 |
morgan | yep | 19:45 |
morgan | ultra-chatty for ultra-chatty reasons | 19:45 |
mordred | I wonder if that's shade's fault of kscs? | 19:45 |
morgan | both | 19:45 |
morgan | shade doesn't have an update_password function | 19:45 |
morgan | keystoneclient is dumb and does an update in a way for password that is no longer needed | 19:46 |
morgan | since it's all rolled into put on the user resource | 19:46 |
mordred | gotcha | 19:46 |
morgan | basically put v2.0/users/<id>/OS-KSADM/password just normalizes password and then passes the EXACT reqeust to update_user internally | 19:46 |
morgan | *lol* | 19:46 |
morgan | on the keystone server side | 19:46 |
mordred | so we could, in shade, put an "if kwargs not empty: UserUpdate" to skip the second empty put | 19:47 |
morgan | yep | 19:47 |
morgan | and this is v2-only | 19:47 |
mordred | yup | 19:47 |
morgan | in v3 it is only 1 call | 19:47 |
morgan | AND in v3 if it is a user changing his/her password it's totally different than admin password change | 19:47 |
Shrews | this channel is too darn chatty. it's like you all are doing work or something | 19:48 |
morgan | Shrews: Welcome to OpenStack facts, you will now be spammed with useless openstack trivia | 19:49 |
* mordred throws a morgan at Shrews | 19:54 | |
dtroyer | OpenStack Fact: Nova was named after a bar, but Keystone wasn't. | 20:48 |
* dtroyer retreats to goland for the weekend | 20:48 | |
openstackgerrit | Morgan Fainberg proposed openstack-infra/shade master: Add request validation to user v2 test https://review.openstack.org/432366 | 21:53 |
openstackgerrit | Morgan Fainberg proposed openstack-infra/shade master: Convert test_users to requests_mock https://review.openstack.org/432472 | 21:54 |
*** gouthamr has quit IRC | 21:56 | |
openstackgerrit | Morgan Fainberg proposed openstack-infra/shade master: Move mock utilies into base https://review.openstack.org/432487 | 22:41 |
*** jamielennox is now known as jamielennox|away | 22:58 | |
morgan | mordred: wow, keystoneclient could be a lot more efficient | 23:00 |
morgan | we do a list... so we can do a get | 23:00 |
morgan | wtf | 23:00 |
*** gouthamr has joined #openstack-shade | 23:20 | |
morgan | mordred: uhm | 23:24 |
morgan | what causes "failed to delete domain" error... seems like no exceptions are being translated to that? | 23:25 |
morgan | oh | 23:26 |
morgan | blargh. that is an issue in shade | 23:26 |
morgan | yeah... this behavior is not possible | 23:27 |
morgan | afaict, you should never get "failed to delete domain", it isn't translating proper errors | 23:28 |
morgan | oh wait.. nvm | 23:28 |
morgan | my bad | 23:28 |
morgan | mordred: so yeah, there is a case that is not well handled by cloud.delete_domain, the fact that a patch is needed first and could fail, you might want to translate that to a domain delete failure as well | 23:31 |
*** jamielennox|away is now known as jamielennox | 23:50 | |
openstackgerrit | Morgan Fainberg proposed openstack-infra/shade master: convert test_domain to use requests_mock https://review.openstack.org/432495 | 23:50 |
openstackgerrit | Morgan Fainberg proposed openstack-infra/shade master: convert test_domain to use requests_mock https://review.openstack.org/432495 | 23:51 |
morgan | mordred, Shrews: thoughts on restructuring shade's tests to be: tests/<service>/test_case_file | 23:56 |
morgan | mordred, Shrews: such as tests/identity/test_[domains|project|users|identity_roles/roles|....] | 23:56 |
morgan | instead of flat like it is | 23:57 |
morgan | it would make it easier to say run all of shade's tests for <service> at once | 23:57 |
* morgan takes a break. | 23:58 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!