ModalBackdropMixin imposes empty init method

Bug #1582816 reported by Kirill Zaitsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Kirill Zaitsev

Bug Description

Recently a commit landed in horizon, that changed inheritance order of Mixins. https://github.com/openstack/horizon/commit/4c33d2d40cac592385f7bcfbc106c379d7b70020 The change itself is ok, however this now means, that any class inherited from ModalFormMixin should have an init without parameters.

This change broke murano-dashboard since we inherit from both formtools wizard and ModalFormMixin.
here is an example of the errors we get http://paste.openstack.org/show/497387/

It might be a good idea to allow *args, **kwargs in ModalBackdropMixin's init method

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/317628

Changed in horizon:
assignee: nobody → Kirill Zaitsev (kzaitsev)
status: New → In Progress
Timur Sufiev (tsufiev-x)
Changed in horizon:
importance: Undecided → High
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit bb1547c8abcc0d0d3dc4a3199e8e8bd1b5527c12
Author: Kirill Zaitsev <email address hidden>
Date: Tue May 17 19:59:40 2016 +0300

    Add *args, **kwargs to ModalBackdropMixin's init method

    Before this change ModalBackdropMixin called super(...).__init__()
    without arguments. This imposed restrictions on what classes this
    mixin could have been mixed into, i.e. only classes, that do not accept
    any parameters.
    This proved to be a problem for murano-dashboard, since it uses this
    mixin (indirectly through ModalFormMixin) and mixes it into a class,
    that accepts parameters to it's init method.
    This change allows to use ModalBackdropMixin with classes that have
    init methods with parameters.

    Change-Id: I6155476738021b784ef7e643c968f1d784b15906
    Closes-Bug: #1582816

Changed in horizon:
status: In Progress → Fix Released
tags: added: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/323713

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/323713
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=94d28df201f8f0838e09f290cd0aaf1512eea81a
Submitter: Jenkins
Branch: stable/mitaka

commit 94d28df201f8f0838e09f290cd0aaf1512eea81a
Author: Kirill Zaitsev <email address hidden>
Date: Tue May 17 19:59:40 2016 +0300

    Add *args, **kwargs to ModalBackdropMixin's init method

    Before this change ModalBackdropMixin called super(...).__init__()
    without arguments. This imposed restrictions on what classes this
    mixin could have been mixed into, i.e. only classes, that do not accept
    any parameters.
    This proved to be a problem for murano-dashboard, since it uses this
    mixin (indirectly through ModalFormMixin) and mixes it into a class,
    that accepts parameters to it's init method.
    This change allows to use ModalBackdropMixin with classes that have
    init methods with parameters.

    Change-Id: I6155476738021b784ef7e643c968f1d784b15906
    Closes-Bug: #1582816
    (cherry picked from commit bb1547c8abcc0d0d3dc4a3199e8e8bd1b5527c12)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 9.1.1

This issue was fixed in the openstack/horizon 9.1.1 release.

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.