)]}'
{"doc/notification_samples/compute-exception.json":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f771b3c8f1f46e525833a6a9226a1f2e9406ca4d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"},{"line_number":5,"context_line":"            \"exception\": \"AggregateNameExists\","},{"line_number":6,"context_line":"            \"exception_message\": \"\","},{"line_number":7,"context_line":"            \"function_name\": \"aggregate_create\","},{"line_number":8,"context_line":"            \"module_name\": \"nova.db.sqlalchemy.api\""},{"line_number":9,"context_line":"        },"}],"source_content_type":"application/json","patch_set":2,"id":"1aa78d24_e73586db","line":6,"updated":"2016-07-11 07:40:39.000000000","message":"Can we do this change in a way that the sample still contains a message?","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6073b3b82420bca4988c100b11d272cd81fda50f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"},{"line_number":5,"context_line":"            \"exception\": \"AggregateNameExists\","},{"line_number":6,"context_line":"            \"exception_message\": \"\","},{"line_number":7,"context_line":"            \"function_name\": \"aggregate_create\","},{"line_number":8,"context_line":"            \"module_name\": \"nova.db.sqlalchemy.api\""},{"line_number":9,"context_line":"        },"}],"source_content_type":"application/json","patch_set":2,"id":"1aa78d24_bb84f80a","line":6,"in_reply_to":"1aa78d24_16026709","updated":"2016-07-12 08:05:42.000000000","message":"Maybe just mark this exception as safe? It looks safe?\n\nHonestly, it would be nice to have a safe one and an unsafe one.","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"55cdcfb45dc5c73f42a01fd85b5977dc984d1efa","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"},{"line_number":5,"context_line":"            \"exception\": \"AggregateNameExists\","},{"line_number":6,"context_line":"            \"exception_message\": \"\","},{"line_number":7,"context_line":"            \"function_name\": \"aggregate_create\","},{"line_number":8,"context_line":"            \"module_name\": \"nova.db.sqlalchemy.api\""},{"line_number":9,"context_line":"        },"}],"source_content_type":"application/json","patch_set":2,"id":"1aa78d24_16026709","line":6,"in_reply_to":"1aa78d24_a846991e","updated":"2016-07-11 15:43:56.000000000","message":"It would be nice to have a sample that contains exception_message also","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"329cdee3d510f0632af79a9b2bc6552337823654","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"},{"line_number":5,"context_line":"            \"exception\": \"AggregateNameExists\","},{"line_number":6,"context_line":"            \"exception_message\": \"\","},{"line_number":7,"context_line":"            \"function_name\": \"aggregate_create\","},{"line_number":8,"context_line":"            \"module_name\": \"nova.db.sqlalchemy.api\""},{"line_number":9,"context_line":"        },"}],"source_content_type":"application/json","patch_set":2,"id":"1aa78d24_d18a7663","line":6,"in_reply_to":"1aa78d24_bb84f80a","updated":"2016-07-12 13:13:41.000000000","message":"sure thing","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"493c434a86dd825471d6d3320e0fa2a2defaca73","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"},{"line_number":5,"context_line":"            \"exception\": \"AggregateNameExists\","},{"line_number":6,"context_line":"            \"exception_message\": \"\","},{"line_number":7,"context_line":"            \"function_name\": \"aggregate_create\","},{"line_number":8,"context_line":"            \"module_name\": \"nova.db.sqlalchemy.api\""},{"line_number":9,"context_line":"        },"}],"source_content_type":"application/json","patch_set":2,"id":"1aa78d24_a846991e","line":6,"in_reply_to":"1aa78d24_e73586db","updated":"2016-07-11 14:14:15.000000000","message":"I can find a different exception that is safe and use that as the sample instead. What do you think?","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"}],"nova/exception.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a93e3f5cb04bfb68a318b263edc6f5e06040b6f8","unresolved":false,"context_lines":[{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"class AggregateNameExists(NovaException):"},{"line_number":1423,"context_line":"    msg_fmt \u003d _(\"Aggregate %(aggregate_name)s already exists.\")"},{"line_number":1424,"context_line":"    safe \u003d True"},{"line_number":1425,"context_line":""},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"class AggregateHostNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_c7cbaf70","line":1424,"updated":"2016-07-13 07:06:51.000000000","message":"This is correct, but I started feeling that the safe flag is not really used consistently in the existing exceptions. For example for me all the Aggregate exceptions looks safe but they are not flagged. \nJohn, what do you think shall we now go through the whole file and flag the safe exceptions? Maybe in a separate patch?","commit_id":"aef7f73c50fbcf724a49c95708b7e0df892c8953"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"a49c7c74cf8603dfd1b1eff59212af1f48b4299e","unresolved":false,"context_lines":[{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"class AggregateNameExists(NovaException):"},{"line_number":1423,"context_line":"    msg_fmt \u003d _(\"Aggregate %(aggregate_name)s already exists.\")"},{"line_number":1424,"context_line":"    safe \u003d True"},{"line_number":1425,"context_line":""},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"class AggregateHostNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_186c35cf","line":1424,"in_reply_to":"1aa78d24_c7cbaf70","updated":"2016-07-20 15:27:39.000000000","message":"would creating safe subclasses of NovaExceptions be good or would that break stuff?","commit_id":"aef7f73c50fbcf724a49c95708b7e0df892c8953"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"73a2e3cb1da3634e7cddab9d56bf6c1a22ca953e","unresolved":false,"context_lines":[{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"class AggregateNameExists(NovaException):"},{"line_number":1423,"context_line":"    msg_fmt \u003d _(\"Aggregate %(aggregate_name)s already exists.\")"},{"line_number":1424,"context_line":"    safe \u003d True"},{"line_number":1425,"context_line":""},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"class AggregateHostNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dada55a8_32930d5d","line":1424,"in_reply_to":"dada55a8_186c35cf","updated":"2016-07-26 17:11:56.000000000","message":"It sounds OK to me, hope John can comment.","commit_id":"aef7f73c50fbcf724a49c95708b7e0df892c8953"}],"nova/notifications/objects/exception.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"712dc4fbca3dc634429c55b7e435edea1e9c0af7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d strutils.mask_password(fault) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_4bcc1c6a","line":38,"range":{"start_line":38,"start_character":37,"end_line":38,"end_character":42},"updated":"2016-07-06 15:03:51.000000000","message":"Don\u0027t you need: strutils.mask_password(six.text_type(fault)) here?","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"712dc4fbca3dc634429c55b7e435edea1e9c0af7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d strutils.mask_password(fault) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_8baba474","line":38,"range":{"start_line":38,"start_character":57,"end_line":38,"end_character":59},"updated":"2016-07-06 15:03:51.000000000","message":"What do we do in the API here? Could we not return the classname or something?","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"ee852bbe6a4a1962ceb60c3d45dbe40a1ed3644c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d strutils.mask_password(fault) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_75afbc94","line":38,"range":{"start_line":38,"start_character":37,"end_line":38,"end_character":42},"in_reply_to":"1aa78d24_4bcc1c6a","updated":"2016-07-08 21:56:50.000000000","message":"agreed. will change","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"ee852bbe6a4a1962ceb60c3d45dbe40a1ed3644c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d strutils.mask_password(fault) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_75e17cfe","line":38,"range":{"start_line":38,"start_character":57,"end_line":38,"end_character":59},"in_reply_to":"1aa78d24_8baba474","updated":"2016-07-08 21:56:50.000000000","message":"I\u0027m doing a similar filtering of the exception message if the safe flag is not true\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/__init__.py#L59\n\nAlso, the class name is passed in the exception argument on line 42.","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"712dc4fbca3dc634429c55b7e435edea1e9c0af7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":42,"context_line":"                exception\u003dfault.__class__.__name__,"},{"line_number":43,"context_line":"                exception_message\u003dsix.text_type(msg))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.notification_sample(\u0027compute-exception.json\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_6bbf58aa","line":43,"range":{"start_line":43,"start_character":34,"end_line":43,"end_character":52},"updated":"2016-07-06 15:03:51.000000000","message":"why do we need that now?","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"ee852bbe6a4a1962ceb60c3d45dbe40a1ed3644c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":42,"context_line":"                exception\u003dfault.__class__.__name__,"},{"line_number":43,"context_line":"                exception_message\u003dsix.text_type(msg))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.notification_sample(\u0027compute-exception.json\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_951fc85a","line":43,"range":{"start_line":43,"start_character":34,"end_line":43,"end_character":52},"in_reply_to":"1aa78d24_6bbf58aa","updated":"2016-07-08 21:56:50.000000000","message":"will move","commit_id":"971e10f52765441e1f01e37b1bc368956907c4c6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6073b3b82420bca4988c100b11d272cd81fda50f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d six.text_type(strutils.mask_password(fault)) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_dbe464e1","line":38,"updated":"2016-07-12 08:05:42.000000000","message":"Thinking about this more, its very common for notification systems to be trusted with \"unsafe\" exceptions. I don\u0027t want to say add a configuration variable, but I am wondering what else we can do here.","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"329cdee3d510f0632af79a9b2bc6552337823654","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def from_exception(cls, fault):"},{"line_number":36,"context_line":"        trace \u003d inspect.trace()[-1]"},{"line_number":37,"context_line":"        safe \u003d getattr(fault, \u0027safe\u0027, False)"},{"line_number":38,"context_line":"        msg \u003d six.text_type(strutils.mask_password(fault)) if safe else \u0027\u0027"},{"line_number":39,"context_line":"        return cls("},{"line_number":40,"context_line":"                function_name\u003dtrace[3],"},{"line_number":41,"context_line":"                module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_f10052ad","line":38,"in_reply_to":"1aa78d24_dbe464e1","updated":"2016-07-12 13:13:41.000000000","message":"I think a configuration variable could do it. What would be its downside? I\u0027m open to any suggestions","commit_id":"a3a3987062740f222f47df225569fbbd2cc2a58a"}]}
