Tuesday, 2019-06-04

*** markvoelker has quit IRC00:24
*** NM has quit IRC00:32
*** gyee has quit IRC01:19
*** jamesmcarthur has quit IRC01:22
*** jamesmcarthur has joined #openstack-keystone01:31
*** jamesmcarthur has quit IRC01:43
*** jamesmcarthur has joined #openstack-keystone01:44
*** jamesmcarthur has quit IRC02:00
*** jamesmcarthur has joined #openstack-keystone02:00
*** jamesmcarthur has quit IRC02:39
*** jamesmcarthur has joined #openstack-keystone02:40
*** jamesmcarthur has quit IRC02:43
*** jamesmcarthur has joined #openstack-keystone02:43
*** whoami-rajat has joined #openstack-keystone03:14
*** jamesmcarthur has quit IRC03:45
*** jamesmcarthur has joined #openstack-keystone03:46
*** jamesmcarthur has quit IRC03:49
*** jamesmcarthur_ has joined #openstack-keystone03:49
*** lbragstad has quit IRC05:09
*** pcaruana has joined #openstack-keystone05:12
*** pcaruana has quit IRC05:23
*** pcaruana has joined #openstack-keystone05:28
*** jamesmcarthur_ has quit IRC05:29
*** evrardjp_ is now known as evrardjp06:43
*** tkajinam has quit IRC07:24
*** tkajinam has joined #openstack-keystone07:24
*** adriant has quit IRC07:29
*** markvoelker has joined #openstack-keystone07:32
*** xek has joined #openstack-keystone07:52
*** markvoelker has quit IRC08:05
*** adriant has joined #openstack-keystone08:18
*** jaosorior has joined #openstack-keystone08:21
*** tkajinam has quit IRC08:24
*** spsurya has joined #openstack-keystone08:51
*** ayoung has quit IRC08:54
*** tesseract has joined #openstack-keystone08:56
*** mvkr has joined #openstack-keystone08:59
*** rcernin has quit IRC09:07
*** tesseract has quit IRC09:40
*** jaosorior has quit IRC09:41
*** mugsie_ is now known as mugsie09:52
*** markvoelker has joined #openstack-keystone10:02
*** markvoelker has quit IRC10:36
*** jaosorior has joined #openstack-keystone11:07
*** raildo has joined #openstack-keystone11:26
*** markvoelker has joined #openstack-keystone11:33
*** dave-mccowan has joined #openstack-keystone11:37
*** jaosorior has quit IRC12:00
*** markvoelker has quit IRC12:05
*** mugsie is now known as mugsie_12:18
*** mugsie_ is now known as mugsie12:18
*** shyamb has joined #openstack-keystone12:34
*** BlackDex_ is now known as BlackDex12:35
*** NM has joined #openstack-keystone12:39
*** spsurya has quit IRC12:40
*** NM has quit IRC12:41
*** shyamb has quit IRC12:49
*** jamesmcarthur has joined #openstack-keystone13:00
*** shyamb has joined #openstack-keystone13:01
*** jamesmcarthur has quit IRC13:20
*** jamesmcarthur has joined #openstack-keystone13:20
*** jamesmcarthur has quit IRC13:25
*** lbragstad has joined #openstack-keystone13:32
*** shyamb has quit IRC13:54
*** shyamb has joined #openstack-keystone13:57
knikollao/13:58
cmurphy\o14:00
lbragstado/14:00
openstackgerritKristi Nikolla proposed openstack/keystone-specs master: Expiring Users  https://review.opendev.org/60420114:32
gagehugoo/14:32
*** vishakha has joined #openstack-keystone14:38
*** itlinux has quit IRC14:58
*** shyamb has quit IRC15:02
*** jamesmcarthur has joined #openstack-keystone15:11
*** joshualyle has quit IRC15:15
openstackgerritdo3meli proposed openstack/keystone master: add raw format link to keystone config sample.  https://review.opendev.org/66306315:20
*** joshualyle has joined #openstack-keystone15:20
lbragstadlifeless i still don't think i'm fully understanding testresources - despite setting up a resource manager, each test case seems to be generating new resources on each run15:20
lbragstadin your example - https://github.com/testing-cabal/testresources/blob/master/doc/example.py#L23-L29 does this mean you need to override both make() and getResource()?15:22
lbragstadif i override only getResource to return an instance of the resource i'm trying to share, it gets set on each test case, but it's also generated each time?15:22
lbragstadafter reading the source a couple of times and digging through it, it appears TestResourceManager can be used a couple different ways and it's not clear to me which methods i need to override to do what i want15:24
lbragstadcurrently - i only want to manage a single resource, i'm not trying to implement a dependency of resources15:24
*** joshualyle has quit IRC15:24
*** joshualyle has joined #openstack-keystone15:25
*** joshualyle has quit IRC15:28
*** joshualyle has joined #openstack-keystone15:28
kmalloco/15:28
kmalloclbragstad: let me look at it today as well.15:29
lbragstadthanks kmalloc15:29
kmalloclbragstad: i've dug around in that in the past.15:29
lbragstadthe library is really small and i get the idea... but i must be missing something still15:29
kmallocso keep in mind there *will* be duplicate resources made.15:29
kmallocbut that should be per-worker.15:30
lbragstadi think that's fine15:30
lbragstadthe main thing we're trying to solve here i think is just reusing the bootstrapper across test cases run by the same worker15:30
kmalloclet me see your example code15:32
lbragstadlemme push what i have... it's trash, but..15:32
kmallocsure.15:32
kmallocpaste is fine too15:32
*** joshualyle has quit IRC15:33
openstackgerritLance Bragstad proposed openstack/keystone master: WIP: use testresources for sharing across unit tests  https://review.opendev.org/66306515:33
lbragstadi think i've changed the actual implementation about a dozen times15:34
lbragstadbased on either the documentation in testresources or the actual code i'm trying to hook into15:34
kmallocright.15:35
*** gyee has joined #openstack-keystone15:35
lbragstadhttps://review.opendev.org/#/c/663065/1/keystone/tests/unit/base_classes.py@148 is supposed to be the *new* test case we use for protection testing15:35
lbragstadit should load a bootstrapper instance and bootstrap keystone15:35
lbragstadthen set the bootstrapper instance as an instance variable of the tests case15:36
lbragstadthen - in test_policies, we would define a test class for each persona we want to test15:36
lbragstadhttps://review.opendev.org/#/c/663065/1/keystone/tests/unit/protection/v3/test_policies.py,unified15:36
kmallocyou do need to override "make" according to the docs15:36
lbragstadmaybe?15:37
kmallocmake15:37
kmalloc    Must be overridden in every concrete subclass15:37
lbragstadright...15:37
lbragstadbut, the weird thing15:37
kmallocit should be called by getResource though15:37
lbragstadis that if i just override getResource(), it works and a NotImplemented isn't raised15:37
lbragstadbecause my implementation isn't calling make()15:38
*** joshualyle has joined #openstack-keystone15:38
*** joshualyle has quit IRC15:39
*** spsurya has joined #openstack-keystone15:40
*** joshualyle has joined #openstack-keystone15:40
kmallochm.15:40
lbragstadit can - but it's also not really clear to me what i'm supposed to do with dependency_resources15:41
kmallochttps://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L84715:41
kmallocon tearDown it's cleaning the resources up15:41
kmallocso it's not caching it.15:41
lbragstadwelll - yes and no i think15:42
lbragstadthat calls this15:42
lbragstadhttps://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L55615:42
lbragstadwhich only sets a counter15:42
lbragstadthen calls15:42
lbragstadhttps://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L53515:42
lbragstadand clean doesn't do anything unless you override it https://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L54315:42
kmallochm. you're also only ever incrementing uses15:42
kmalloc in your code15:42
lbragstadright - that's another thing that i'm not really sure what to do with15:43
lbragstadapparently other parts of testresources rely on self._uses15:43
lbragstadbut i didn't know if i should be in control of setting that if it's private?15:43
lbragstadthe method docs for the things i'm supposed to override don't really tell you if you should be setting that variable15:43
kmallocoh, i wonder.15:44
kmallocsec.15:44
*** bnemec has quit IRC15:44
*** jistr is now known as jistr|call15:45
*** jistr|call is now known as jistr15:45
*** bnemec has joined #openstack-keystone15:46
cmurphykeystone meeting in 13 minutes in #openstack-meeting-alt, please add items to the agenda https://etherpad.openstack.org/p/keystone-weekly-meeting15:48
kmalloci'm surprised you're not causing an exception to be raised since .finishedWith shouldn't be callable in tearDown15:48
kmallocsince bootstrapper is not a resource.15:48
lbragstadisn't it? https://review.opendev.org/#/c/663065/1/keystone/tests/unit/base_classes.py@15015:49
kmallochm. i don't think that is returning what you think it's returning.15:49
kmallochttps://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L83715:50
lbragstadthat's another question i have15:50
kmallocthat calls .getResource()15:50
kmallocso you're returning the bootstrapper15:50
kmallocitself15:50
lbragstadis the manager suppose to return the source from __init__() or make() or both?15:50
kmallocwhich isn't a resource.15:50
lbragstadi'm treating the bootstrapper as the resource15:51
lbragstadwhen an instance of bootstrapper is created, i can set all the things i need to then call bootstrapper.bootstrap() once15:51
*** joshualyle has quit IRC15:51
kmallocbootstrapper is coming from keystone.cmd15:51
lbragstadyeah15:52
lbragstadthat's the same object we invoke when operators use `keystone-manage`15:52
kmallocwhich isn't a testresource / doesn't have .finishedWith, etc15:52
kmalloci'm surprised that doesn't cause an exception on .tearDown15:52
kmallocand may cause other unexpected behavior15:52
lbragstadwell - i think the TestResourceManager is supposed to implement that interface, no?15:52
kmallocbut you're directly implementing .getResource to return a bare bootstrapper15:53
lbragstadyeah15:53
lbragstadbecause i want each test case to have the instance of bootstrapper() as self.bootstrapper15:53
kmalloci think you need to implement make to return a bootstrapper15:54
kmallocnot .getResource()15:54
lbragstadthat's what i originally did here - https://review.opendev.org/#/c/663065/1/keystone/tests/unit/base_classes.py@9415:54
lbragstad(ignore the _ in the name)15:54
*** itlinux has joined #openstack-keystone15:54
kmallocright15:54
kmallocand don't implement .getResource directly15:54
kmallocput your logic in .make() to get a new bootstrapper.15:55
* lbragstad nods15:55
*** joshualyle has joined #openstack-keystone15:55
kmalloci think overriding .getResource may have broken a number of things in weird ways15:55
kmallocsince you're not supering up to the parent15:56
kmallocwhich means you're not calling https://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L58215:56
kmallocwhich doesn't set current_resource15:56
kmallocetc15:56
kmallocnow... i'm not saying your implementation shouldn't just work as well15:57
kmallocbut we're kindof end-around working past the testresource manager's code this way15:57
kmallocinstead of leaning on it15:57
lbragstadi'm not surprised that it doesn't... i'm just confused what the intended interface is15:57
kmallocthe intended interface is .make() to return a new resource15:57
lbragstadbut not according to this? https://github.com/testing-cabal/testresources/blob/master/doc/example.py#L23-L2915:57
kmallocwhen it's really needed15:57
kmalloci'm looking at the docs15:58
kmalloci think .make() is what is intended to be overridden15:58
kmallocthis looks like it's the error raised.15:58
kmallocand it might be historically getResource vs. make15:58
*** itlinux has quit IRC15:59
kmallocor pre-dated the push to github.15:59
kmallocanyway. i'd try just implementing make15:59
kmallocyou're missing a bunch of logic by overriding .getResource16:00
lbragstadyeah - maybe16:00
lbragstadi'll tinker with it and push a new patch with just make() implemented16:00
kmallocand you call .dirtied() when you make a change that should force a new resource to be generated16:01
kmallocso to start to mirror current tests you call .dirtied() every time16:01
*** joshualyle has quit IRC16:02
openstackgerritLance Bragstad proposed openstack/keystone master: WIP: use testresources for sharing across unit tests  https://review.opendev.org/66306516:02
kmalloconce we eliminate the need to care about the data changing, you stop calling it16:02
lbragstad^ that's just with make() implemented, and it creates a new resource on each test run (so no better than what we're currently doing i don't think)16:02
kmallocand this is why16:07
kmallochttps://github.com/testing-cabal/testresources/blob/master/testresources/__init__.py#L56816:07
kmallocthe uses are dropped to 0, and the resource is unset16:08
kmallocTestResources are, afaict, supposed to be shared concurrently16:09
lbragstadyeah - i don't really understand that bit completely, the logic makes sense16:09
kmallocif no one is using it, it is fair to cleanup16:10
*** joshualyle has joined #openstack-keystone16:11
*** itlinux has joined #openstack-keystone16:11
kmallocpart of it is likely to ensure the resource is cleaned up at the end of the tests that need it16:13
kmalloci'd want to check w/ lifeless on this, but i *think* there is a bug here. let me check one more thing.16:14
* lbragstad nods16:14
lbragstadif we get something working, i'd like to ask if i can propose some more documentation to testresources16:14
lbragstador some more detailed examples16:15
*** joshualyle has quit IRC16:15
kmallocso, i think this is more for the case: X depends on Y and Z, and Q also depends on Y, so only create one instance of Y16:16
kmallocfor both16:16
kmallocunless Y is dirtied.16:16
lbragstadi don't think our use cases is that complicated16:16
lbragstadwe just want to make sure bootstrap only happens once across an entire suite of tests16:17
kmallocwe want to maintain the same testresource (except if dirtied) across the lifespan of the TestCaseClass16:17
kmallocso... i *think*... we might need to override .finishedWith, let me check one more thing16:17
kmallocright and .dirtied would still force a .reset/new instance to be added to .current_resource16:18
*** xek has quit IRC16:20
*** xek_ has joined #openstack-keystone16:20
*** imacdonn has joined #openstack-keystone16:26
*** itlinux has quit IRC16:29
*** itlinux has joined #openstack-keystone16:31
johnthetubaguylbragstad: dumb question, I am failing to create a fake system scoped context, with system_scope="all", seems like policy is checking for "system" in the creds, not "system_scope"?16:33
lbragstadon the context object?16:34
johnthetubaguyhttps://opendev.org/openstack/oslo.policy/src/branch/master/oslo_policy/policy.py#L92816:34
johnthetubaguyyeah, creating a context object, trying to get it to pass the tests16:34
lbragstaddo you have a patch up or a diff I can look at?16:34
johnthetubaguybut test fails saying my context is project scoped16:34
johnthetubaguyhttps://review.opendev.org/#/c/657823/216:34
johnthetubaguyis the wider context16:34
johnthetubaguyI should upload the new version... there is a red herring in the failures16:35
*** itlinux has quit IRC16:37
johnthetubaguyoh wait, I found a bit of code that confused me... hmm16:37
*** xek_ has quit IRC16:37
johnthetubaguythat was confusing me16:38
lbragstadwhich part?16:38
johnthetubaguy if context.system_scope: creds['system'] = context.system_scope16:38
johnthetubaguyat least I now see why it should work16:38
johnthetubaguyalthough still a bit confused16:38
lbragstadhttps://opendev.org/openstack/oslo.policy/src/branch/master/oslo_policy/policy.py#L977-L99616:39
lbragstadyeah - ^ that is what makes it easy for nova to just pass context objects directly to oslo.policy during enforcement16:39
lbragstadnova shouldn't have to worry about building custom creds dictionaries anymore16:39
*** itlinux has joined #openstack-keystone16:41
johnthetubaguylbragstad: ah, this is what I needed: https://review.opendev.org/#/c/657823/4/nova/policy.py17:12
johnthetubaguyI see what you mean now :)17:12
*** adriant has quit IRC17:20
*** itlinux has quit IRC17:23
*** itlinux has joined #openstack-keystone17:24
*** whoami-rajat has quit IRC17:24
lbragstadjohnthetubaguy aha - yep17:25
lbragstadwe were hoping that would make it easier for people to make the change17:25
lbragstadinstead of having to understand this nebulous dictionary called `creds`17:25
lbragstadif we push the commonality into the context object and teach oslo.policy how to understand that, then hopefully it lowers the bar by not requiring each service to populate system-scope things in their hand-rolled dictionaries17:26
*** gyee has quit IRC17:41
cmurphywonderful, sphinx release two days ago broke our gate :(17:43
*** jamesmcarthur has quit IRC17:46
*** adriant has joined #openstack-keystone17:50
kmallocknikolla, cmurphy: added you as core for spectroscope.17:51
kmallocany keystone core has a free pass to join spectroscope core17:51
kmallocbut it will be developed separately from keystone until it's either ready to be official keystone or the team decides it should remain separate17:52
kmallocfor now it will live in x/spectroscope17:52
kmallocand the repo has not yet been initialized.17:52
kmallocit does not use a bug tracker (we might get gitea issues when some bugs with gitea get fixed), likely I'll add a trello board for tracking work for the initial standup.17:52
knikollakmalloc: awesome!17:57
*** spsurya has quit IRC18:24
*** whoami-rajat has joined #openstack-keystone18:25
*** itlinux has quit IRC18:30
*** itlinux has joined #openstack-keystone18:31
kmalloccmurphy, knikolla: added a trello board for now to cover "to evaluate" "design choices", "work items" and "completed items"18:31
kmalloci've invited both of you to it as well18:32
cmurphythanks kmalloc18:32
*** itlinux has quit IRC18:39
*** joshualyle has joined #openstack-keystone18:40
*** joshualyle has quit IRC18:40
*** itlinux has joined #openstack-keystone18:42
*** vishakha has quit IRC19:05
kmallocso, last minute travel changes, going to be headed out for a funeral tonight. I'll be around (hit/miss) for some of the days thurs, fri, monday. but I'm working where I can.19:37
kmallochave to head to the east coast for this upcoming weekend.19:37
kmalloc=/19:38
*** imacdonn has quit IRC19:38
*** altlogbot_1 has joined #openstack-keystone19:39
cmurphy:( sorry to hear that kmalloc, safe travels19:40
kmallocthanks19:40
kmalloclast minute change, I'm joining brie for her grandfather's funeral (originally I wasn't planning on going)19:41
lbragstad:(19:41
lbragstadtravel safe19:41
*** jamesmcarthur has joined #openstack-keystone19:42
*** jamesmcarthur has quit IRC19:45
*** jamesmcarthur has joined #openstack-keystone19:45
*** itlinux has quit IRC19:50
*** imacdonn has joined #openstack-keystone19:53
*** itlinux has joined #openstack-keystone19:54
*** dave-mccowan has quit IRC19:55
*** dave-mccowan has joined #openstack-keystone20:00
openstackgerritMichael McCune proposed openstack/keystoneauth master: add a handler for unknown HTTP errors  https://review.opendev.org/66313220:07
*** dave-mccowan has quit IRC20:27
*** itlinux has quit IRC20:30
*** itlinux has joined #openstack-keystone20:32
*** hoonetorg has quit IRC20:42
*** dklyle has quit IRC20:49
*** dklyle has joined #openstack-keystone20:49
*** whoami-rajat has quit IRC20:54
*** hoonetorg has joined #openstack-keystone20:55
*** jamesmcarthur has quit IRC21:00
*** jamesmcarthur has joined #openstack-keystone21:00
*** jamesmcarthur has quit IRC21:04
*** pcaruana has quit IRC21:07
*** jamesmcarthur has joined #openstack-keystone21:14
*** itlinux has quit IRC21:16
*** jamesmcarthur has quit IRC21:18
*** jamesmcarthur has joined #openstack-keystone21:20
*** jamesmcarthur has quit IRC21:28
*** raildo has quit IRC21:29
*** jamesmcarthur has joined #openstack-keystone21:49
*** jamesmcarthur has quit IRC21:51
*** jamesmcarthur has joined #openstack-keystone22:04
*** jamesmcarthur has quit IRC22:16
*** dave-mccowan has joined #openstack-keystone22:44
*** tkajinam has joined #openstack-keystone22:51
*** dave-mccowan has quit IRC22:56
*** dave-mccowan has joined #openstack-keystone22:57
*** rcernin has joined #openstack-keystone23:20
*** gyee has joined #openstack-keystone23:29
*** itlinux has joined #openstack-keystone23:37
*** itlinux has quit IRC23:38
*** itlinux has joined #openstack-keystone23:42
*** itlinux_ has joined #openstack-keystone23:45
*** itlinux has quit IRC23:47

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