David, That looks like a bug where the database object is being returned without being properly formatted. Please open a bug if you have not done so already. Thanks!
-Barnaby ----- Original Message ----- From: "David Gao" <[email protected]> To: [email protected] Sent: Wednesday, May 21, 2014 12:30:35 AM Subject: [Pulp-list] Mismatch between Task Search Response and Task obj creation Hi guys, I'm running into an issue with task search using pulp bindings (pulp v2.4). Here's the response I'm getting back from the pulp server after the RestAPI call is made: {u'task_id': u'6c0edca1-b048-454a-a690-776f2f15d078', u'tags': [u'pulp:repository:rhs-2-for-rhui-server-source-x86_64', u'pulp:action:sync'], u'finish_time': 1400615714, u'_ns': u'task_status', u'start_time': 1400615700, u'spawned_tasks': [u'756345bd-ba30-4f33-b6fc-5da54cf44b0f'], u'progress_report': {u'yum_importer': {u'content': {u'size_total': 103251557, u'items_left': 0, u'items_total': 40, u'state': u'FINISHED', u'size_left': 0, u'details': {u'rpm_total': 40, u'rpm_done': 40, u'drpm_total': 0, u'drpm_done': 0}, u'error_details': []}, u'comps': {u'state': u'FINISHED'}, u'distribution': {u'items_total': 0, u'state': u'FINISHED', u'error_details': [], u'items_left': 0}, u'errata': {u'state': u'FINISHED'}, u'metadata': {u'state': u'FINISHED'}}}, u'queue': u'reserved_resource_worke...@ec2-50-16-153-63.compute-1.amazonaws.com', u'state': u'finished', u'result': {u'result': u'success', u'importer_id': u'yum_importer', u'exception': None, u'repo_id': u'rhs-2-for-rhui-server-sou! rce-x86_64', u'traceback': None, u'started': u'2014-05-20T19:55:00Z', u'_ns': u'repo_sync_results', u'completed': u'2014-05-20T19:55:13Z', u'importer_type_id': u'yum_importer', u'error_message': None, u'summary': {u'content': {u'state': u'FINISHED'}, u'comps': {u'state': u'FINISHED'}, u'distribution': {u'state': u'FINISHED'}, u'errata': {u'state': u'FINISHED'}, u'metadata': {u'state': u'FINISHED'}}, u'added_count': 0, u'removed_count': 0, u'updated_count': 40, u'id': u'537bb321edceaa54fce414d4', u'details': {u'content': {u'size_total': 103251557, u'items_left': 0, u'items_total': 40, u'state': u'FINISHED', u'size_left': 0, u'details': {u'rpm_total': 40, u'rpm_done': 40, u'drpm_total': 0, u'drpm_done': 0}, u'error_details': []}, u'comps': {u'state': u'FINISHED'}, u'distribution': {u'items_total': 0, u'state': u'FINISHED', u'error_details': [], u'items_left': 0}, u'errata': {u'state': u'FINISHED'}, u'metadata': {u'state': u'FINISHED'}}}, u'_id': {u'$oid': u'537bb314a9356d49c5! 57116f'}} The problematic piece is response_body['spawned_tasks']. After the response return, the binding code will try to wrap the response into a Task obj before returning. When it gets to https://github.com/pulp/pulp/blob/master/bindings/pulp/bindings/responses.py:112, it will try to instantiate another Task obj with a string obj. It seems like the client code is looking for a list of dictionaries inside response_body['spawned_tasks'], but instead only the task_id came back. Did something change on the server or client side that caused the mismatch? Please advise. _______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list _______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
