Packge with empty tags list could not be uploaded

Bug #1431275 reported by Ekaterina Chernova
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Ekaterina Chernova

Bug Description

If in package manifest file Tags: [] is set the following error occured:

 dashboard-horizon.exceptions: WARNING Recoverable error: {"explanation": "The server has either erred or is incapable of performing the requested operation.", "code": 500, "error": {"message": "Incompatible collection type: tuple is not list-like", "traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/dist-packages/murano/api/middleware/fault.py\", line 129, in process_request\n return req.get_response(self.application)\n File \"/usr/lib/python2.7/dist-packages/webob/request.py\", line 1320, in send\n application, catch_exc_info=False)\n File \"/usr/lib/python2.7/dist-packages/webob/request.py\", line 1284, in call_application\n app_iter = application(self.environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py\", line 748, in __call__\n return self._call_app(env, start_response)\n File \"/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py\", line 684, in _call_app\n return self._app(env, _fake_start_response)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/murano/common/wsgi.py\", line 192, in __call__\n response = req.get_response(self.application)\n File \"/usr/lib/python2.7/dist-packages/webob/request.py\", line 1320, in send\n application, catch_exc_info=False)\n File \"/usr/lib/python2.7/dist-packages/webob/request.py\", line 1284, in call_application\n app_iter = application(self.environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/paste/urlmap.py\", line 203, in __call__\n return app(environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/routes/middleware.py\", line 131, in __call__\n response = self.app(environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 144, in __call__\n return resp(environ, start_response)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 130, in __call__\n resp = self.call_func(req, *args, **self.kwargs)\n File \"/usr/lib/python2.7/dist-packages/webob/dec.py\", line 195, in call_func\n return self.func(req, *args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/murano/common/wsgi.py\", line 371, in __call__\n action_result = self.execute_action(action, request, **action_args)\n File \"/usr/lib/python2.7/dist-packages/murano/common/wsgi.py\", line 385, in execute_action\n return self.dispatch(self.controller, action, request, **action_args)\n File \"/usr/lib/python2.7/dist-packages/murano/common/wsgi.py\", line 394, in dispatch\n return method(*args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/murano/api/v1/catalog.py\", line 229, in upload\n package = db_api.package_upload(package_meta, req.context.tenant)\n File \"/usr/lib/python2.7/dist-packages/murano/db/catalog/api.py\", line 345, in package_upload\n package.update(values)\n File \"/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py\", line 86, in update\n setattr(self, k, v)\n File \"/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py\", line 226, in __set__\n instance_dict(instance), value, None)\n File \"/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py\", line 1009, in set\n lambda adapter, i: adapter.adapt_like_to_iterable(i))\n File \"/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py\", line 1025, in _set_iterable\n new_values = list(adapter(new_collection, iterable))\n File \"/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py\", line 1009, in <lambda>\n lambda adapter, i: adapter.adapt_like_to_iterable(i))\n File \"/usr/lib/python2.7/dist-packages/sqlalchemy/orm/collections.py\", line 636, in adapt_like_to_iterable\n given, wanted))\nTypeError: Incompatible collection type: tuple is not list-like\n", "type": "TypeError"}, "title": "Internal Server Error"} (HTTP 500)

Changed in murano:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ekaterina Chernova (efedorova)
milestone: none → kilo-3
Changed in murano:
status: Confirmed → 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/164110

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

Reviewed: https://review.openstack.org/164110
Committed: https://git.openstack.org/cgit/stackforge/murano/commit/?id=4992cda20695b79b6d238f2a448ba8aa713dcb2f
Submitter: Jenkins
Branch: master

commit 4992cda20695b79b6d238f2a448ba8aa713dcb2f
Author: Ekaterina Chernova <email address hidden>
Date: Fri Mar 13 11:43:40 2015 +0300

    Fix error with package tags type

    Package tags are mutable, so it's type should be a list everywhere

    Change-Id: I30149f052604a88f647de82526959867c5aaee65
    Closes-Bug: #1431275

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.