TypeError: Unexpected keyword passed to sqlalchemy.orm.session from cf_connections

Bug #1630747 reported by Felipe Monteiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Felipe Monteiro
Mitaka
Fix Committed
Undecided
Felipe Monteiro
Newton
Fix Committed
Undecided
Felipe Monteiro
Ocata
Fix Released
Medium
Felipe Monteiro

Bug Description

In both Python 2.7 and 3.4, when calling delete_environment_from_space, a TypeError is thrown, because delete in sqlalchemy.orm.session gets an unexpected keyword argument 'synchronize.' When the keyword is removed, the code correctly executes.

The function prototype for delete in sqlalchemy/orm/session.py is: def delete(self, instance).

The following stacktrace is produced:

Traceback (most recent call last):
  File "/opt/stack/mitaka-murano-gerrit/murano/tests/unit/db/services/test_cf_connections.py", line 177, in test_delete_environmnet_from_space
    cf_connections.delete_environment_from_space(environment.id)
  File "/opt/stack/mitaka-murano-gerrit/murano/db/services/cf_connections.py", line 91, in delete_environment_from_space
    synchronize=False)
TypeError: delete() got an unexpected keyword argument 'synchronize'

Felipe Monteiro (fm577c)
Changed in murano:
assignee: nobody → Felipe Monteiro (fm577c)
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/382652

Revision history for this message
Felipe Monteiro (fm577c) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to murano (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/382654

Felipe Monteiro (fm577c)
Changed in murano:
status: In Progress → Fix Committed
Revision history for this message
Valerii Kovalchuk (vakovalchuk) wrote :

Please don't change the status by hand, it will change automatically when fix is merged

Changed in murano:
status: Fix Committed → In Progress
Changed in murano:
importance: Undecided → Medium
milestone: none → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/382652
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=9ff3f49f23f9bf40f657e68e2359cf79df047138
Submitter: Jenkins
Branch: master

commit 9ff3f49f23f9bf40f657e68e2359cf79df047138
Author: Felipe Monteiro <email address hidden>
Date: Wed Oct 5 16:33:47 2016 -0400

    Fix TypeError being thrown by delete_environment_from_space
    in cf_connections.

    An unexpected keyword, 'synchronized', is passed to the
    function delete from delete_environment_from_space.
    This fix removes 'synchronized' arg from the call to
    delete.

    Change-Id: I065dc1a81dc0c23cc9a264399a99255e8272b07d
    Closes-Bug: #1630747

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/383875

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

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

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

Reviewed: https://review.openstack.org/383875
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=1627144d367218e4ef94d953395e04fe45caba94
Submitter: Jenkins
Branch: stable/newton

commit 1627144d367218e4ef94d953395e04fe45caba94
Author: Felipe Monteiro <email address hidden>
Date: Fri Oct 7 14:53:35 2016 -0400

    Fix TypeError being thrown by delete_environment_from_space
    in cf_connections.

    An unexpected keyword, 'synchronized', is passed to the
    function delete from delete_environment_from_space.
    This fix removes 'synchronized' arg from the call to
    delete.

    Change-Id: I90cf75f8cfad5afac31e5afe35d82fbddb362bde
    Closes-Bug: #1630747

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

Reviewed: https://review.openstack.org/383876
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=c41457aec03df5823d932ea83b40e005bc45ca1b
Submitter: Jenkins
Branch: stable/mitaka

commit c41457aec03df5823d932ea83b40e005bc45ca1b
Author: Felipe Monteiro <email address hidden>
Date: Fri Oct 7 14:55:49 2016 -0400

    Fix TypeError being thrown by delete_environment_from_space
    in cf_connections.

    An unexpected keyword, 'synchronized', is passed to the
    function delete from delete_environment_from_space.
    This fix removes 'synchronized' arg from the call to
    delete.

    Change-Id: Ie8e050a1d1508d9b6429aae7d3a7176a001c92e7
    Closes-Bug: #1630747

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

This issue was fixed in the openstack/murano 3.1.0 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.