Code refactor/cleanup breaks programs that call the committed variable name

Bug #1521429 reported by Julia Kreger
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Critical
John L. Villalovos

Bug Description

https://review.openstack.org/#/c/246692/ landed this evening and it removes various interfaces get/create/delete/update interfaces to a generic wrapper interface, however at the same time, most (if not ?all? of these interfaces) had previously committed to variable names in the client API which means that this change breaks any client that must call the client's various call with a non-positional variable argument.

As a result of this change, Shade's ironic support is broken, which also mean's Ansible support of Ironic/Bifrost is also for any consumer of master branch.

Example Traceback:
Traceback (most recent call last):
  File "/home/jenkins/.ansible/tmp/ansible-tmp-1448921144.91-270661348809640/os_ironic", line 2067, in <module>
    main()
  File "/home/jenkins/.ansible/tmp/ansible-tmp-1448921144.91-270661348809640/os_ironic", line 243, in main
    server = cloud.get_machine(node_id)
  File "/usr/local/lib/python2.7/dist-packages/shade/operatorcloud.py", line 92, in get_machine
    _tasks.MachineNodeGet(node_id=name_or_id))
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 132, in submitTask
    return task.wait()
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 82, in wait
    self._traceback)
  File "/usr/local/lib/python2.7/dist-packages/shade/task_manager.py", line 96, in run
    self.done(self.main(client))
  File "/usr/local/lib/python2.7/dist-packages/shade/_tasks.py", line 552, in main
    return client.ironic_client.node.get(**self.args)
TypeError: get() got an unexpected keyword argument 'node_id'

Shade's task wrapper:

http://git.openstack.org/cgit/openstack-infra/shade/tree/shade/_tasks.py#n550

Original call in shade:

http://git.openstack.org/cgit/openstack-infra/shade/tree/shade/operatorcloud.py#n92

Revision history for this message
Ruby Loo (rloo) wrote :

It looks like we broke the API, which isn't a good thing. We should revert the patch for now, unless there's a quick way to change the code to support both the original API and the new API.

Changed in python-ironicclient:
importance: Undecided → Critical
Revision history for this message
John L. Villalovos (happycamp) wrote :

I also vote for reverting the code until we figure out a fix.

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

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

Changed in python-ironicclient:
assignee: nobody → John L. Villalovos (happycamp)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/251613
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=861b1f4b8e00d9cbc70be182fc362124903cb5d3
Submitter: Jenkins
Branch: master

commit 861b1f4b8e00d9cbc70be182fc362124903cb5d3
Author: John L. Villalovos <email address hidden>
Date: Mon Nov 30 18:59:50 2015 -0800

    Revert "Refactoring and removing duplicate code of "base.Manager" heirs"

    This reverts commit 46b279bb36b2647bf04097fe271586fca76f5ed0.

    The patch being reverted has broken the API compatibility. Until a fix
    for this issue has been created, the patch should be reverted.

    Change-Id: I1295c3e0d5ca228253874719befd7ed842d505fa
    Closes-Bug: #1521429

Changed in python-ironicclient:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-ironicclient 1.1.0

This issue was fixed in the openstack/python-ironicclient 1.1.0 release.

Dmitry Tantsur (divius)
Changed in python-ironicclient:
status: Fix Committed → Fix Released
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.