)]}'
{"ironic/api/hooks.py":[{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e4b280559986a9fd2d432c1506e65ddf15a323c8","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BZAA%3D","line":121,"updated":"2013-11-26 16:02:46.000000000","message":"Lucas, I used \u0027after\u0027 hook instead of \u0027on_error\u0027 since \u0027on_error\u0027 never fires for our installation. There is code in @wsme_pecan.wsexpose that catches all the errors, serializes them to string and returns as response. So \"on_error\" which is dedicated for unhandled exceptions never fired","commit_id":"ca28922a24acd4908747ef547e700c9477096ce1"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"e4b280559986a9fd2d432c1506e65ddf15a323c8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        # Omit empty body. Some errors may not have body at this level yet."},{"line_number":129,"context_line":"        if not state.response.body:"},{"line_number":130,"context_line":"            return"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        json_body \u003d state.response.json"},{"line_number":133,"context_line":"        faultsting \u003d json_body.get(\u0027faultstring\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BY%2BA%3D","line":130,"updated":"2013-11-26 16:02:46.000000000","message":"The errors like \"403 Access was denied to this resource.\" do not have body at this stage. They getting body in ironic/api/middleware/parsable_error.py level, whose content is {\u0027error_message\u0027: \u003cstring representation of the error\u003e}\n\nThis is reproducible from UT, for example ironic.tests.api.test_acl.TestACL#test_non_admin.\n\nIs it OK or I missed something? \u003d)","commit_id":"ca28922a24acd4908747ef547e700c9477096ce1"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"3dbd62cdff6a80237853ea0f45d7a7cb2027d845","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BU5Y%3D","line":121,"updated":"2013-11-27 11:09:44.000000000","message":"Lucas, I used \u0027after\u0027 hook instead of \u0027on_error\u0027 since \u0027on_error\u0027 never fires for our installation. There is code in @wsme_pecan.wsexpose that catches all the errors, serializes them to string and returns as response. So \"on_error\" which is dedicated for unhandled exceptions never fired","commit_id":"8b42825baf2c8ce0631ceb043e2697cedec6c786"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"3dbd62cdff6a80237853ea0f45d7a7cb2027d845","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        # Omit empty body. Some errors may not have body at this level yet."},{"line_number":129,"context_line":"        if not state.response.body:"},{"line_number":130,"context_line":"            return"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        json_body \u003d state.response.json"},{"line_number":133,"context_line":"        faultsting \u003d json_body.get(\u0027faultstring\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BU44%3D","line":130,"updated":"2013-11-27 11:09:44.000000000","message":"The errors like \"403 Access was denied to this resource.\" do not have body at this stage. They getting body in ironic/api/middleware/parsable_error.py level, whose content is {\u0027error_message\u0027: \u003cstring representation of the error\u003e}\n\nThis is reproducible from UT, for example ironic.tests.api.test_acl.TestACL#test_non_admin.","commit_id":"8b42825baf2c8ce0631ceb043e2697cedec6c786"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"69259f2d365581a62fc9ce1a3f110be8dbec5777","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BUNU%3D","line":121,"updated":"2013-11-27 13:42:21.000000000","message":"Lucas, I used \u0027after\u0027 hook instead of \u0027on_error\u0027 since \u0027on_error\u0027 never fires for our installation. There is code in @wsme_pecan.wsexpose that catches all the errors, serializes them to string and returns as response. So \"on_error\" which is dedicated for unhandled exceptions never fired","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"703b81cd60d179e3d3f80611ab6b501b130d37a5","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BPak%3D","line":121,"in_reply_to":"AAAATn%2F%2BP7s%3D","updated":"2013-11-28 12:44:04.000000000","message":"Done","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a00f77452c98207fa29a22737f294a07d58d940f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BP7s%3D","line":121,"in_reply_to":"AAAATn%2F%2BQBQ%3D","updated":"2013-11-28 10:43:36.000000000","message":"I see, yea thanks for pointing me to that files and the nice explanation. I think it worth to put some briefly explanation just avoid someone in the future to look at it and say \"well why didn\u0027t they use the on_error() hook here that seems more appropriated\"\n\nThanks!","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"83a12df90b5ef2db0c76a2fea04d59cf5d66ea76","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BQBQ%3D","line":121,"in_reply_to":"AAAATn%2F%2BTCk%3D","updated":"2013-11-28 10:29:44.000000000","message":"Not sure if we\u0027ll be able to fix that.. It seems not working \"on_error\" is kind of trade off of wsme+pecan. There\u0027s just different approaches in pecan and wsme.. \n\nPls take a look, https://github.com/stackforge/wsme/blob/master/wsmeext/pecan.py#L70-L102 wsme has broad except for every exception that potentially could fire during the controller job. And then they\u0027re just serializing the exception and set error return code.\n\nAs for Pecan https://github.com/stackforge/pecan/blob/master/pecan/hooks.py#L91\nI think they wanted the exception to be serialized using their \u0027on_error\u0027 hook, but wsme already done the job, so the hook is never fired.\n\nThoughts? :)\n\nMaybe I should add this explanation above the hook?","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f4fced7eec35dafaf27ef9970a79c362667e45b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def after(self, state):"},{"line_number":122,"context_line":"        # Do not remove traceback when server in debug mode."},{"line_number":123,"context_line":"        if cfg.CONF.debug:"},{"line_number":124,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BTCk%3D","line":121,"in_reply_to":"AAAATn%2F%2BUNU%3D","updated":"2013-11-27 18:25:53.000000000","message":"Maybe it worth filing a bug against wsme and adding a comment on the top of this method with a link to the bug and a briefly explanation?","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"69259f2d365581a62fc9ce1a3f110be8dbec5777","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":"        # Omit empty body. Some errors may not have body at this level yet."},{"line_number":129,"context_line":"        if not state.response.body:"},{"line_number":130,"context_line":"            return"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        json_body \u003d state.response.json"},{"line_number":133,"context_line":"        faultsting \u003d json_body.get(\u0027faultstring\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BUNM%3D","line":130,"updated":"2013-11-27 13:42:21.000000000","message":"The errors like \"403 Access was denied to this resource.\" do not have body at this stage. They getting body in ironic/api/middleware/parsable_error.py level, whose content is {\u0027error_message\u0027: \u003cstring representation of the error\u003e}\n\nThis is reproducible from UT, for example ironic.tests.api.test_acl.TestACL#test_non_admin.","commit_id":"c84f51e5ee2b046d3fd248d99a8efb2f27a7cd67"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"3ae64ce334b5a0892e9dd08fd672c17103d45b06","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    \"\"\"Ensures that no exception traceback is built into the faultstring"},{"line_number":117,"context_line":"    (it\u0027s a workaround for the rpc.common: deserialize_remote_exception"},{"line_number":118,"context_line":"    behavior)"},{"line_number":119,"context_line":"    \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    # NOTE(max_lobur): \u0027after\u0027 hook used instead of \u0027on_error\u0027 because"},{"line_number":122,"context_line":"    # \u0027on_error\u0027 never fired for wsme+pecan pair. wsme @wsexpose decorator"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BOL4%3D","line":119,"updated":"2013-11-28 18:32:07.000000000","message":"PEP257 - first line should be standalone paragraph.\n\n \"\"\"Workaround rpc.common: deserialize_remote_exception.\n\n deserialize_remote_exception does X Y Z and so we need to A B C.\n \"\"\"","commit_id":"f6672ff5228bad23ac64f4d529da6950c3efb005"}],"ironic/tests/api/test_hooks.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"768a1a5821abe6cfff36b8724abfaa522fbe1bfa","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.assertEqual(msg, actual_msg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_hook_server_debug_on(self):"},{"line_number":60,"context_line":"        with mock.patch.object(cfg.CONF, \u0027debug\u0027) as debug_stub:"},{"line_number":61,"context_line":"            debug_stub.return_value \u003d True"},{"line_number":62,"context_line":"            self.root_convert_mock.side_effect \u003d Exception(self.MSG_WITH_TRACE)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BZAI%3D","line":60,"updated":"2013-11-26 15:57:39.000000000","message":"Rather than mocking cfg.CONF, please use cfg.CONF.set_override()","commit_id":"ca28922a24acd4908747ef547e700c9477096ce1"},{"author":{"_account_id":8968,"name":"Max Lobur","email":"max_lobur@outlook.com","username":"max_lobur"},"change_message_id":"efd8f31777f0e41e7022a8ae25aedcc28a1206d8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.assertEqual(msg, actual_msg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_hook_server_debug_on(self):"},{"line_number":60,"context_line":"        with mock.patch.object(cfg.CONF, \u0027debug\u0027) as debug_stub:"},{"line_number":61,"context_line":"            debug_stub.return_value \u003d True"},{"line_number":62,"context_line":"            self.root_convert_mock.side_effect \u003d Exception(self.MSG_WITH_TRACE)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BY8k%3D","line":60,"in_reply_to":"AAAATn%2F%2BZAI%3D","updated":"2013-11-26 16:03:17.000000000","message":"Will do, thanks","commit_id":"ca28922a24acd4908747ef547e700c9477096ce1"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"3ae64ce334b5a0892e9dd08fd672c17103d45b06","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Tests for the Pecan API hooks."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import json"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BOL0%3D","line":17,"updated":"2013-11-28 18:32:07.000000000","message":"pep 257: \"\"\"Tests for the Pecan API hooks.\"\"\"","commit_id":"f6672ff5228bad23ac64f4d529da6950c3efb005"}]}
