Latest keystoneclient breaks tests

Bug #1279907 reported by Steven Hardy
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
David Lyle
Grizzly
Fix Released
Critical
Matthias Runge
Havana
Fix Released
Critical
Matthias Runge
OpenStack Heat
Fix Released
Critical
Thomas Herve
Havana
Fix Released
Critical
Steven Hardy

Bug Description

The new release of keystoneclient (0.6.0) introduces some new metaclass magic which breaks our mocking in master :(

We probably need to modify the test to use mock instead of mox, as the issue seems to be that mox misinterprets the class type due to the metaclass.

Immediate workaround while we workout the solution is probably to temporarily cap keystoneclient to 0.5.1 which did not have this issue.

Traceback (most recent call last):
  File "/home/shardy/git/heat/heat/tests/test_heatclient.py", line 449, in test_trust_init
    self._stubs_v3(method='trust')
  File "/home/shardy/git/heat/heat/tests/test_heatclient.py", line 83, in _stubs_v3
    self.m.StubOutClassWithMocks(kc_v3, "Client")
  File "/usr/lib/python2.7/site-packages/mox.py", line 366, in StubOutClassWithMocks
    raise TypeError('Given attr is not a Class. Use StubOutWithMock.')
TypeError: Given attr is not a Class. Use StubOutWithMock.

Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Steven Hardy (shardy)
Changed in heat:
milestone: none → icehouse-3
David Lyle (david-lyle)
Changed in horizon:
milestone: none → icehouse-3
assignee: nobody → David Lyle (david-lyle)
importance: Undecided → Critical
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/73410

Changed in horizon:
status: New → In Progress
Matthias Runge (mrunge)
tags: added: havana-backport-potential
tags: added: grizzly-backport-potential
Changed in heat:
assignee: Steven Hardy (shardy) → Steve Baker (steve-stevebaker)
Revision history for this message
Steve Baker (steve-stevebaker) wrote :
Changed in heat:
assignee: Steve Baker (steve-stevebaker) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit 043085f812a1d06e8e082b2dbd52f406172bbfff
Author: David Lyle <email address hidden>
Date: Thu Feb 13 13:57:22 2014 -0700

    Fixing tests to work with keystoneclient 0.6.0

    Another item needs mocking with the new release of
    python_keystoneclient. Adding it to mocked keystoneclient.Client
    object.

    Closes-Bug: #1279907
    Change-Id: I3c43a7290a6e05c718082dcad369162bf21e3603

Changed in horizon:
status: In Progress → Fix Committed
Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
assignee: Steven Hardy (shardy) → Thomas Herve (therve)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/73562

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/73568

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/73544
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=26fe7a961f644e1c93a92c8a73b25d649137f7b9
Submitter: Jenkins
Branch: master

commit 26fe7a961f644e1c93a92c8a73b25d649137f7b9
Author: Thomas Herve <email address hidden>
Date: Fri Feb 14 10:11:55 2014 +0100

    Fix incompatibilities in tests with keystoneclient 0.6

    The patch removes usage of StubOutClassWithMocks with keystone Client
    class, which doesn't work anymore now that there is an ABC in the MRO.

    Change-Id: I4e8ff2cde2723060faf9906ecf51b13911ac5f42
    Closes-Bug: #1279907

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/74129

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/74316

Alan Pevec (apevec)
tags: removed: grizzly-backport-potential havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/havana)

Reviewed: https://review.openstack.org/74316
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=cfd6b0207420f4322d8bbb0d2af348e7cdeeed03
Submitter: Jenkins
Branch: stable/havana

commit cfd6b0207420f4322d8bbb0d2af348e7cdeeed03
Author: Thomas Herve <email address hidden>
Date: Fri Feb 14 10:11:55 2014 +0100

    Fix incompatibilities in tests with keystoneclient 0.6

    The patch removes usage of StubOutClassWithMocks with keystone Client
    class, which doesn't work anymore now that there is an ABC in the MRO.

    Closes-Bug: #1279907
    (cherry picked from commit 26fe7a961f644e1c93a92c8a73b25d649137f7b9)

    Conflicts:
     heat/tests/test_heatclient.py

    Change-Id: I4e8ff2cde2723060faf9906ecf51b13911ac5f42

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

Reviewed: https://review.openstack.org/73568
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=e6a46534d08fe10fa71fd903aca9c87230667b18
Submitter: Jenkins
Branch: stable/grizzly

commit e6a46534d08fe10fa71fd903aca9c87230667b18
Author: David Lyle <email address hidden>
Date: Thu Feb 13 13:57:22 2014 -0700

    Fixing tests to work with keystoneclient 0.6.0

    Another item needs mocking with the new release of
    python_keystoneclient. Adding it to mocked keystoneclient.Client
    object.

    Closes-Bug: #1279907
    Change-Id: I3c43a7290a6e05c718082dcad369162bf21e3603
    (cherry picked from commit 043085f812a1d06e8e082b2dbd52f406172bbfff)

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

Reviewed: https://review.openstack.org/73562
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=82cb9f6f019fd3205ec736e1db77616447c0e890
Submitter: Jenkins
Branch: stable/havana

commit 82cb9f6f019fd3205ec736e1db77616447c0e890
Author: David Lyle <email address hidden>
Date: Thu Feb 13 13:57:22 2014 -0700

    Fixing tests to work with keystoneclient 0.6.0

    Another item needs mocking with the new release of
    python_keystoneclient. Adding it to mocked keystoneclient.Client
    object.

    Closes-Bug: #1279907
    Change-Id: I3c43a7290a6e05c718082dcad369162bf21e3603
    (cherry picked from commit 043085f812a1d06e8e082b2dbd52f406172bbfff)

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-3 → 2014.1
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.