@property methods in Managers are cached

Bug #1620722 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
David Stanek

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

Changed in keystone:
assignee: nobody → Lance Bragstad (lbragstad)
status: New → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote :
Changed in keystone:
assignee: Lance Bragstad (lbragstad) → nobody
assignee: nobody → David Stanek (dstanek)
Changed in keystone:
importance: Undecided → Medium
milestone: none → newton-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 10.0.0.0rc1

This issue was fixed in the openstack/keystone 10.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.