← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1620722] Re: @property methods in Managers are cached

 

Reviewed:  https://review.openstack.org/364562
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=83e3c00809b38d26fd43a29fe2581c19731ae57e
Submitter: Jenkins
Branch:    master

commit 83e3c00809b38d26fd43a29fe2581c19731ae57e
Author: David Stanek <dstanek@xxxxxxxxxxx>
Date:   Thu Sep 1 21:28:06 2016 +0000

    Only cache callables in the base manager
    
    The base manager had an issue where if a property was accessed through the
    __getattr__ it would be cached.
    
    Closes-Bug: 1620722
    Change-Id: Iad7ca87a30fd5fa9f8bc88a0c7f74acca2ae1a56


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1620722

Title:
  @property methods in Managers are cached

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  When working on the credential encryption spec, I found that one of
  the @property methods in the implementation was having it's value
  cached. Typical @property methods should be run every time they are
  called. This was not the case in the credential encryption
  implementation because we override the __getattr__ method in our base
  Manager class [0].

  We should modify that method so that @property methods can be used
  when inheriting from the common Manager.

  [0]
  https://github.com/openstack/keystone/blob/b47f10290ed83415149f3d2ab6b0dc64646e578a/keystone/common/manager.py#L185-L189

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1620722/+subscriptions


References