Wednesday, 2019-06-05

*** itlinux_ has quit IRC00:04
cmurphybug report for our doc build problem https://github.com/sphinx-doc/sphinx/issues/644700:25
lifelesskmalloc: yo01:02
kmallocHey01:03
lifelesskmalloc: from the discussion above, I'm fairly sure you're way off in the weeds yeah :)01:03
kmallocRe testresources?01:04
lifelessyah01:04
kmallocSomewhat01:04
kmallocBe back in 10 mins01:06
kmallocCan I pick your brain then?01:06
lifelessin the test you want resources = [(db, mydb)] and mixin ResourcedTestCase  (or reimplement - see https://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L797)01:07
lifelessyes, I will braindump here till then01:07
lifelessbefore that you want to say01:07
lifelessmydb = FixtureResource(SomeFixture())01:08
lifelesswhere SomeFixture is a Fixture that when setup will have whatever expensive thing you need (I'm presuming its a database, it usually is)01:08
lifelessthen in fixture.reset() you should have any code you need to optimise your state purging01:10
lifelesse.g. rolling back your transactions to a PIT marker or whatever trick you are using.01:10
lifelessthe manager always returning dirty will cause reset to be called always which will cause the fixture to have control over cleaning always01:11
lifelessmydb can then be used in any number of test classes and testresources will smooth across them all01:13
*** spsurya has joined #openstack-keystone01:19
clarkbq01:25
clarkb(sorry)01:26
lifelessqq! :P01:31
kmalloclifeless: ahh, so you need at least one module level instance of the fixture/resource to hold the use count at 101:31
kmallocotherwise the .tearDown (regardless of dirtied) will cleanup current_resource01:32
kmallocthat is what i think we were missing.01:32
lifelessnot quite01:32
lifelessFixtureResource is a resource *manager*01:32
kmallocRight01:32
lifelessit will instantiate the resource and that will setup the fixture for you01:32
lifelessand track the use counts01:32
kmallocthe issue we were seeing was every single test case was still creating a new instance of the fixture01:33
lifelessthe module level instance you have is just the instance of the manager01:33
kmallocjust like today, because i think we were hitting a use count of 0, and ._setResource(None) was called in .tearDown01:33
lifelessso the probable reason for that is a missing / misconfigured load_tests hook01:33
kmallocvery likely01:34
lifelesswithout the load_tests hook to wrap the OptimisingTestSuite around everything, each test is going to enter in with a use count of zero and setup just-in-time01:34
kmallocyeah that's it then01:34
kmalloclbragstad: ^ need load_tests hook01:34
lifelessbut it sounds like you've also reimplemented make() and so on which if you're using fixtures you don't want to be doing, thats the older generation API01:34
kmallocif we use standard fixtures we don't need .make()01:35
kmalloc?01:35
kmallocwell. the bootstrapper isn't exactly a fixture01:35
kmallocit leaned on a db handle (sqlite) but it does work.01:35
lifelesswhere's your patch01:35
kmallocit sets some things up in a non-fixture way01:35
kmallocit's mangled atm.01:35
kmallocbut01:35
kmalloc'https://review.opendev.org/#/c/663065/101:36
kmalloci see where it needs to go01:36
kmallocbased upon this conversation01:36
kmallocand we should probably wrap the bootstrapping into a fixture (our db one, specifically)01:36
kmallocor at least it's own one that leans on the db one01:36
lifelessso here is an example of the hook -01:38
kmallocunfortunately I wont be able to iterate on that for lbragstad with travel and funeral this weekend.01:38
lifelesshttps://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/test_fixtures.py#L61901:38
kmallocyeah i gathered that as soon as you said something ;)01:38
lifelesslooks like its been turned into a HOF or two01:39
lifelessthe doc strings there are sensible01:39
lifelessok so, thats that side of it01:39
kmalloci'll circle up with lbragstad tomorrow (if I can) and point him in this direction if i can't directly help iterate on it01:40
kmallocthis convo helped a lot01:40
lifelesscool01:40
lifelessI'm not sure if https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/test_fixtures.py#L445 is quite what I'd do myself01:40
kmallocyeah, thats still a question01:41
lifelessbut its kindof similar - and you can also see from that how FixtureResource sits in the system more clearly I think01:41
kmallocyah01:41
lifelessperhaps the oslo.db devs weren01:42
lifeless't aware of FixtureResource01:42
kmalloci might take a stab at our key repo fixtures.01:42
kmallocthat looks way more straight forward01:42
kmallocand more costly than a reflection sqlite DB with bootstrap01:42
* kmalloc wonders if he can wire up the fernet repos to no actually dump crap on disk and just in-memory it01:43
kmallocwith a fixture01:43
lifelessThe point of OTS here starts to become clear when you have resources/fixtures that get optimised across multiple different test classes all for the same external resource (e.g. pg db instance)01:44
lifelessThere's a postgresql adapter for testresources01:44
kmallocour fernet key repos are that way01:44
kmallocthere is no reason to generate new crypto (entropy) data over and over and over and over and over01:45
lifelesstight01:45
kmallocwe do it a lot01:45
lifelessso you make a fixture to hold the entropy01:45
lifelessthen you have a fixtureresource manager and put it somewhere01:45
lifelessthen you just add ('entropy', entropy) to your resources list in any test class that needs it01:45
lifelessdone01:46
lifelessno need to have them in one hierarchy01:46
kmallocyup01:46
kmallocwell it dumps files on disk right now01:49
kmallocso at the very least make that dump crap on disk happen once (except where we explicitly dirty the repo with a rotation)01:49
kmallocin both cases (that and DB), it makes sense to use the testresources01:50
*** dave-mccowan has quit IRC02:02
*** lbragstad has quit IRC02:14
*** itlinux has joined #openstack-keystone02:27
*** Dinesh_Bhor has quit IRC02:37
*** markvoelker has joined #openstack-keystone02:59
*** Dinesh_Bhor has joined #openstack-keystone03:19
*** markvoelker has quit IRC03:30
*** gyee has quit IRC04:02
*** threestrands has joined #openstack-keystone04:15
*** bnemec has quit IRC04:23
*** gmann has quit IRC04:23
*** bnemec has joined #openstack-keystone04:25
*** markvoelker has joined #openstack-keystone04:27
*** gmann has joined #openstack-keystone04:27
*** pcaruana has joined #openstack-keystone04:30
*** markvoelker has quit IRC05:00
*** tkajinam has quit IRC05:01
*** tkajinam has joined #openstack-keystone05:03
*** itlinux has quit IRC05:22
*** tkajinam has quit IRC05:33
*** markvoelker has joined #openstack-keystone05:56
*** tkajinam has joined #openstack-keystone06:03
openstackgerritzhaixiaojun proposed openstack/keystone master: Bump openstackdocstheme to 1.30.0  https://review.opendev.org/66324306:19
*** markvoelker has quit IRC06:28
*** takamatsu has joined #openstack-keystone06:32
*** rcernin has quit IRC06:59
*** aloga has quit IRC07:23
*** aloga has joined #openstack-keystone07:23
*** tesseract has joined #openstack-keystone07:25
*** do3meli has joined #openstack-keystone07:29
do3melihi - anyone aware on what happens to reviews where tox build failed due to unknown interpreted text role "paramref" from sqlalchemy package? f.e.: https://review.opendev.org/#/c/663063/07:31
*** whoami-rajat has joined #openstack-keystone07:45
*** xek has joined #openstack-keystone08:09
*** markvoelker has joined #openstack-keystone08:26
*** tkajinam has quit IRC08:37
*** threestrands has quit IRC08:39
*** openstackgerrit has quit IRC08:47
*** rcernin has joined #openstack-keystone08:57
*** markvoelker has quit IRC08:59
*** Emine has joined #openstack-keystone09:21
*** markvoelker has joined #openstack-keystone09:57
*** markvoelker has quit IRC10:29
*** stingrayza has quit IRC10:30
*** stingrayza has joined #openstack-keystone10:32
*** adriant has quit IRC11:12
*** markvoelker has joined #openstack-keystone11:26
*** raildo has joined #openstack-keystone11:42
*** xek has quit IRC11:49
*** xek has joined #openstack-keystone11:50
*** markvoelker has quit IRC12:00
*** gmann has quit IRC12:03
*** stingrayza has quit IRC12:06
*** stingrayza has joined #openstack-keystone12:08
*** adriant has joined #openstack-keystone12:34
*** rcernin has quit IRC12:37
cmurphydo3meli: it's a known issue due to the latest sphinx release https://github.com/sphinx-doc/sphinx/issues/6447 working on a workaround12:42
*** adriant has quit IRC12:43
*** adriant has joined #openstack-keystone12:46
do3melicmurphy: thanks for the heads up. will someone after the fix trigger new builds or does the owner of the review/PR needs to care?12:53
*** lbragstad has joined #openstack-keystone13:17
*** ayoung has joined #openstack-keystone13:17
lbragstadkmalloc lifeless interesting - reading back13:24
*** rcernin has joined #openstack-keystone13:41
*** jamesmcarthur has joined #openstack-keystone13:48
*** spsurya has quit IRC13:55
lbragstadso it sounds like we need to use the load_tests hook around all keystone tests? or just the ones we're optimizing with testresources?13:57
*** jamesmcarthur has quit IRC14:09
lbragstadalso - it sounds like we should be using FixtureResource for bootstrapper?14:12
lbragstadbootstrapper was never a fixture before, it was just an object that did stuff during setUp14:13
*** jaosorior has joined #openstack-keystone14:15
*** jamesmcarthur has joined #openstack-keystone14:18
*** joshualyle has joined #openstack-keystone14:19
*** jamesmcarthur has quit IRC14:22
*** bnemec has quit IRC14:23
cmurphydo3meli: I'll retrigger all the failed jobs when it's fixed14:24
*** bnemec has joined #openstack-keystone14:25
do3melithx14:26
*** jamesmcarthur has joined #openstack-keystone14:26
*** itlinux has joined #openstack-keystone14:57
*** itlinux has quit IRC14:59
*** do3meli has quit IRC15:22
*** rcernin has quit IRC15:26
*** gyee has joined #openstack-keystone15:27
*** jaosorior has quit IRC15:27
*** itlinux has joined #openstack-keystone15:56
*** markvoelker has joined #openstack-keystone16:04
*** openstackgerrit has joined #openstack-keystone16:14
openstackgerritColleen Murphy proposed openstack/keystone master: Pin Sphinx to <2.1.0 on py3  https://review.opendev.org/66337316:14
cmurphynot sure if ^ will pass the requirements check but if it does it should unblock the gate16:14
cmurphyupstream sphinx seems open to fixing the problem but it doesn't sound like it will be easy16:15
*** Emine has quit IRC16:30
*** xek has quit IRC16:37
*** bnemec has quit IRC16:44
*** itlinux has quit IRC16:56
*** itlinux has joined #openstack-keystone16:58
*** itlinux has quit IRC17:04
*** xek has joined #openstack-keystone17:05
*** xek has quit IRC17:08
*** xek has joined #openstack-keystone17:09
*** itlinux has joined #openstack-keystone17:09
gagehugoack17:15
*** xek has quit IRC17:54
*** tesseract has quit IRC17:57
*** notq has joined #openstack-keystone18:27
notqopenstack ec2 credentials is not being logged by auditing/messaging, i've created a bug https://bugs.launchpad.net/keystonemiddleware/+bug/1831791 - should I add any other details, or is that suffient?18:27
openstackLaunchpad bug 1831791 in keystonemiddleware "openstack ec2 credentials not audited" [Undecided,New]18:27
*** itlinux has quit IRC18:32
kmalloclbragstad, cmurphy: so... for resource options for all, i am thinking of the following (some things can't be changed anyway)18:57
kmallocusers (done), groups, domains, projects, roles18:58
kmallocthe other question I have is should all options for all resources go in a single table?18:58
kmallocso the key would be <type>, <option id> not just option_id18:59
kmalloci am trying to avoid needing a db migration for each new resource we add options to19:00
kmalloci think this is a low enough volume that a single, well indexed table for all options should be ok.19:00
kmallocthat way it really is just adding code support not code+migration19:01
lbragstadi can see the benefit of a single table if we expect an explosion of options to happen19:02
*** itlinux has joined #openstack-keystone19:04
kmallocas it stands it would be a good chunk of code and migrations to just get the ones i've listed above, rather that make it a generic we can apply to the baseclasses19:06
kmalloca single table simplifies that a lot19:08
cmurphysingle table sounds okay to me, obviously don't use enum for type19:15
cmurphynotq: usually i'd recommend steps to reproduce, expected behavior and actual behavior19:17
notqcmurphy: fair, will add, thank you.19:18
*** joshualyle has quit IRC19:18
notqthere's also a minor issue that openstack application credential create foo creates an audit message, but the target is unknown. unknown is given when it doesn't have a cadf translation for what is sent. Is there a way I can debug what is sent as target before it gets set to unknown, or do I have to add a statement to print it19:23
*** joshualyle has joined #openstack-keystone19:28
lbragstadcmurphy +1 to not using enum19:30
cmurphynotq: i don't have a good debugging recommendation but i think i may see the problem already19:31
*** joshualyle has quit IRC19:32
notqcmurphy: should i create another bug? want to point me at the problem? Just want to know next steps.19:33
notqO19:33
notqI should add, it happens for delete as well.19:35
kmalloccmurphy: yah, it wont be a SQL enum for type, i'm going to use an attribute on the model.19:37
kmalloclbragstad, cmurphy: the code will be: 1) migrate current options to the new single table19:39
openstackgerritColleen Murphy proposed openstack/keystone master: Add application_credential as a CADF type  https://review.opendev.org/66341019:39
cmurphynotq: ^19:39
kmalloc2) start adding new option code19:39
notqcmurphy++19:41
*** Emine has joined #openstack-keystone19:45
lbragstadkmalloc makes sense19:45
lbragstadkmalloc when you're not traveling, we should sync up on the conversation you had with lifeless19:46
lbragstador i'll try and be around later to catch him19:46
*** imacdonn has quit IRC19:53
*** imacdonn has joined #openstack-keystone19:53
*** jamesmcarthur has quit IRC19:59
openstackgerritColleen Murphy proposed openstack/keystone-specs master: Update access rules spec with decisions from PTG  https://review.opendev.org/66178420:15
cmurphywould like some feedback on that api change ^20:16
*** itlinux has quit IRC20:17
*** itlinux has joined #openstack-keystone20:19
*** joshualyle has joined #openstack-keystone20:44
*** joshualyle has quit IRC20:48
*** pcaruana has quit IRC20:59
*** Emine has quit IRC21:00
*** rcernin has joined #openstack-keystone21:26
openstackgerritColleen Murphy proposed openstack/keystone master: Add user_id to access rules table  https://review.opendev.org/66344021:38
openstackgerritColleen Murphy proposed openstack/keystone master: Add flake8 ignore list to fast8 script  https://review.opendev.org/66344421:40
*** gmann has joined #openstack-keystone21:45
*** dave-mccowan has joined #openstack-keystone21:46
*** itlinux has quit IRC21:50
*** itlinux has joined #openstack-keystone21:57
*** whoami-rajat has quit IRC22:00
*** adriant has quit IRC22:01
*** adriant has joined #openstack-keystone22:02
*** rcernin has quit IRC22:04
openstackgerritColleen Murphy proposed openstack/keystone master: Stop treating Sphinx warnings as errors  https://review.opendev.org/66337322:05
cmurphy^ second attempt22:05
*** itlinux has quit IRC22:15
*** notq has quit IRC22:29
openstackgerritColleen Murphy proposed openstack/keystone master: Add user_id to access rules table  https://review.opendev.org/66344022:37
*** dave-mccowan has quit IRC22:56
*** raildo has quit IRC22:58
*** tkajinam has joined #openstack-keystone23:00
*** itlinux has joined #openstack-keystone23:16
*** itlinux has quit IRC23:46

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