)]}'
{"mistral/rpc/base.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6364d2fe7c3d78c621c1c1386d1286472b159df5","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    return decorator"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def wrap_timeout_message_exception(method):"},{"line_number":123,"context_line":"    \"\"\"The decorator changes the rpc timeout message to a mistral exception"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    When calling rpc methods which take longer then the max reply timeout of"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6462bf40","line":122,"range":{"start_line":122,"start_character":4,"end_line":122,"end_character":34},"updated":"2019-08-01 07:51:11.000000000","message":"Do we need a separate decorator? Maybe we can just add another \"except\" into \"wrap_messaging_exception\"?","commit_id":"4c3742b0425ab96515601ae4bd8279d4d7d1e05f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6364d2fe7c3d78c621c1c1386d1286472b159df5","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def wrap_timeout_message_exception(method):"},{"line_number":123,"context_line":"    \"\"\"The decorator changes the rpc timeout message to a mistral exception"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    When calling rpc methods which take longer then the max reply timeout of"},{"line_number":126,"context_line":"    oslo messaging the exception is unclear. Change it to be clearer."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c41a93c4","line":123,"updated":"2019-08-01 07:51:11.000000000","message":"Please add a period at the end of the sentence. We usually make comments fully compliant with English grammar.","commit_id":"4c3742b0425ab96515601ae4bd8279d4d7d1e05f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6364d2fe7c3d78c621c1c1386d1286472b159df5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    When calling rpc methods which take longer then the max reply timeout of"},{"line_number":126,"context_line":"    oslo messaging the exception is unclear. Change it to be clearer."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    :param method:"},{"line_number":129,"context_line":"    :return:"},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    @wraps(method)"},{"line_number":132,"context_line":"    def decorator(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_a41d17bf","line":129,"range":{"start_line":128,"start_character":4,"end_line":129,"end_character":12},"updated":"2019-08-01 07:51:11.000000000","message":"Missing descriptions.","commit_id":"4c3742b0425ab96515601ae4bd8279d4d7d1e05f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6364d2fe7c3d78c621c1c1386d1286472b159df5","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            return method(*args, **kwargs)"},{"line_number":135,"context_line":"        except MessagingTimeout:"},{"line_number":136,"context_line":"            raise exc.MistralException(\u0027This sync call took longer then \u0027"},{"line_number":137,"context_line":"                                       \u0027configured\u0027)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    return decorator"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_247fe7df","line":137,"updated":"2019-08-01 07:51:11.000000000","message":"1) Missing period.\n2) I would also add the name of the method and the configured value.","commit_id":"4c3742b0425ab96515601ae4bd8279d4d7d1e05f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6be511364277a45402fcceedfef19402e41933e6","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            raise"},{"line_number":106,"context_line":"        except MessagingTimeout:"},{"line_number":107,"context_line":"            timeout \u003d cfg.CONF.rpc_response_timeout"},{"line_number":108,"context_line":"            raise exc.MistralException(\u0027This rpc call \"%s\" took longer then \u0027"},{"line_number":109,"context_line":"                                       \u0027configured %s.\u0027 % (method.__name__,"},{"line_number":110,"context_line":"                                                           timeout))"},{"line_number":111,"context_line":"        except (client.RemoteError, exc.KombuException, Exception) as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_d3a22dfc","line":108,"range":{"start_line":108,"start_character":71,"end_line":108,"end_character":75},"updated":"2019-08-05 10:26:28.000000000","message":"-\u003e than","commit_id":"f1803fa39cb6bc7eb972a105bd94b4e7cdef4d28"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6be511364277a45402fcceedfef19402e41933e6","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        except MessagingTimeout:"},{"line_number":107,"context_line":"            timeout \u003d cfg.CONF.rpc_response_timeout"},{"line_number":108,"context_line":"            raise exc.MistralException(\u0027This rpc call \"%s\" took longer then \u0027"},{"line_number":109,"context_line":"                                       \u0027configured %s.\u0027 % (method.__name__,"},{"line_number":110,"context_line":"                                                           timeout))"},{"line_number":111,"context_line":"        except (client.RemoteError, exc.KombuException, Exception) as e:"},{"line_number":112,"context_line":"            # Since we\u0027re going to transform the original exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_53b63d40","line":109,"range":{"start_line":109,"start_character":51,"end_line":109,"end_character":54},"updated":"2019-08-05 10:26:28.000000000","message":"I would also add \"seconds\" so it\u0027s clear what units are meant.","commit_id":"f1803fa39cb6bc7eb972a105bd94b4e7cdef4d28"}],"mistral/tests/unit/api/v2/test_action_executions.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7a5a51db8ac9f25d520990f956539668796e270c","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        self.assertTrue(\u0027project_id\u0027 in resp.json)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_post_timeout(self):"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        self.override_config(\u0027rpc_response_timeout\u0027, 100)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        mocked \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_19e7a214","line":265,"updated":"2019-08-02 08:56:32.000000000","message":"Soft: unnecessary blank line.","commit_id":"51b8b07ab1cbca3d631da8d7ba16e03a495dc8ae"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"d4f368fd0716f8139c60cbd47f99caa3ca3d75ec","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        self.assertTrue(\u0027project_id\u0027 in resp.json)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_post_timeout(self):"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        self.override_config(\u0027rpc_response_timeout\u0027, 100)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        mocked \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_cce7f5e2","line":265,"in_reply_to":"7faddb67_19e7a214","updated":"2019-08-04 11:24:07.000000000","message":"Done","commit_id":"51b8b07ab1cbca3d631da8d7ba16e03a495dc8ae"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7a5a51db8ac9f25d520990f956539668796e270c","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        self.override_config(\u0027rpc_response_timeout\u0027, 100)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        mocked \u003d mock.Mock()"},{"line_number":269,"context_line":"        mocked.sync_call.side_effect \u003d MessagingTimeout()"},{"line_number":270,"context_line":"        rpc_clients.get_engine_client()._client \u003d mocked"},{"line_number":271,"context_line":"        resp \u003d self.app.post_json("},{"line_number":272,"context_line":"            \u0027/v2/action_executions\u0027,"},{"line_number":273,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_79b7b6f6","line":270,"range":{"start_line":268,"start_character":8,"end_line":270,"end_character":56},"updated":"2019-08-02 08:56:32.000000000","message":"I\u0027d suggest we use the standard \"@mock.patch.object\" decorator.  It\u0027s safer because it automatically restores the mocked method after the test.","commit_id":"51b8b07ab1cbca3d631da8d7ba16e03a495dc8ae"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"d4f368fd0716f8139c60cbd47f99caa3ca3d75ec","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        self.override_config(\u0027rpc_response_timeout\u0027, 100)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        mocked \u003d mock.Mock()"},{"line_number":269,"context_line":"        mocked.sync_call.side_effect \u003d MessagingTimeout()"},{"line_number":270,"context_line":"        rpc_clients.get_engine_client()._client \u003d mocked"},{"line_number":271,"context_line":"        resp \u003d self.app.post_json("},{"line_number":272,"context_line":"            \u0027/v2/action_executions\u0027,"},{"line_number":273,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_0ce2edd5","line":270,"range":{"start_line":268,"start_character":8,"end_line":270,"end_character":56},"in_reply_to":"7faddb67_79b7b6f6","updated":"2019-08-04 11:24:07.000000000","message":"I tried with no success , I used this example \nhttps://github.com/openstack/mistral/blob/74b2fffec299c2c96d94248296fd368843a77434/mistral/tests/unit/engine/test_default_engine.py#L668-L698","commit_id":"51b8b07ab1cbca3d631da8d7ba16e03a495dc8ae"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fcf9b38f0755426fbbde40656743257d0e003156","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import mock"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"import oslo_messaging"},{"line_number":23,"context_line":"from oslo_messaging.exceptions import MessagingTimeout"},{"line_number":24,"context_line":"import sqlalchemy as sa"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from mistral.api.controllers.v2 import action_execution"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_4148a6b1","line":23,"range":{"start_line":23,"start_character":38,"end_line":23,"end_character":54},"updated":"2019-08-05 10:15:44.000000000","message":"It\u0027s not allowed to import classes by the OpenStack policies. Only modules.","commit_id":"f1803fa39cb6bc7eb972a105bd94b4e7cdef4d28"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fcf9b38f0755426fbbde40656743257d0e003156","unresolved":false,"context_lines":[{"line_number":211,"context_line":"ACTION_EX_DB_WITH_PROJECT_ID.project_id \u003d \u0027\u003cdefault-project\u003e\u0027"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"@mock.patch.object(rpc_base, \u0027_IMPL_CLIENT\u0027, mock.Mock())"},{"line_number":215,"context_line":"class TestActionExecutionsController(base.APITest):"},{"line_number":216,"context_line":"    def setUp(self):"},{"line_number":217,"context_line":"        super(TestActionExecutionsController, self).setUp()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_a1115a5f","line":214,"range":{"start_line":214,"start_character":0,"end_line":214,"end_character":57},"updated":"2019-08-05 10:15:44.000000000","message":"This is the reason why a method decorator doesn\u0027t work.","commit_id":"f1803fa39cb6bc7eb972a105bd94b4e7cdef4d28"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"6be511364277a45402fcceedfef19402e41933e6","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        error_msg \u003d resp.json[\u0027faultstring\u0027]"},{"line_number":280,"context_line":"        self.assertEqual(error_msg,"},{"line_number":281,"context_line":"                         \u0027This rpc call \"start_action\" took longer then \u0027"},{"line_number":282,"context_line":"                         \u0027configured 100.\u0027)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @mock.patch.object(rpc_clients.EngineClient, \u0027start_action\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_33a061f4","line":281,"range":{"start_line":281,"start_character":67,"end_line":281,"end_character":71},"updated":"2019-08-05 10:26:28.000000000","message":"than","commit_id":"f1803fa39cb6bc7eb972a105bd94b4e7cdef4d28"}]}
