Invalid bug, don't try to fix

Bug #1475722 reported by Brian Curtin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Won't Fix
Undecided
Unassigned
OpenStack SDK
Invalid
High
Qiming Teng
heat-cfntools
In Progress
Undecided
shizhihui
python-magnumclient
New
Undecided
Unassigned

Bug Description

They magically allow things to pass. This is bad.

Any usage should be replaced with the Mock class and explicit attributes should be set on it.

Tags: testing
Revision history for this message
Brian Curtin (brian.curtin) wrote :

These exist in 84 places as of today.

Changed in python-openstacksdk:
milestone: 1.0 → none
Qiming Teng (tengqim)
Changed in python-openstacksdk:
assignee: nobody → Qiming Teng (tengqim)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/250226
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=481aedc665a423081d74313bdcd074b9a6c788fc
Submitter: Jenkins
Branch: master

commit 481aedc665a423081d74313bdcd074b9a6c788fc
Author: tengqm <email address hidden>
Date: Thu Nov 26 03:30:52 2015 -0500

    Replace 'MagicMock' with 'Mock'

    This is part of an effort to replace all 'MagicMock' usage with 'Mock'.

    Change-Id: Ia0a62dd704640a1e8885856b3dd0402bafd94c86
    Partial-Bug: #1475722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstacksdk (master)

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

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

Reviewed: https://review.openstack.org/251175
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=17c5559fd6d35c5f0ed47af568ee9e66e823710e
Submitter: Jenkins
Branch: master

commit 17c5559fd6d35c5f0ed47af568ee9e66e823710e
Author: tengqm <email address hidden>
Date: Sun Nov 29 20:59:30 2015 -0500

    Replace 'MagicMock' with 'Mock'

    This is the closing part of an effort to replace all 'MagicMock' with
    'Mock'.

    Change-Id: Ib581fdb2ce62f8275834287caa76a083e64b81a5
    Closes-Bug: #1475722

Changed in python-openstacksdk:
status: In Progress → Fix Committed
Sai Kiran (saikiran)
Changed in python-openstackclient:
assignee: nobody → Sai Kiran (saikiran)
Revision history for this message
Steve Martinelli (stevemar) wrote : Re: Never use MagicMock

Automatically unassigning due to inactivity.

Changed in python-openstackclient:
assignee: Sai Kiran (saikiran) → nobody
Changed in python-openstackclient:
status: New → Confirmed
importance: Undecided → Wishlist
QiangTang (qtang)
Changed in python-openstackclient:
assignee: nobody → QiangTang (qtang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/369826
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=bc222e97b155152be3c8cced987ef1d443076d10
Submitter: Jenkins
Branch: master

commit bc222e97b155152be3c8cced987ef1d443076d10
Author: qtang <email address hidden>
Date: Wed Sep 14 13:27:31 2016 +0800

    Replace 'MagicMock' with 'Mock'

    Change-Id: I7aeceede6bd3cb88cf04f398454f9758dbee20f1
    Closes-Bug: #1475722

Changed in python-openstackclient:
status: In Progress → Fix Released
lilintan (lilintan)
Changed in neutron:
assignee: nobody → lilintan (lilintan)
no longer affects: neutron
Changed in python-neutronclient:
assignee: nobody → lilintan (lilintan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

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

Changed in python-neutronclient:
status: New → In Progress
Changed in python-neutronclient:
importance: Undecided → Low
jian.song (jiansong)
Changed in python-troveclient:
assignee: nobody → jian.song (jiansong)
Hanxi Liu (hanxi-liu)
Changed in ceilometer:
assignee: nobody → Hanxi Liu (hanxi-liu)
Changed in python-ceilometerclient:
assignee: nobody → Hanxi Liu (hanxi-liu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

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

Changed in python-troveclient:
status: New → In Progress
Changed in mistral:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in python-mistralclient:
assignee: nobody → Sharat Sharma (sharat-sharma)
jian.song (jiansong)
Changed in trove:
assignee: nobody → jian.song (jiansong)
LiuNanke (nanke-liu)
Changed in murano:
assignee: nobody → LiuNanke (nanke-liu)
LiuNanke (nanke-liu)
Changed in keystone:
assignee: nobody → LiuNanke (nanke-liu)
Changed in python-muranoclient:
assignee: nobody → LiuNanke (nanke-liu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

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

Changed in python-muranoclient:
status: New → In Progress
Changed in murano:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

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

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

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

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

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

liuwei (liu-wei81)
Changed in heat:
assignee: nobody → liuwei (liu-wei81)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-mistralclient (master)

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

Changed in python-heatclient:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in swift:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in python-swiftclient:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in horizon:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in rally:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in cinder:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
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/373735

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

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

Changed in python-mistralclient:
status: New → In Progress
Changed in glance:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

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

Changed in python-heatclient:
status: New → In Progress
Revision history for this message
Sharat Sharma (sharat-sharma) wrote : Re: Never use MagicMock
sonu (sonu-bhumca11)
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)
Changed in barbican:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in panko:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
Changed in aodh:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

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

Changed in barbican:
status: New → In Progress
Changed in python-barbicanclient:
assignee: nobody → Sharat Sharma (sharat-sharma)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

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

Changed in python-barbicanclient:
status: New → In Progress
Changed in tempest:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in nova:
assignee: nobody → Sharat Sharma (sharat-sharma)
LiuNanke (nanke-liu)
Changed in keystonemiddleware:
assignee: nobody → LiuNanke (nanke-liu)
Changed in python-novaclient:
assignee: nobody → Sharat Sharma (sharat-sharma)
Thomas Herve (therve)
no longer affects: heat
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/373821

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

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

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

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

liwei (wei-li)
no longer affects: glance-store
Lu lei (lei-lu)
Changed in senlin:
assignee: nobody → Lu lei (lei-lu)
Changed in python-senlinclient:
assignee: nobody → Lu lei (lei-lu)
Lu lei (lei-lu)
Changed in tacker:
assignee: nobody → Lu lei (lei-lu)
sonu (sonu-bhumca11)
Changed in python-designateclient:
assignee: nobody → sonu (sonu-bhumca11)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in oslo.log:
assignee: nobody → ZTE-Zhengwei Su (su-zhengwei)
Changed in oslo.service:
assignee: nobody → ZTE-Zhengwei Su (su-zhengwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to aodh (master)

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

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

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

Changed in designate:
status: New → In Progress
Changed in oslo.messaging:
assignee: nobody → ZTE-Zhengwei Su (su-zhengwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to panko (master)

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

Changed in panko:
status: New → In Progress
Changed in python-glanceclient:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

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

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

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

Changed in ironic:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in python-aodhclient:
assignee: nobody → Wenyan Zhang (zhang-wenyan3)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (master)

Change abandoned by sonu (<email address hidden>) on branch: master
Review: https://review.openstack.org/373925

Revision history for this message
sonu (sonu-bhumca11) wrote : Re: Never use MagicMock

Hi

what exactly is the issue here?

also is there any checks available for this to avoid regression?

It is failing while we use Mock

for e.g

x = mock.MagicMock(tst='abc')
>>> x[0]

>>> x = mock.Mock(tst='abc')

>>> x[0]
Traceback (most recent call last):
  File "", line 1, in
TypeError: 'Mock' object does not support indexing

guo yunxian (guoyunxian)
Changed in kolla:
assignee: nobody → guo yunxian (guoyunxian)
Revision history for this message
gordon chung (chungg) wrote :

removing all telemetry related projects. can we please stop creating these copy/paste bugs and adding all projects. i don't want to get emails on every single update unrelated to projects i care about.

please reopen bugs individually with less generic explanation/description.

Revision history for this message
gordon chung (chungg) wrote :

awesome. can't remove projects because there are so many projects it times out. sigh.

Revision history for this message
Brian Curtin (brian.curtin) wrote :

I have no idea what you people are doing. This was for openstacksdk and was solved a while ago.

Gordon, I'll see if I can remove things that look like telemetry.

Revision history for this message
Brian Curtin (brian.curtin) wrote :

Apparently I can't do anything about it either, so unsubscribing from the bug email.

Revision history for this message
gordon chung (chungg) wrote :

good idea. thanks for trying Brian.

Revision history for this message
Sean Dague (sdague) wrote :

To all contributors to this bug. While this looks like helping, it is not. This kind of bug is largely a waste of time.

Before adding more than 4 projects to a bug, please email the openstack-dev mailing list and ensure this is actually a cross cutting issue that people actually believe should be fixed. This just causes busy work for projects, is not helpful.

no longer affects: nova
no longer affects: keystone
no longer affects: trove
no longer affects: horizon
no longer affects: tempest
no longer affects: barbican
no longer affects: ceilometer
no longer affects: designate
no longer affects: neutron
no longer affects: oslo.log
no longer affects: oslo.service
no longer affects: ironic
no longer affects: python-barbicanclient
no longer affects: python-designateclient
no longer affects: python-aodhclient
no longer affects: python-ceilometerclient
Revision history for this message
Sean Dague (sdague) wrote :

I have deleted every project I had authority to for this bug. Please do not add any projects to this specific bug unless you've gotten acknowledgement that the project team believes this is a bug in their project.

no longer affects: aodh
no longer affects: python-glanceclient
no longer affects: python-heatclient
no longer affects: python-novaclient
no longer affects: python-neutronclient
no longer affects: tacker
no longer affects: python-openstackclient
no longer affects: python-troveclient
no longer affects: cinder
no longer affects: glance
no longer affects: keystonemiddleware
no longer affects: oslo.messaging
Steven Dake (sdake)
no longer affects: kolla
no longer affects: murano
no longer affects: python-muranoclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on panko (master)

Change abandoned by Wenyan Zhang (<email address hidden>) on branch: master
Review: https://review.openstack.org/373927

no longer affects: panko
shizhihui (shizhihui)
Changed in python-heatclient:
assignee: nobody → shizhihui (shizhihui)
assignee: shizhihui (shizhihui) → nobody
assignee: nobody → shizhihui (shizhihui)
no longer affects: python-heatclient
Changed in python-heatclient:
assignee: nobody → shizhihui (shizhihui)
Lu lei (lei-lu)
Changed in python-senlinclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-senlinclient (master)

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

Qiming Teng (tengqim)
no longer affects: senlin
no longer affects: python-senlinclient
Revision history for this message
David Stanek (dstanek) wrote : Re: Never use MagicMock

I agree with Sean's comments. Is there a known case where MagicMock causes broken tests?

Qiming Teng (tengqim)
no longer affects: python-heatclient
shizhihui (shizhihui)
Changed in heat-cfntools:
assignee: nobody → shizhihui (shizhihui)
status: New → Incomplete
status: Incomplete → New
no longer affects: heat-cfntools
shizhihui (shizhihui)
Changed in heat-cfntools:
assignee: nobody → shizhihui (shizhihui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat-cfntools (master)

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

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

Reviewed: https://review.openstack.org/375208
Committed: https://git.openstack.org/cgit/openstack/heat-cfntools/commit/?id=590b3fb99635157a3963f67995593b872f92a1c1
Submitter: Jenkins
Branch: master

commit 590b3fb99635157a3963f67995593b872f92a1c1
Author: shizhihui <email address hidden>
Date: Fri Sep 23 10:57:16 2016 +0800

    Replace 'MagicMock' with 'Mock'

    Change-Id: I24e87a1c341f63929f93d7306782e3e9d6b398fb
    Partial-Bug: #1475722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.3.0

This issue was fixed in the openstack/python-openstackclient 3.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-mistralclient (master)

Change abandoned by Sharat Sharma (<email address hidden>) on branch: master
Review: https://review.openstack.org/373725

no longer affects: mistral
no longer affects: python-mistralclient
Changed in ironic:
assignee: nobody → Madhuri Kumari (madhuri-rai07)
Changed in zun:
assignee: nobody → Madhuri Kumari (madhuri-rai07)
Changed in python-higginsclient:
assignee: nobody → Madhuri Kumari (madhuri-rai07)
Changed in zun:
status: New → Confirmed
Changed in magnum:
assignee: nobody → feng.shengqin@zte.com.cn (feng-shengqin)
Changed in python-magnumclient:
assignee: nobody → feng.shengqin@zte.com.cn (feng-shengqin)
no longer affects: rally
no longer affects: python-swiftclient
Revision history for this message
John L. Villalovos (happycamp) wrote :

Please stop adding projects to this bug. It is not a valid bug.

no longer affects: ironic
summary: - Never use MagicMock
+ Invalid bug, don't try to fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

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

Changed in zun:
status: Confirmed → In Progress
Changed in python-openstacksdk:
status: Fix Committed → Invalid
Changed in zun:
status: In Progress → Invalid
assignee: Madhuri Kumari (madhuri-rai07) → nobody
Changed in python-higginsclient:
assignee: Madhuri Kumari (madhuri-rai07) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on zun (master)

Change abandoned by Madhuri Kumari (<email address hidden>) on branch: master
Review: https://review.openstack.org/414475
Reason: The bug has been marked as invalid, so abandoning it.

no longer affects: zun
Changed in magnum:
assignee: feng.shengqin@zte.com.cn (feng-shengqin) → nobody
Changed in python-magnumclient:
assignee: feng.shengqin@zte.com.cn (feng-shengqin) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.1.0

This issue was fixed in the openstack/python-neutronclient 6.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/murano-dashboard 3.1.0

This issue was fixed in the openstack/murano-dashboard 3.1.0 release.

no longer affects: python-higginsclient
no longer affects: magnum
Changed in swift:
assignee: Sharat Sharma (sharat-sharma) → nobody
Tim Burke (1-tim-z)
Changed in swift:
status: New → Won't Fix
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.