)]}'
{"ironic/api/app.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9839c71459c80d9ba1e23588ef9123ab737ce313","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_traceback_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"},{"line_number":40,"context_line":"                       \u0027and should not be used in a production environment.\u0027)),"},{"line_number":41,"context_line":"    cfg.BoolOpt(\u0027pecan_debug\u0027,"},{"line_number":42,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_e931405b","line":39,"updated":"2015-12-11 18:13:29.000000000","message":"nit-ish: except server errors\n\n if (cfg.CONF.debug_tracebacks_in_api and json_body.get(\u0027faultcode\u0027) !\u003d \u0027Server\u0027):\n\treturn","commit_id":"44d8ceb27a28ba6ce70b58968fa5f3af79aabdd7"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"33ecdc520b083d6fe3ae6016b84cdd37ebb25b0c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        help\u003d_(\u0027Authentication strategy used by ironic-api: one of \"keystone\" \u0027"},{"line_number":34,"context_line":"               \u0027or \"noauth\". \"noauth\" should not be used in a production \u0027"},{"line_number":35,"context_line":"               \u0027environment because all authentication will be disabled.\u0027)),"},{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_tracebacks_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a7e1126_aa9bf864","line":36,"range":{"start_line":36,"start_character":40,"end_line":36,"end_character":42},"updated":"2015-12-21 13:31:46.000000000","message":"This is very similar like pecan_debug option below, to not give the full traceback and both should not used in a production environment. What about use the same option?","commit_id":"f8003eb2a19981c548d3c37e0bfeca5f561fec82"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"151a5d8b2e394456deeddfd740f6a7cd859cb86c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        help\u003d_(\u0027Authentication strategy used by ironic-api: one of \"keystone\" \u0027"},{"line_number":34,"context_line":"               \u0027or \"noauth\". \"noauth\" should not be used in a production \u0027"},{"line_number":35,"context_line":"               \u0027environment because all authentication will be disabled.\u0027)),"},{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_tracebacks_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a7e1126_6da7600b","line":36,"range":{"start_line":36,"start_character":40,"end_line":36,"end_character":42},"in_reply_to":"3a7e1126_aa9bf864","updated":"2015-12-21 16:57:38.000000000","message":"They\u0027re very different configs - pecan debug mode can give the client a python shell on the API host, which is a very different security profile from spitting out tracebacks. Someone may with to have tracebacks, but not pecan debug mode. :)","commit_id":"f8003eb2a19981c548d3c37e0bfeca5f561fec82"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e3b91989dfbf88e91c81d851fcc391270a8aef33","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        help\u003d_(\u0027Authentication strategy used by ironic-api: one of \"keystone\" \u0027"},{"line_number":34,"context_line":"               \u0027or \"noauth\". \"noauth\" should not be used in a production \u0027"},{"line_number":35,"context_line":"               \u0027environment because all authentication will be disabled.\u0027)),"},{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_tracebacks_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_4177c49f","line":36,"updated":"2015-12-21 22:08:31.000000000","message":"this has nothing to do with whether you set your log level to debug right? You\u0027re calling it \u0027debug_\u0027... because you want to emphasize to folks that it should only be used for debug purposes?","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ebaede9814250602add1e157c26f36d53fa24fd4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        help\u003d_(\u0027Authentication strategy used by ironic-api: one of \"keystone\" \u0027"},{"line_number":34,"context_line":"               \u0027or \"noauth\". \"noauth\" should not be used in a production \u0027"},{"line_number":35,"context_line":"               \u0027environment because all authentication will be disabled.\u0027)),"},{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_tracebacks_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_24d0071f","line":36,"in_reply_to":"1a7b0d38_9daf21e3","updated":"2016-01-04 14:56:36.000000000","message":"Correct Ruby","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"0bec591beea26d7e3edd95b29a3f095986b75e39","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        help\u003d_(\u0027Authentication strategy used by ironic-api: one of \"keystone\" \u0027"},{"line_number":34,"context_line":"               \u0027or \"noauth\". \"noauth\" should not be used in a production \u0027"},{"line_number":35,"context_line":"               \u0027environment because all authentication will be disabled.\u0027)),"},{"line_number":36,"context_line":"    cfg.BoolOpt(\u0027debug_tracebacks_in_api\u0027,"},{"line_number":37,"context_line":"                default\u003dFalse,"},{"line_number":38,"context_line":"                help\u003d_(\u0027Return server tracebacks in the API response for any \u0027"},{"line_number":39,"context_line":"                       \u0027error responses. WARNING: this is insecure \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_9daf21e3","line":36,"in_reply_to":"3a7e1126_4177c49f","updated":"2015-12-22 20:40:46.000000000","message":"That appears to be what the code does in api/hooks.py. I think the documentation is consistent with this understanding as well. Keeping \"debug_\" in there seems to just emphasize that this setting isn\u0027t suitable for production.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"0723ec368eb6c337c04b369d4bf78fc78e3f78ee","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    app \u003d pecan.make_app("},{"line_number":76,"context_line":"        pecan_config.app.root,"},{"line_number":77,"context_line":"        static_root\u003dpecan_config.app.static_root,"},{"line_number":78,"context_line":"        debug\u003dCONF.pecan_debug,"},{"line_number":79,"context_line":"        force_canonical\u003dgetattr(pecan_config.app, \u0027force_canonical\u0027, True),"},{"line_number":80,"context_line":"        hooks\u003dapp_hooks,"},{"line_number":81,"context_line":"        wrap_app\u003dmiddleware.ParsableErrorMiddleware,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_3302030b","line":78,"range":{"start_line":78,"start_character":30,"end_line":78,"end_character":31},"updated":"2015-12-22 03:50:21.000000000","message":"Most pecan options are from api.config.py but only debug option is from CONF. So pecan_config.app.debug seems useless?","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ebaede9814250602add1e157c26f36d53fa24fd4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    app \u003d pecan.make_app("},{"line_number":76,"context_line":"        pecan_config.app.root,"},{"line_number":77,"context_line":"        static_root\u003dpecan_config.app.static_root,"},{"line_number":78,"context_line":"        debug\u003dCONF.pecan_debug,"},{"line_number":79,"context_line":"        force_canonical\u003dgetattr(pecan_config.app, \u0027force_canonical\u0027, True),"},{"line_number":80,"context_line":"        hooks\u003dapp_hooks,"},{"line_number":81,"context_line":"        wrap_app\u003dmiddleware.ParsableErrorMiddleware,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_0473834e","line":78,"range":{"start_line":78,"start_character":30,"end_line":78,"end_character":31},"in_reply_to":"3a7e1126_3302030b","updated":"2016-01-04 14:56:36.000000000","message":"Maybe, but totally unrelated here","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"}],"ironic/tests/unit/api/test_hooks.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"88455fdd8740073682ca03549ef1d04911e226e5","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        actual_msg \u003d json.loads("},{"line_number":174,"context_line":"            response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":175,"context_line":"        self.assertEqual(self.MSG_WITHOUT_TRACE, actual_msg)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def test_hook_server_debug_on_clientfault(self):"},{"line_number":178,"context_line":"        cfg.CONF.set_override(\u0027debug_tracebacks_in_api\u0027, True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_c6ae8d2d","line":175,"updated":"2015-12-13 13:58:11.000000000","message":"why WITHOUT_TRACE? you\u0027re setting debug_tracebacks to True on line 168","commit_id":"58e7ff9388d227033a9c4d1345da660bf24e4433"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"7b292bb0a72bf2da60bbf835ff35a5255c286d2b","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        actual_msg \u003d json.loads("},{"line_number":174,"context_line":"            response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":175,"context_line":"        self.assertEqual(self.MSG_WITHOUT_TRACE, actual_msg)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def test_hook_server_debug_on_clientfault(self):"},{"line_number":178,"context_line":"        cfg.CONF.set_override(\u0027debug_tracebacks_in_api\u0027, True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_838e1077","line":175,"in_reply_to":"7a740942_c6ae8d2d","updated":"2015-12-14 15:05:45.000000000","message":"Right, I missed this; old behavior for 500s was to not return traceback","commit_id":"58e7ff9388d227033a9c4d1345da660bf24e4433"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e3b91989dfbf88e91c81d851fcc391270a8aef33","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":146,"context_line":"        self.assertEqual(expected_msg, actual_msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_hook_without_traceback(self):"},{"line_number":149,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":150,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_613d208e","line":148,"updated":"2015-12-21 22:08:31.000000000","message":"This test and the one following it (test_hook_without_traceback_in_debug()) confuse me. With your change, I would think that we want a test for:\n- cfg.CONF.set_override(\u0027debug_tracebacks_in_api\u0027, False)\n- self.root_convert_mock.side_effect\u003dException(self.MSG_WITH_TRACE)\n- assert that the actual response msg is self.MSG_WITHOUT_TRACE.\n\nAm I missing something?","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0c4a43c62b1fb814b06f05528b54b84afa21efd","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":146,"context_line":"        self.assertEqual(expected_msg, actual_msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_hook_without_traceback(self):"},{"line_number":149,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":150,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_80001aac","line":148,"in_reply_to":"1a7b0d38_5ddbf91b","updated":"2015-12-22 21:09:03.000000000","message":"Sigh. there\u0027s a difference between testing \n\n1. a message with a traceback -- based on the config, whether the response includes the traceback or not\n\n2. a message that doesn\u0027t include any traceback at all. I guess (not sure) we want to test whether the config setting affects whether the response does what? strips out any strings following a newline?\n\nSo yeah, the naming of the tests is confusing for me, as well as the ordering of the tests.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ebaede9814250602add1e157c26f36d53fa24fd4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":146,"context_line":"        self.assertEqual(expected_msg, actual_msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_hook_without_traceback(self):"},{"line_number":149,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":150,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_c416cba6","line":148,"in_reply_to":"1a7b0d38_80001aac","updated":"2016-01-04 14:56:36.000000000","message":"You\u0027re probably right, I\u0027ll see what I can do to make this less confusing","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4a4eaa325a5db1d95437c7e5d4f94103c818832c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":146,"context_line":"        self.assertEqual(expected_msg, actual_msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_hook_without_traceback(self):"},{"line_number":149,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":150,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_5ddbf91b","line":148,"in_reply_to":"1a7b0d38_fd2ae52b","updated":"2015-12-22 20:44:38.000000000","message":"Sorry, I just re-read this and noticed self.MSG_WITH_TRACE in step 2. The test you\u0027re describing is already above in test_hook_exception_success (line 122).","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"0bec591beea26d7e3edd95b29a3f095986b75e39","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":146,"context_line":"        self.assertEqual(expected_msg, actual_msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_hook_without_traceback(self):"},{"line_number":149,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":150,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_fd2ae52b","line":148,"in_reply_to":"3a7e1126_613d208e","updated":"2015-12-22 20:40:46.000000000","message":"msg is the message without the traceback, and debug_tracebacks_in_api defaults to False. So, I think this test is the exact test you\u0027re describing.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e3b91989dfbf88e91c81d851fcc391270a8aef33","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_hook_without_traceback_in_debug(self):"},{"line_number":158,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":159,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, True)"},{"line_number":160,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        response \u003d self.get_json(\u0027/\u0027, path_prefix\u003d\u0027\u0027, expect_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_41158499","line":159,"updated":"2015-12-21 22:08:31.000000000","message":"why \u0027debug\u0027? the msg doesn\u0027t even have a traceback, so I\u0027m not sure why we want to test this.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"0bec591beea26d7e3edd95b29a3f095986b75e39","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_hook_without_traceback_in_debug(self):"},{"line_number":158,"context_line":"        msg \u003d \"Error message without traceback \\n but \\n multiline\""},{"line_number":159,"context_line":"        cfg.CONF.set_override(\u0027debug\u0027, True)"},{"line_number":160,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(msg)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        response \u003d self.get_json(\u0027/\u0027, path_prefix\u003d\u0027\u0027, expect_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_3dd86d53","line":159,"in_reply_to":"3a7e1126_41158499","updated":"2015-12-22 20:40:46.000000000","message":"I think this is a regression test to make sure the old behavior of sending tracebacks with an API call that throws an exception doesn\u0027t happen with the debug setting on.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0c4a43c62b1fb814b06f05528b54b84afa21efd","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        actual_msg \u003d json.loads(response.json[\u0027error_message\u0027])[\u0027faultstring\u0027]"},{"line_number":165,"context_line":"        self.assertEqual(msg, actual_msg)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_hook_server_debug_on_serverfault(self):"},{"line_number":168,"context_line":"        cfg.CONF.set_override(\u0027debug_tracebacks_in_api\u0027, True)"},{"line_number":169,"context_line":"        self.root_convert_mock.side_effect \u003d Exception(self.MSG_WITH_TRACE)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a7b0d38_601ace19","line":167,"updated":"2015-12-22 21:09:03.000000000","message":"eg, this has \u0027debug\u0027 in the name, but it refers to \u0027debug_tracebacks_in_api\u0027 config, whereas the test above it has \u0027debug\u0027 in the name too, but it is referring to \u0027debug\u0027 config I guess.","commit_id":"951c0d51d54c3d98b0c0224b4490ea5ca7266ce9"}]}
