Tuesday, 2021-09-14

*** lbragstad_ is now known as lbragstad13:15
abhishekkcroelandt, around ?13:34
*** pdeore_ is now known as pdeore13:37
pdeoreHi 13:38
pdeoreI've updated all the tempest protection test patches for metadef secure RBAC, 13:38
pdeorehttps://review.opendev.org/c/openstack/glance-tempest-plugin/+/800902/2513:38
pdeorehttps://review.opendev.org/c/openstack/glance-tempest-plugin/+/802793/1313:38
pdeorehttps://review.opendev.org/c/openstack/glance-tempest-plugin/+/802792/1113:38
pdeorehttps://review.opendev.org/c/openstack/glance-tempest-plugin/+/802794/613:38
pdeorehttps://review.opendev.org/c/openstack/glance-tempest-plugin/+/802795/413:38
croelandtabhishekk: in a meeting, but shoot :)13:39
pdeoredansmith, lbragstad , croelandt , abhishekk , could you please have a look on the same when get some time.. 13:39
croelandtsure13:40
abhishekkcroelandt, no hurry, lets talk after your meeting :D13:40
lbragstadpdeore cool - thanks13:40
abhishekkpdeore, ack13:40
*** whoami-rajat__ is now known as whoami-rajat14:00
dansmithpdeore: don't hate me, and I'll be glad to settle my argument with lbragstad and then make some of those changes myself :)14:02
lbragstadok - following back up on the subclass thing14:13
lbragstadyeah - i'm fine putting it in MetadefV2RbacNamespaceTest14:14
lbragstadfwiw - i used the original architecture from the keystone tests - which were implemented here https://review.opendev.org/c/openstack/keystone-tempest-plugin/+/68630514:15
dansmithand why does that not just inherit from the base class itself?14:15
lbragstadit could14:16
dansmithpersonally, IMHO mixin classes should only be used if they're going to be mixed into multiple hierarchies.. like two separate classes both need some extra functionality but they're otherwise unrelated14:16
lbragstadi'm not entirely sure why it was isolated out in the keystone tests14:17
lbragstadyeah - agreed, since all this is related to the metadef stuff, it could live in a single hierarchy 14:17
dansmithbut if you're just separating out things that all have to be squashed into each other to be useful, it makes no sense to me,14:17
dansmithand just makes it hard to figure out where this thing is defined that you're using14:17
abhishekkjust to note, we need create_namespaces method in all the module14:18
abhishekkmodules14:18
lbragstadso - rbac.v2.base.RbacBaseTests is going to inherit from tempest.test.BaseTestCase?14:20
lbragstadand then test_namespaces.ProjectAdminTest would just inherit from RbacBaseTests (for example)?14:20
dansmithyour abc can still be in there,14:21
lbragstadyeah - that makes sense14:21
dansmithso I would do BaseTestCase <- RbacBaseTests <- MetadefV2RbacNamespaceTest <- {admin, member, reader}14:21
lbragstadyeah - ok14:21
lbragstadthat makes sense14:21
dansmithpdeore: I'm happy to make that change for you if you like14:22
lbragstadand RbacBaseTests should contain all the logic implemented in https://review.opendev.org/c/openstack/glance-tempest-plugin/+/800902/25/glance_tempest_plugin/tests/rbac/v2/base.py still14:22
lbragstad(e.g., do_request(), skip_checks(), etc...)14:22
dansmithyup14:22
lbragstadcool14:22
dansmithand also create_namespaces() probably right?14:23
dansmithbecause that's used elsewhere14:23
dansmithup the stack I mean14:23
abhishekk++14:23
lbragstadyou mean something like MetadefV2RbacObjectTests?14:23
lbragstadyeah - i think so 14:23
dansmithoh, I see, that's metadef specific but RbacBaseTests isn't14:24
dansmithso sure14:24
lbragstadif or when we ever get some sort of RbacBaseTest class in tempest proper, we would need a place for that stuff in glance, but planning for that now might be a pre-optimization 14:25
dansmithwell, it's metadef-specific, so fine to put it in a middle class14:26
lbragstadin MetadefV2RbacNamespaceTest? 14:26
dansmithit's used by non-namepsace tests above, right? so needs to be somewhere generic14:26
dansmithor not even on an object itself, just a standalone utility method14:26
lbragstadwell MetadefV2RbacObjectTest is going to need to inherit from MetadefV2RbacNamespaceTest then, right?14:26
dansmithwell, I guess it needs do_request14:26
dansmithlemme just work up a proposed change :)14:27
lbragstadack14:27
lbragstadif it needs to live in RbacBaseTest, that's fine14:28
* abhishekk will be back in couple of hours14:31
*** abhishekk is now known as abhishekk|away14:31
dansmithooh, look at that.. pdeore was just copying lbragstad's image tests where the project test inherits from the admin test :)14:35
dansmithlbragstad: not sure I've run this locally, or at least not in a long time.. do you have a local.conf I can copy?14:38
lbragstadyeah - i think so 14:39
lbragstaddansmith https://termbin.com/exml14:41
dansmithoh, I guess GLANCE_ENFORCE_SCOPE is all I need, maybe14:43
lbragstadand enable_plugin glance https://opendev.org/openstack/glance14:44
dansmither, how do I get it to use my local copy of the plugin.. yeah, that's going to give me the tempest plugin somehow?14:44
dansmithand then I can push my changes into there to test?14:45
lbragstadoh - nevermind14:45
lbragstadyou probably don't need that then 14:45
lbragstadif you just install your local copy into the tempest env14:45
dansmithokay I haven't done that, but I guess I'll stack first and figure out what that looks like.. haven't run a tempest plugin locally I guess14:46
dansmithoh, I guess I have to pip install it into the venv14:49
lbragstadyeah 14:49
lbragstadso tempest can discover the tests14:49
dansmithI suppose I can setup.py develop into there to keep it live14:51
lbragstadyeah - i usually $ /opt/stack/tempest/.tox/tempest/bin/pip -e install ~/glance-tempest-plugin/14:53
dansmithack14:53
dansmithah, I bet I know some of the reason for the mixins at least.. the abc stuff doesn't play nice15:11
dansmithbecause the test runner tries to instantiate those classes if they inherit from abc15:11
dansmithgrr15:11
dansmithlbragstad: how married are you to that abc protocol? AFAICT, it's somewhat pointless in these tests, since we inherit from it directly only once, and then subclass the first subclass, so the abc protections don't even help us in the later classes15:15
lbragstadif everything were to import from the actual base class directly, then i'd advocate for keeping it, but since we re-use stuff across personas, then i'm not as concerned15:16
dansmithyeah, that's my point15:17
dansmithwe could keep it and still mix it in at the lower levels like it should be15:17
dansmithpdeore_: around?15:45
*** abhishekk|away is now known as abhishekk15:51
abhishekkdansmith, I don't think she is around15:51
dansmithokay, just wondering if I can push up these changes to her set for comment15:52
dansmithbut didn't want to do that without asking her15:52
abhishekkI think you can, I will let her know that you asked before pushing changes15:52
dansmithheh okay15:53
abhishekk:D15:53
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Add protection testing for metadef namespaces  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80090215:54
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Refactor RbacBasetest to inherit from tempest  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80899015:54
dansmithlbragstad: abhishekk ^ let me know what you think and I'll rebase the rest on that if you think it's an improvement15:54
dansmithkeeps the abc for test enforcement, which I'm not like super excited about, but..15:55
abhishekkdansmith, ack15:55
lbragstadok15:56
abhishekkI like the base patch15:57
dansmithI probably need to update the commit message since it didn't turn out exactly like that,15:58
dansmithbut I think it crystalizes the "abc class makes sure you have these tests and nothing else" pattern,15:59
dansmithand lets the other regular classes do all the implementation of the client setup things15:59
dansmithif we didn't use the ABC then we wouldn't need that and the mixins per-class either15:59
dansmithbut I understand the goal of it16:00
abhishekk++16:00
dansmithbut the second patch is where the pattern makes more of a difference, with only one mix-in instead of two16:00
abhishekkThis looks much cleaner though16:02
abhishekkjust waiting for test results before voting16:14
dansmithlet's make sure lbragstad thinks it's an improvement and not just moving stuff around16:14
lbragstadcool - so all the utilities will live in ImageV2RbacImageTest and the tests abcs will live in ImageV2RbacTemplate?16:19
abhishekkjokke_, around ?16:21
abhishekklbragstad, yes, 16:22
lbragstadyeah - i don't have any objection to that, i think it makes sense and is linear 16:22
lbragstadthanks dansmith 16:22
lbragstadthere's nothing about how keystone did it that obviously needs to be ported here 16:23
abhishekkjust wondering (may be to work in following cycle) can we modify do_request method (or clients) to work like our functional synchronize way ?16:23
lbragstador, if it's common (which is is) we could move it to tempest proper16:24
jokke_abhishekk: yeah16:28
abhishekkjokke_, there are some comments on release patch16:29
abhishekkI think just one related to minor version bump16:29
abhishekkRC1 path is clear, I will put up a releasenote patch tomorrow and once it is merged then I will modify the hash in already up RC1 release patch16:31
jokke_abhishekk: are we ok with the reno commit messages stating patch version rather than minor?16:33
jokke_I can very quickly spin that release patch around if we don't need to change the reno commits ... the git log is only place where they show up16:34
abhishekkjokke_, ohh16:35
abhishekkIt will render in final reno with correct version, right ?16:36
abhishekkIf so then it is ok16:37
jokke_yeah, and it will look silly in the git log anyways to rever and repropose same patches as I don't think we can do --amends into published commits16:37
abhishekkhmm16:39
abhishekkmaybe smcginnis could suggest something if possible16:39
abhishekkjokke_, I will be back in 10/15 minutes16:40
opendevreviewMerged openstack/glance-tempest-plugin master: Refactor RbacBasetest to inherit from tempest  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80899017:21
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Add protection testing for metadef namespaces  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80090217:30
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Implement API protection testing for metadef objects  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279317:30
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Implement API protection testing for metadef resource types  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279217:30
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Implement API protection testing for metadef properties  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279417:30
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Implement API protection testing for metadef tags  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279517:30
dansmithrebased the rest ^17:30
abhishekkthanks o/17:31
* abhishekk signing out for the day18:20
opendevreviewMerged openstack/glance master: [uwsgi] Add missing pefetch periodic job  https://review.opendev.org/c/openstack/glance/+/80393718:39
opendevreviewMerged openstack/glance master: Reproduce bug #1932337  https://review.opendev.org/c/openstack/glance/+/79688519:01
opendevreviewMerged openstack/glance master: Fix failed cinder store migration for non-owners  https://review.opendev.org/c/openstack/glance/+/79688719:01
lbragstaddansmith qq https://review.opendev.org/c/openstack/glance-tempest-plugin/+/800902/27/glance_tempest_plugin/tests/rbac/v2/base.py#8420:26
dansmithlbragstad: cha?20:27
lbragstaddo you know why we have setup_client() there and it can't all be in https://review.opendev.org/c/openstack/glance-tempest-plugin/+/800902/27/glance_tempest_plugin/tests/rbac/v2/metadefs/test_namespaces.py#32 ?20:27
dansmithbecause of the last two lines I think20:27
dansmithbecause each of these uses a different client class (namespaces, objects, etc)20:27
lbragstad92 - 93? 20:28
dansmithyeah20:28
dansmith...right?20:29
lbragstadso - we want the admin metadef namespace client to be shared across the various metadef test classes20:30
lbragstadand that's why its in RbacBaseTests?20:30
dansmithoh, sorry, I had this backwards20:31
dansmithI thought you were asking about things like this: https://review.opendev.org/c/openstack/glance-tempest-plugin/+/802793/14/glance_tempest_plugin/tests/rbac/v2/metadefs/test_objects.py20:31
dansmithwhere we setup_clients again, and put in the objects client 20:31
lbragstadyeah - line 39 - 40 setup the admin objects client20:31
dansmithfor the namespaces one, we probably want it to be in the base because create_namespaces() is used by other things and, I think calls that no?20:32
lbragstadok, that makes sense20:32
lbragstadthat seems right, but i wasn't sure20:32
lbragstadcls.admin_client (naming convention-wise) could be reused across test classes20:33
lbragstadso i wanted to double check if it really was supposed to be pushed down to the metadef namespaces test class20:33
dansmithit really should be namespace_client or something I would t hink20:33
lbragstadyeah - agreed20:33
dansmiththat confused me at one point when rebasing the tags patch at the top20:34
dansmithlbragstad: I didn't do anything to those other than fix the structure,20:34
dansmithand I think those kinds of arguments are all valid, so feel free to -1 on that20:35
lbragstadok - i put my thoughts in comments instead20:40

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!