Error during tenant_quota_usages function calls @memoized cache

Bug #1700578 reported by Michael Dovgal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Michael Dovgal

Bug Description

tenant_quota_usages method here [0] accept list as an input parameter.
Due to list is not immutable object, it couldn't be cached buy @memoized decorator but still method is covered by it.
Every call of this function triggers UnhashableKeyWarning here [1].

[0] - https://github.com/openstack/horizon/blob/359467b4013bb4f89a6a1309e6eda89459288986/openstack_dashboard/usage/quotas.py#L442

[1] - https://github.com/openstack/horizon/blob/4570b4cd7813c5b5d559a87c715f4ee6e6f1f63d/horizon/utils/memoized.py#L88

Michael Dovgal (mdovgal)
Changed in horizon:
assignee: nobody → Michael Dovgal (mdovgal)
summary: - Error during function calls memoized cache
+ Error during tenant_quota_usages function calls @memoized cache
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/477557

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/477557
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ca0f293cb60aa1717cdefed4cbae66a3b2c186b3
Submitter: Jenkins
Branch: master

commit ca0f293cb60aa1717cdefed4cbae66a3b2c186b3
Author: Mykhailo Dovgal <email address hidden>
Date: Mon Jun 26 17:14:25 2017 +0300

    Fix tenant_quota_usages function calls caching

    This patch changes type of 'targets' input parameter in
    tenant_quota_usages function from list -> tuple. It provides
    possibility for @memoized decorator to cache function calls.

    Change-Id: I3c32c3b65ae91e8487fda6148f259fe1931d7c9f
    Closes-Bug: #1700578

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
importance: Undecided → Low
milestone: none → pike-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

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.