<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<br>
<br>
Just a heads up that the latest version of <span class="gmail-il">dogpile</span> (0.7.0 onwards)<br>
have become incompatible with oslo.cache.  This is causing a few<br>
issues for jobs.  It's a little complex due to functional code and many decorated functions.<br>
<br>
The error you will see is:<br>
<i><br></i><p style="margin-left:40px"><i>oslo_cache.</i><i>tests.test_</i><i>cache.CacheRegi</i><i>onTest.</i><i>test_function_</i><i>key_generator_</i><i>with_kwargs<br>
-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>-------</i><i>------</i></p><div style="margin-left:40px"><i>
</i></div><p id="gmail-yui_3_10_3_1_1551186880229_1453" style="margin-left:40px"><i>Captured traceback:<br>
~~~~~~~~~~~~~~~~~~~<br>
    b'Traceback (most recent call last):'<br>
    b'  File "/tmp/oslo.</i><i>cache/oslo_</i><i>cache/tests/</i><i>test_cache.</i><i>py", line 324, in test_function_</i><i>key_generator_</i><i>with_kwargs'<br>
    b'    value=self.</i><i>test_value)</i><i>'<br>
    b'  File "/tmp/oslo.</i><i>cache/.</i><i>tox/py37/</i><i>lib/python3.</i><i>7/site-</i><i>packages/</i><i>testtools/</i><i>testcase.</i><i>py", line 485, in assertRaises'<br>
    b'    self.assertThat</i><i>(our_callable, matcher)'<br>
    b'  File "/tmp/oslo.</i><i>cache/.</i><i>tox/py37/</i><i>lib/python3.</i><i>7/site-</i><i>packages/</i><i>testtools/</i><i>testcase.</i><i>py", line 498, in assertThat'<br>
    b'    raise mismatch_error'<br>
    b'testtools</i><i>.matchers.</i><i>_impl.MismatchE</i><i>rror: <function CacheRegionTest</i><i>._get_cacheable</i><i>_function.</i><i><locals></i><i>.cacheable_</i><i>function at 0x7fec3f795400> returned <oslo_cache.</i><i>tests.test_</i><i>cache.TestProxy</i><i>Value object at 0x7fec3f792550>'</i></p><div><br></div><div>The problem appear since we uncap dogpile.cache on oslo.cache: <a href="https://github.com/openstack/oslo.cache/commit/62b53099861134859482656dc92db81243b88bd9">https://github.com/openstack/oslo.cache/commit/62b53099861134859482656dc92db81243b88bd9</a></div><div><br></div><div>The following unit test fail since we uncap dogpile => <a href="https://github.com/openstack/oslo.cache/blob/master/oslo_cache/tests/test_cache.py#L318">https://github.com/openstack/oslo.cache/blob/master/oslo_cache/tests/test_cache.py#L318</a></div><div><br></div><div>The problem was introduced by: <a href="https://gerrit.sqlalchemy.org/#/c/sqlalchemy/dogpile.cache/+/996/">https://gerrit.sqlalchemy.org/#/c/sqlalchemy/dogpile.cache/+/996/</a></div><div><br></div><div>Your main issue on oslo.cache side is that keyword arguments are tranformed in positionnal arguments when we use dogpile.cache.region.cache_on_arguments.</div><div><div><br></div><div>I've try to revert the changes introduced
 by the previous dogpile.cache change and everything works fine on the 
oslo.cache side when changes was reverted (reverted to revision 
<a href="https://github.com/sqlalchemy/dogpile.cache/blob/2762ada1f5e43075494d91c512f7c1ec68907258/dogpile/cache/region.py">https://github.com/sqlalchemy/dogpile.cache/blob/2762ada1f5e43075494d91c512f7c1ec68907258/dogpile/cache/region.py</a>).</div></div><div><br></div><div>The expected behavior is that dogpile.cache.util.function_key_generator raise a ValueError if **kwargs founds, but our kwargs is empty and our `value=self.test_value was` is recognized as a positionnal argument. <br>Our unit test looking for an assertRaise(ValueError) on cachable decorated function when we pass kwargs but it doesn't happen due to empty kwargs.</div><div><br></div><div>For these reasons we guess that is an dogpile.cache issue and not an oslo.cache issue due to the changes introduced by `decorator` module.<br></div><div><br></div>

The following are related:<br>
</div><div dir="ltr"><br></div><div dir="ltr">- <a href="https://github.com/openstack/oslo.cache/blob/master/oslo_cache/tests/test_cache.py#L318">https://github.com/openstack/oslo.cache/blob/master/oslo_cache/tests/test_cache.py#L318</a> : unit test where the problem occure<br></div><div dir="ltr">- <a href="https://review.openstack.org/#/c/638788/">https://review.openstack.org/#/c/638788/</a> : possible fix but we don't think that is the right way</div><div dir="ltr">- <a href="https://review.openstack.org/#/c/638732/">https://review.openstack.org/#/c/638732/</a> : possible remove of the unit test who fail<br></div><div dir="ltr"><br></div><div dir="ltr">The issue is being tracked in:<br>
<br><a href="https://bugs.launchpad.net/oslo.cache/+bug/1817032">https://bugs.launchpad.net/oslo.cache/+bug/1817032</a></div><div dir="ltr"><br></div><div>If some dogpile expert can take a look and send feedback on this thread you are welcome.</div><div><br></div><div dir="ltr">
Thanks,<br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Hervé Beraud</div><div>Senior Software Engineer<br></div><div>Red Hat - Openstack Oslo</div><div>irc: hberaud</div><div>-----BEGIN PGP SIGNATURE-----<br><br>wsFcBAABCAAQBQJb4AwCCRAHwXRBNkGNegAALSkQAHrotwCiL3VMwDR0vcja10Q+<br>Kf31yCutl5bAlS7tOKpPQ9XN4oC0ZSThyNNFVrg8ail0SczHXsC4rOrsPblgGRN+<br>RQLoCm2eO1AkB0ubCYLaq0XqSaO+Uk81QxAPkyPCEGT6SRxXr2lhADK0T86kBnMP<br>F8RvGolu3EFjlqCVgeOZaR51PqwUlEhZXZuuNKrWZXg/oRiY4811GmnvzmUhgK5G<br>5+f8mUg74hfjDbR2VhjTeaLKp0PhskjOIKY3vqHXofLuaqFDD+WrAy/NgDGvN22g<br>glGfj472T3xyHnUzM8ILgAGSghfzZF5Skj2qEeci9cB6K3Hm3osj+PbvfsXE/7Kw<br>m/xtm+FjnaywZEv54uCmVIzQsRIm1qJscu20Qw6Q0UiPpDFqD7O6tWSRKdX11UTZ<br>hwVQTMh9AKQDBEh2W9nnFi9kzSSNu4OQ1dRMcYHWfd9BEkccezxHwUM4Xyov5Fe0<br>qnbfzTB1tYkjU78loMWFaLa00ftSxP/DtQ//iYVyfVNfcCwfDszXLOqlkvGmY1/Y<br>F1ON0ONekDZkGJsDoS6QdiUSn8RZ2mHArGEWMV00EV5DCIbCXRvywXV43ckx8Z+3<br>B8qUJhBqJ8RS2F+vTs3DTaXqcktgJ4UkhYC2c1gImcPRyGrK9VY0sCT+1iA+wp/O<br>v6rDpkeNksZ9fFSyoY2o<br>=ECSj<br>-----END PGP SIGNATURE-----<br><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>