)]}'
{"glance/async/flows/base_import.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a5cbb6e42a074db4602897e29652ce1634093106","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        return path"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def revert(self, image_id, result\u003dNone, **kwargs):"},{"line_number":153,"context_line":"        if not result or isinstance(result, failure.Failure):"},{"line_number":154,"context_line":"            LOG.exception(_LE(\"Task: %(task_id)s failed to import image \""},{"line_number":155,"context_line":"                              \"%(image_id)s to the filesystem.\") %"},{"line_number":156,"context_line":"                          {\u0027task_id\u0027: self.task_id, \u0027image_id\u0027: image_id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_5d507fd4","line":153,"updated":"2015-05-27 12:17:07.000000000","message":"thanks, I had this in my backlog. I actually think result is None when the task didn\u0027t return anything. Could you double check that?","commit_id":"8bbf4711468274f2ba362a9a2a55b978ff4e6060"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"1e8591bb724e2bf7ade7e398bf3bcc25b20146e5","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        return path"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def revert(self, image_id, result\u003dNone, **kwargs):"},{"line_number":153,"context_line":"        if not result or isinstance(result, failure.Failure):"},{"line_number":154,"context_line":"            LOG.exception(_LE(\"Task: %(task_id)s failed to import image \""},{"line_number":155,"context_line":"                              \"%(image_id)s to the filesystem.\") %"},{"line_number":156,"context_line":"                          {\u0027task_id\u0027: self.task_id, \u0027image_id\u0027: image_id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_a8ba5c08","line":153,"in_reply_to":"5afe65bd_57fba0c1","updated":"2015-06-04 00:39:57.000000000","message":"Done","commit_id":"8bbf4711468274f2ba362a9a2a55b978ff4e6060"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"6f149a52618a474ff0901dec46a409a4233b7813","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        return path"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def revert(self, image_id, result\u003dNone, **kwargs):"},{"line_number":153,"context_line":"        if not result or isinstance(result, failure.Failure):"},{"line_number":154,"context_line":"            LOG.exception(_LE(\"Task: %(task_id)s failed to import image \""},{"line_number":155,"context_line":"                              \"%(image_id)s to the filesystem.\") %"},{"line_number":156,"context_line":"                          {\u0027task_id\u0027: self.task_id, \u0027image_id\u0027: image_id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_6d77f03b","line":153,"in_reply_to":"7a016987_5d507fd4","updated":"2015-05-27 23:30:16.000000000","message":"Hey Flavio, result would contain the value returned by execute method if this task is success but the flow has failed. If this task has failed, then it will be an instance of Failure. [1] \n\nSo in our case a valid path or a Failure instance should be expected. Looks like I can even remove the none/empty value check on result.\n\n[1] http://docs.openstack.org/developer/taskflow/arguments_and_results.html#revert-arguments","commit_id":"8bbf4711468274f2ba362a9a2a55b978ff4e6060"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"87d6f78423f110b078659816d6aa6de0256acc9b","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        return path"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def revert(self, image_id, result\u003dNone, **kwargs):"},{"line_number":153,"context_line":"        if not result or isinstance(result, failure.Failure):"},{"line_number":154,"context_line":"            LOG.exception(_LE(\"Task: %(task_id)s failed to import image \""},{"line_number":155,"context_line":"                              \"%(image_id)s to the filesystem.\") %"},{"line_number":156,"context_line":"                          {\u0027task_id\u0027: self.task_id, \u0027image_id\u0027: image_id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_57fba0c1","line":153,"in_reply_to":"7a016987_6d77f03b","updated":"2015-06-03 14:45:59.000000000","message":"right, you can even make it an argument instead of a keyword, I guess.","commit_id":"8bbf4711468274f2ba362a9a2a55b978ff4e6060"}],"glance/async/taskflow_executor.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0e370c76e7bae3538059a9ff93fb8e434305d25","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":130,"context_line":"                LOG.error(_LE(\u0027Failed to execute task %(task_id)s: %(exc)s\u0027) %"},{"line_number":131,"context_line":"                          {\u0027task_id\u0027: task_id, \u0027exc\u0027: exc.message})"},{"line_number":132,"context_line":"                task.fail(exc.message)"},{"line_number":133,"context_line":"                self.task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_e88b7dc1","line":132,"updated":"2015-05-20 21:10:19.000000000","message":"I wonder if passing in the exception message into the task.msg would be a good idea or not. You may or may not have sensitive info stored in the same.","commit_id":"d020056552de787534e64a62181fb066baa85961"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"e0dcc5180a0d4ba4c1da430d5b8e1dfe52cf50e3","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":130,"context_line":"                LOG.error(_LE(\u0027Failed to execute task %(task_id)s: %(exc)s\u0027) %"},{"line_number":131,"context_line":"                          {\u0027task_id\u0027: task_id, \u0027exc\u0027: exc.message})"},{"line_number":132,"context_line":"                task.fail(exc.message)"},{"line_number":133,"context_line":"                self.task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_e0cd575e","line":132,"in_reply_to":"7a016987_e88b7dc1","updated":"2015-05-27 00:06:26.000000000","message":"Thanks Nikhil. I will probably mark the task as failed due to internal error (mimicking 500 that would have been thrown otherwise).","commit_id":"d020056552de787534e64a62181fb066baa85961"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a5cbb6e42a074db4602897e29652ce1634093106","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                # TODO(sabari): Check for specific exceptions and update the"},{"line_number":133,"context_line":"                # task failure message."},{"line_number":134,"context_line":"                task.fail(_(\u0027Task failed due to Internal Error\u0027))"},{"line_number":135,"context_line":"                self.task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_1dd68727","line":135,"updated":"2015-05-27 12:17:07.000000000","message":"mmh, good catch. TBH, I thought this was done by taskflow itself.","commit_id":"8bbf4711468274f2ba362a9a2a55b978ff4e6060"}]}
