Earlier  
Posted Nick Remark
#openstack-nova - 2018-04-30
21:32:58 mriedem mgagne: see my latest reply?
21:33:09 mgagne mriedem: yes, hence my question
21:33:32 mriedem mgagne: because we have unit tests with false positives i think for some object compat tests
21:33:54 mriedem so asserting that something is still in the primitive after the compat conversion is just good practice to make sure the test is not asserting a false positive
21:34:11 mgagne ok so it's a new use case we should add that doesn't exist currently
21:34:56 mriedem mgagne: here is one example https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L74
21:34:57 mgagne because there is no way I could have guess that this kind of test was a good idea by looking at previous tests above.
21:35:22 melwitt mriedem: okay, makes sense
21:35:23 mgagne yes, I know the principle just wondering why now it's important and not before
21:35:35 mriedem i think this test might be broken https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L226
21:35:59 mriedem mgagne: because reviewers might not have thought about it before when reviewing these types of tests,
21:36:12 mriedem and dansmith busted me on making the same mistake once in something i was adding that did the same thing, so now i'm conscious of it
21:36:26 mgagne mriedem: ok, will add those tests. In that case, I suggest we retrofit the other tests too
21:36:44 mriedem mgagne: i don't think that needs to happen in your change - retrofitting the existing tests i mean
21:36:51 mgagne ok
21:38:37 openstackgerrit Mathieu Gagné proposed openstack/nova master: Add user_id to RequestSpec https://review.openstack.org/565340
21:43:11 openstackgerrit Kashyap Chamarthy proposed openstack/nova master: libvirt: Make `cpu_model_extra_flags` case-insensitive for real https://review.openstack.org/565043
21:47:40 arvindn05 i need to add a patch method to the client under tests.functional.api.client.TestOpenStackClient
21:48:34 arvindn05 methods like tests.functional.api.client.TestOpenStackClient#post_image invoke tests.unit.image.fake._FakeImageService
21:48:53 arvindn05 how is this mapping made?
21:51:44 arvindn05 in other words, how can i ensure a specific method is called when PATCH is called on the FakeImageService?
21:52:55 mriedem why do you need to add a patch method?
21:53:04 mriedem to update an existing fake image with required traits?
21:53:08 arvindn05 yup
21:53:24 mriedem just add a new fake image in the 'registry' with the required traits, hard-code the uuid and refer to that image id in your tests
21:53:26 mriedem done!
21:54:07 arvindn05 mriedem: glad you said that...i did exactly that i think....alex didnt want adding the image with required traits to the registry
21:54:10 arvindn05 https://review.openstack.org/#/c/560596/
21:54:21 arvindn05 :(
21:54:47 arvindn05 it kindof makes sense....we dont want the registry to grow big with each of these changes
21:55:26 arvindn05 so wanted to do the same as how you guys handled flavor in the same tests....basically update a fake image with required traits
21:55:48 mriedem we don't need a fake service for flavors
21:56:13 mriedem _FakeImageService implements update() so why can't you just rely on that?
21:56:41 mriedem you should be able to just use this https://developer.openstack.org/api-ref/compute/#update-image-metadata
21:56:49 mriedem however, you have to make sure to use microversion < 2.39
21:57:11 mriedem which is pretty easy though
21:57:26 mriedem with nova.utils.temporary_mutation(self.api.microversion, '2.1'):
21:57:31 mriedem ... update image metadata
21:58:13 arvindn05 you mean >2.39 right?
21:58:35 mriedem no
21:58:46 mriedem see the warning https://developer.openstack.org/api-ref/compute/#images-deprecated
21:59:08 mriedem also, i don't see where alex says to not create a new fake image in https://review.openstack.org/#/c/560596/
21:59:11 arvindn05 oh...how d
21:59:25 arvindn05 he said not to update the registry
21:59:32 mriedem where?
21:59:34 mriedem link please
21:59:52 arvindn05 looking at this one of the alternatives
22:00:04 arvindn05 The API sample tests are for verify the API change, not sure we should use API sample test for other function/feature test.
22:01:12 arvindn05 on PS9
22:02:57 mriedem left a comment in the patch
22:03:12 arvindn05 also is it a good idea to use deprecated api?
22:03:20 arvindn05 will check the comment
22:06:08 arvindn05 patch seems to be a more longer term fix IMO
22:06:44 arvindn05 i will attempt to use the API mentioned for now....thanks mriedem
22:07:33 arvindn05 might be harder to implement the patch api i guess, to parse the operation, the path and value etc...
22:11:27 arvindn05 mriedem: from where does tests.unit.image.fake._FakeImageService#update get called in case of the fake image service
22:11:36 mriedem PATCH is if you're calling the image service API directly, which you wouldn't be within nova functional tests
22:11:42 mriedem you're calling the compute image API proxy, which doesn't use PATCH
22:12:01 mriedem it's a stub for the nova.image.glance api code
22:12:05 openstackgerrit Ed Leafe proposed openstack/nova master: Add columns for generation to consumers https://review.openstack.org/557958
22:12:06 openstackgerrit Ed Leafe proposed openstack/nova master: Add consumer generation checking logic https://review.openstack.org/564641
22:12:07 openstackgerrit Ed Leafe proposed openstack/nova master: Add a microversion for consumer generation https://review.openstack.org/562000
22:12:13 mriedem anyway, i have to run
22:12:26 arvindn05 thanks...will dig deeper
22:14:20 mriedem_away stephenfin: for your morrow, are you good with https://review.openstack.org/#/c/534371/ now? it's holding up mikal's https://review.openstack.org/#/c/557552/
22:29:07 openstackgerrit Mathieu Gagné proposed openstack/nova master: Add user_id to RequestSpec https://review.openstack.org/565340
22:51:41 openstackgerrit Eric Fried proposed openstack/nova master: WIP: placement: Granular GET /allocation_candidates https://review.openstack.org/517757
22:56:12 openstackgerrit Eric Fried proposed openstack/nova master: WIP: placement: Granular GET /allocation_candidates https://review.openstack.org/517757
23:59:09 openstackgerrit melanie witt proposed openstack/nova master: Convert websocketproxy to use db for token validation https://review.openstack.org/333990
23:59:10 openstackgerrit melanie witt proposed openstack/nova master: Update layout docs for running console proxies https://review.openstack.org/557489
23:59:11 openstackgerrit melanie witt proposed openstack/nova master: Deprecate the nova-consoleauth service https://review.openstack.org/565367
#openstack-nova - 2018-05-01
00:05:38 arvindn05 alex_xu: had a question on your comments
00:06:21 arvindn05 https://review.openstack.org/#/c/560596/ - update scheduler to use image-traits
00:06:42 openstackgerrit Merged openstack/nova master: libvirt: Drop MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION https://review.openstack.org/563984
00:23:32 openstackgerrit Merged openstack/nova master: libvirt: Drop MIN_LIBVIRT_NUMA_VERSION_PPC https://review.openstack.org/564010
01:45:18 openstackgerrit Julia Kreger proposed openstack/nova master: WIP: ironic: add instance_uuid before any other spawn activity https://review.openstack.org/563722
01:48:39 openstackgerrit Matt Riedemann proposed openstack/nova master: Add user_id to RequestSpec https://review.openstack.org/565340
02:28:59 openstackgerrit Arvind Nadendla proposed openstack/nova master: update scheduler to use image-traits https://review.openstack.org/560596
02:33:47 openstackgerrit Arvind Nadendla proposed openstack/nova master: update scheduler to use image-traits https://review.openstack.org/560596
02:38:31 takashin
02:45:41 openstackgerrit Takashi NATSUME proposed openstack/nova master: Remove mox in test_xenapi.py (1) https://review.openstack.org/564639
03:14:00 openstackgerrit Merged openstack/nova master: Use ConsoleAuthToken object to generate authorizations https://review.openstack.org/325414
03:54:31 openstackgerrit Jay Pipes proposed openstack/nova master: Add generation column to consumers table https://review.openstack.org/565400
03:54:32 openstackgerrit Jay Pipes proposed openstack/nova master: Add Project object https://review.openstack.org/565401
03:54:33 openstackgerrit Jay Pipes proposed openstack/nova master: Add User object to placement modeling https://review.openstack.org/565402
03:54:34 openstackgerrit Jay Pipes proposed openstack/nova master: add Consumer object https://review.openstack.org/565403
03:54:35 openstackgerrit Jay Pipes proposed openstack/nova master: Add create() methods to Project, User and Consumer https://review.openstack.org/565404
03:54:36 openstackgerrit Jay Pipes proposed openstack/nova master: move consumer ensure to API layer https://review.openstack.org/565405
03:54:37 openstackgerrit Jay Pipes proposed openstack/nova master: remove Allocation.project_id & Allocation.user_id https://review.openstack.org/565406
03:54:38 openstackgerrit Jay Pipes proposed openstack/nova master: prep for consumer generation in API layer https://review.openstack.org/565407
04:37:47 openstackgerrit Tetsuro Nakamura proposed openstack/nova master: Consider nested RPs in get_all_with_shared https://review.openstack.org/556450
04:37:48 openstackgerrit Tetsuro Nakamura proposed openstack/nova master: Support shared and nested allocation candidates https://review.openstack.org/556514
04:37:49 openstackgerrit Tetsuro Nakamura proposed openstack/nova master: Support nested alloc cands without shared RPs https://review.openstack.org/561842
04:48:39 openstackgerrit Aditya Vaja proposed openstack/nova master: remove IVS plug/unplug as they're moved to separate plugin https://review.openstack.org/534371
05:22:24 openstackgerrit Merged openstack/nova master: libvirt: Drop BAD_LIBVIRT_NUMA_VERSIONS https://review.openstack.org/564011
05:25:22 openstackgerrit melanie witt proposed openstack/nova master: Convert websocketproxy to use db for token validation https://review.openstack.org/333990
05:25:23 openstackgerrit melanie witt proposed openstack/nova master: Update layout docs for running console proxies https://review.openstack.org/557489
05:25:24 openstackgerrit melanie witt proposed openstack/nova master: Deprecate the nova-consoleauth service https://review.openstack.org/565367
05:26:08 openstackgerrit Takashi NATSUME proposed openstack/nova master: Remove mox in test_xenapi.py (2) https://review.openstack.org/564643
05:31:30 openstackgerrit Takashi NATSUME proposed openstack/nova master: Remove mox in test_xenapi.py (3) https://review.openstack.org/564645

Earlier   Later