Unable to get local config from wsgi middleware

Bug #1190978 reported by Alvaro Lopez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Alvaro Lopez

Bug Description

I am unable to get the local configuration for a wsgi middleware:

    [filter:myfilter]
    factory = ...
    variable = foo

I am expecting to get the __init__ method called with kwargs = {"variable": "foo"} but it is not. This is because the keystone.common.wsgi.Middleware.factory() method returns cls(app) instead of cls(app, **local_config)

Alvaro Lopez (aloga)
Changed in keystone:
status: New → In Progress
assignee: nobody → Alvaro Lopez (aloga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Wishlist
Revision history for this message
Alvaro Lopez (aloga) wrote :

Hi Dolph.

This should not be tagged as wishlist, because the code states that this is the expected behaviour (see factory method of keystone.common.wsgi.Middleware) and because this was introduced only after this commit was merged: https://github.com/openstack/keystone/commit/feadf7576058f47f2bb1f0bc097d45101e8c1562

Dolph Mathews (dolph)
Changed in keystone:
importance: Wishlist → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/33039
Committed: http://github.com/openstack/keystone/commit/a48488764a38961a66ad07c4bf629f220f80334c
Submitter: Jenkins
Branch: master

commit a48488764a38961a66ad07c4bf629f220f80334c
Author: Alvaro Lopez Garcia <email address hidden>
Date: Fri Jun 14 13:47:10 2013 +0200

    wsgi.Middleware factory should use **kwargs

    Fixes bug 1190978

    Change-Id: Ifb0673b7aab5292c13bf5c86c5cc2de8096f7e3e

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
Dolph Mathews (dolph) wrote :

The same is applied to BaseApplication and Router in https://review.openstack.org/#/c/34174/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/34174
Committed: http://github.com/openstack/keystone/commit/8f1c5840d9eb65e4dfa48e54710d42b18dadd77e
Submitter: Jenkins
Branch: master

commit 8f1c5840d9eb65e4dfa48e54710d42b18dadd77e
Author: Alvaro Lopez Garcia <email address hidden>
Date: Mon Jun 24 11:08:48 2013 +0200

    wsgi.BaseApplication and wsgi.Router factories should use **kwargs

    Also removed wrong references to nova in docstrings.

    This is related with bug 1190978

    Change-Id: I1b945596d4ebe39d03069b590b7f1a444eaef72f

Thierry Carrez (ttx)
Changed in keystone:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-2 → 2013.2
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.