)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"7f684efceb5cc6e91a60b8e9fa53c077ed840b91","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-20 17:28:25 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Transfrom wrap_exception notification to versioned format"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A new versioned notification is emitted from the wrap_exception"},{"line_number":10,"context_line":"decorator."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a9d85d2_464f7492","line":7,"updated":"2016-06-20 15:35:04.000000000","message":"s/Transfrom/Transform","commit_id":"8ab85952f3c56a8f9cbe0d1cf5c2fd10d4806f72"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3e8973c934564a37624358baa4c9c341bfbbe8d8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-20 17:28:25 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Transfrom wrap_exception notification to versioned format"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A new versioned notification is emitted from the wrap_exception"},{"line_number":10,"context_line":"decorator."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a9d85d2_5a81084a","line":7,"in_reply_to":"5a9d85d2_464f7492","updated":"2016-06-20 15:38:01.000000000","message":"Done","commit_id":"8ab85952f3c56a8f9cbe0d1cf5c2fd10d4806f72"}],"doc/notification_samples/compute-exception.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5b88b9f5f0a65e2591dbf9bbe3b3d26e2ade13a3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"event_type\": \"compute.exception\","},{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"}],"source_content_type":"application/json","patch_set":19,"id":"7aa08908_b3c1b3e6","line":1,"updated":"2016-06-13 19:55:57.000000000","message":"https://git.openstack.org/cgit/openstack/nova/plain/doc/notification_samples/compute-exception.json ?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4483c3d34bd044256eb8e9749f53723f50515b37","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"event_type\": \"compute.exception\","},{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"}],"source_content_type":"application/json","patch_set":19,"id":"7aa08908_d77da86e","line":1,"in_reply_to":"7aa08908_7480328c","updated":"2016-06-16 13:41:44.000000000","message":"You can view the sample in the review. I will check the api-ref job to see how can we generate links that are valid before the patch is merged.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3a129edd01301ce608f5a478635d5ae74680dbd9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"event_type\": \"compute.exception\","},{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"}],"source_content_type":"application/json","patch_set":19,"id":"7aa08908_dcf55d83","line":1,"in_reply_to":"7aa08908_b3c1b3e6","updated":"2016-06-14 08:07:44.000000000","message":"This works as expected. It generates a link that only valid after the given patch is merged. This was discussed in the original doc generation patch https://review.openstack.org/#/c/265151/1/doc/ext/versioned_notifications.py (see John\u0027s comment)\n\nWe can replace this link with the content of the sample that would make the doc self contained but it would make it a lot bigger. I can do that in a follow up patch on the doc generation code.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7367446852043b88159e39d11ab152efd5e6d1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"event_type\": \"compute.exception\","},{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"nova_object.data\": {"}],"source_content_type":"application/json","patch_set":19,"id":"7aa08908_7480328c","line":1,"in_reply_to":"7aa08908_dcf55d83","updated":"2016-06-16 13:36:41.000000000","message":"Hmm, OK, I guess I was expecting something like the api-ref job that generates the docs and links to the samples so you can actually view them before merging the changes.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c2cec3fd1e1f1039a126b0705c247a525b01ff1b","unresolved":false,"context_lines":[{"line_number":88,"context_line":"get_notifier \u003d functools.partial(rpc.get_notifier, service\u003d\u0027compute\u0027)"},{"line_number":89,"context_line":"wrap_exception \u003d functools.partial(exception_wrapper.wrap_exception,"},{"line_number":90,"context_line":"                                   get_notifier\u003dget_notifier,"},{"line_number":91,"context_line":"                                   binary\u003d\u0027nova-compute\u0027)"},{"line_number":92,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"MAX_USERDATA_SIZE \u003d 65535"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a9d85d2_50172951","line":91,"range":{"start_line":91,"start_character":48,"end_line":91,"end_character":55},"updated":"2016-06-20 16:28:56.000000000","message":"Why wouldn\u0027t this be nova-api? Maybe because rpc.get_notifier is called with service\u003d\u0027compute\u0027 instead of \u0027api\u0027? Seems odd though.","commit_id":"aa274f1799eb6e6d4775698ee925261e1a0bc3a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bc064de20c0cd178527ec65839fedec0bb717236","unresolved":false,"context_lines":[{"line_number":88,"context_line":"get_notifier \u003d functools.partial(rpc.get_notifier, service\u003d\u0027compute\u0027)"},{"line_number":89,"context_line":"wrap_exception \u003d functools.partial(exception_wrapper.wrap_exception,"},{"line_number":90,"context_line":"                                   get_notifier\u003dget_notifier,"},{"line_number":91,"context_line":"                                   binary\u003d\u0027nova-compute\u0027)"},{"line_number":92,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"MAX_USERDATA_SIZE \u003d 65535"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a9d85d2_51b70f86","line":91,"range":{"start_line":91,"start_character":48,"end_line":91,"end_character":55},"in_reply_to":"5a9d85d2_50172951","updated":"2016-06-21 07:40:57.000000000","message":"Yes, in the legacy L88, the service is defined as \u0027compute\u0027 not \u0027api\u0027, that was the main source of information when I put nova-compute in L91. However you are right nova.compute.api is the client side of the compute service still running in the caller service, that is \u0027nova-api\u0027. I don\u0027t want to change the legacy behavior as that could break the notification consumer. But the new versioned notifications cannot break anybody as it hasn\u0027t been used yet, so we can fix that here.","commit_id":"aa274f1799eb6e6d4775698ee925261e1a0bc3a2"}],"nova/compute/utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"51ea72aac24e4aef70f349ec96e1f69d04401207","unresolved":false,"context_lines":[{"line_number":264,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":265,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":268,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":269,"context_line":"            exception_message\u003dstr(fault))"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7aa08908_e3c12930","line":267,"range":{"start_line":267,"start_character":24,"end_line":267,"end_character":60},"updated":"2016-06-06 12:18:10.000000000","message":"I do wonder if we should actually hard code these, so they are long lived? But I guess its not really practical. We just need to be clear about that in the docs, I guess.","commit_id":"6ff0a7e369cfd365488260423914e7787c90eed2"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"9d2154a3d89dab3951fbb417ee5ebe40d8a32b3e","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"def get_versioned_exception(fault):"},{"line_number":264,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":265,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_a09b7e71","line":264,"updated":"2016-06-06 20:30:46.000000000","message":"There\u0027s 101 ways to get a traceback in Python. Is this the \"nova\" way of doing it?","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"de9e6e74dd0aff2694ae15fa904a5b521bdd0410","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"def get_versioned_exception(fault):"},{"line_number":264,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":265,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_62020971","line":264,"in_reply_to":"7aa08908_99d1835a","updated":"2016-06-07 13:36:53.000000000","message":"yeah it\u0027s a good point that you\u0027re already using inspect in other parts in here, so you might as well use it here. I\u0027m by no means opposed to it because it looks like its use is pretty simple. I was just wondering if nova had a standard way that we should be using (though with a quick code search it appears there isn\u0027t).","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20a749f72a170471b6fa5ffe2c2905dd9ea6de35","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"def get_versioned_exception(fault):"},{"line_number":264,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":265,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_99d1835a","line":264,"in_reply_to":"7aa08908_a09b7e71","updated":"2016-06-07 09:31:29.000000000","message":"I don\u0027t know if there is a nova standard way to do it. We need function name and module name of the place where the exception was raised. We was able to get the module name only via the inspect module so we started using that for the whole thing here. I\u0027m open to suggestions.","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f7252752f1dda83790913a68cb7fafd6faf0ca6","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":268,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":269,"context_line":"            exception_message\u003dstr(fault))"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_a9825192","line":269,"range":{"start_line":269,"start_character":30,"end_line":269,"end_character":40},"updated":"2016-06-06 16:42:08.000000000","message":"Use six.text_type here? What if fault contains unicode?","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20a749f72a170471b6fa5ffe2c2905dd9ea6de35","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            function_name\u003dtrace[3],"},{"line_number":267,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":268,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":269,"context_line":"            exception_message\u003dstr(fault))"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_194d933e","line":269,"range":{"start_line":269,"start_character":30,"end_line":269,"end_character":40},"in_reply_to":"7aa08908_a9825192","updated":"2016-06-07 09:31:29.000000000","message":"Done","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            system_metadata\u003dsystem_metadata, extra_usage_info\u003dextra_info)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"def get_versioned_exception(fault):"},{"line_number":288,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":289,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":290,"context_line":"            function_name\u003dtrace[3],"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_df3acbe6","line":287,"updated":"2016-06-16 20:34:33.000000000","message":"Is nova/compute/utils.py really the place for this to live? I\u0027m just thinking about packaging where someone could package nova-compute in it\u0027s own sub-package and whitelist what gets into it, like the stuff under nova/compute and nova/virt, for example.\n\nI\u0027d think this is better in the more generic and universal nova/utils.py.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            system_metadata\u003dsystem_metadata, extra_usage_info\u003dextra_info)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"def get_versioned_exception(fault):"},{"line_number":288,"context_line":"    trace \u003d inspect.trace()[-1]"},{"line_number":289,"context_line":"    return exception_notification.ExceptionPayload("},{"line_number":290,"context_line":"            function_name\u003dtrace[3],"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_c472e27b","line":287,"in_reply_to":"7aa08908_df3acbe6","updated":"2016-06-17 12:38:10.000000000","message":"As a sudden idea I moved it as a factory method to the ExceptionPayload class. It fits there quite well.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            function_name\u003dtrace[3],"},{"line_number":291,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":292,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":293,"context_line":"            exception_message\u003dsix.text_type(fault))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_7125cbac","line":293,"range":{"start_line":293,"start_character":30,"end_line":293,"end_character":50},"updated":"2016-06-16 20:34:33.000000000","message":"I wonder if we should call strutils.mask_password on this. Granted, passwords shouldn\u0027t leak into exception messages, but it\u0027s happened before.\n\nI also wonder about filtering on exceptions that might have the \u0027safe\u0027 attribute set like in the wsgi layer:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/__init__.py#L59\n\nThat\u0027s really more for REST API users, but what can be the users of the notifications? If you\u0027re listening on the RPC bus then it should really be internal to operators...but I can see people publishing this stuff to logstash or something like that to show it in a dashboard.\n\nMaybe I\u0027m being paranoid but I worry about leaking sensitive information via notifications.\n\nPlus this is probably not any worse than what we\u0027re sending over the payload today...","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b75854d36d6c5e442ba363abfea87ee095eb0f8e","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            function_name\u003dtrace[3],"},{"line_number":291,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":292,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":293,"context_line":"            exception_message\u003dsix.text_type(fault))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a9d85d2_467e54e5","line":293,"range":{"start_line":293,"start_character":30,"end_line":293,"end_character":50},"in_reply_to":"5a9d85d2_fa4b99ae","updated":"2016-06-20 15:33:07.000000000","message":"Done","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7be29489a231dec882639ea71379c95acd9172d9","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            function_name\u003dtrace[3],"},{"line_number":291,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":292,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":293,"context_line":"            exception_message\u003dsix.text_type(fault))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a9d85d2_fa4b99ae","line":293,"range":{"start_line":293,"start_character":30,"end_line":293,"end_character":50},"in_reply_to":"7aa08908_44c71212","updated":"2016-06-20 14:18:42.000000000","message":"Adding a TODO would be acceptable in this code also.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            function_name\u003dtrace[3],"},{"line_number":291,"context_line":"            module_name\u003dinspect.getmodule(trace[0]).__name__,"},{"line_number":292,"context_line":"            exception\u003dfault.__class__.__name__,"},{"line_number":293,"context_line":"            exception_message\u003dsix.text_type(fault))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"def notify_about_instance_usage(notifier, context, instance, event_suffix,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_44c71212","line":293,"range":{"start_line":293,"start_character":30,"end_line":293,"end_character":50},"in_reply_to":"7aa08908_7125cbac","updated":"2016-06-17 12:38:10.000000000","message":"I\u0027d like to limit the scope of the patch to a pure transformation from legacy to versioned. The legacy notification has the same security problem so I don\u0027t think solving it here would be the best. I added a follow up task to solve the security issues on this exception later. Do you agree?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/exception_wrapper.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c301d90be63d1281d98f4c0ef2e4c019879c9f6b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        publisher\u003dpublisher,"},{"line_number":44,"context_line":"        event_type\u003devent_type,"},{"line_number":45,"context_line":"        priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":46,"context_line":"        payload\u003dversioned_exception_payload).emit(context)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def emit_legacy_exception_notification(notifier, context, ex, function_name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"7aa08908_8f920e56","line":46,"range":{"start_line":46,"start_character":44,"end_line":46,"end_character":58},"updated":"2016-06-06 12:14:30.000000000","message":"Nit: I wish that were on a separate line, with a variable name, for readability.","commit_id":"90168dddcd06c15345ae57786d06a85c61a4b59b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"57a8e68781458c2e3de1f555493734fa2a0010ff","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        publisher\u003dpublisher,"},{"line_number":44,"context_line":"        event_type\u003devent_type,"},{"line_number":45,"context_line":"        priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":46,"context_line":"        payload\u003dversioned_exception_payload).emit(context)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def emit_legacy_exception_notification(notifier, context, ex, function_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7aa08908_23ccd134","line":46,"range":{"start_line":46,"start_character":44,"end_line":46,"end_character":58},"updated":"2016-06-06 12:19:02.000000000","message":"So I wouldn\u0027t normally block on this nit, but I do find this really hard to read.","commit_id":"6ff0a7e369cfd365488260423914e7787c90eed2"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"9d2154a3d89dab3951fbb417ee5ebe40d8a32b3e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    emit_versioned_exception_notification(notifier, context, ex)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_fc29ae8a","line":32,"updated":"2016-06-06 20:30:46.000000000","message":"It looks like there\u0027s nothing in the unit tests that tests to make sure this is working as intended. There was a functional test added with the notification sample, and the old unit test for the legacy notification was updated, but I don\u0027t see any unit tests checking this function.","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20a749f72a170471b6fa5ffe2c2905dd9ea6de35","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    emit_versioned_exception_notification(notifier, context, ex)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_d99aeb62","line":32,"in_reply_to":"7aa08908_fc29ae8a","updated":"2016-06-07 09:31:29.000000000","message":"There is a test case test_get_versioned_exception_extracts_correct_values in https://review.openstack.org/#/c/310700/15/nova/tests/unit/compute/test_compute_utils.py but agree that it has a limited scope. So I\u0027m adding a more complete one.","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ffce4b8539d922283486ec1c6835baf666a45287","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    emit_versioned_exception_notification(notifier, context, ex)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aa08908_c4395e43","line":32,"in_reply_to":"7aa08908_fc29ae8a","updated":"2016-06-07 09:12:27.000000000","message":"hmm, I missed that, +1 on having this covered.","commit_id":"2d14c2673ff4346501901a927568de60a9e879f5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    emit_versioned_exception_notification(notifier, context, ex)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_ff2067fa","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":41},"updated":"2016-06-16 20:34:33.000000000","message":"Make this private?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    emit_versioned_exception_notification(notifier, context, ex)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_78b591eb","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":41},"in_reply_to":"7aa08908_ff2067fa","updated":"2016-06-17 12:38:10.000000000","message":"Done","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"},{"line_number":36,"context_line":"    host \u003d publisher_id_parts[1]"},{"line_number":37,"context_line":"    publisher \u003d base.NotificationPublisher(context\u003dcontext, host\u003dhost,"},{"line_number":38,"context_line":"                                           binary\u003dbinary)"},{"line_number":39,"context_line":"    event_type \u003d base.EventType("}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_1f545352","line":36,"range":{"start_line":34,"start_character":4,"end_line":36,"end_character":32},"updated":"2016-06-16 20:34:33.000000000","message":"Yikes, this seems really really intrusive to how the notification internals in oslo.messaging work today - if that changes in oslo.messaging at some point we\u0027re going to be broken here. Couldn\u0027t we get a helper method on the notifier interface in oslo.messaging to provide what we need?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e71cc155184a538ac427120439a892c95660373c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"},{"line_number":36,"context_line":"    host \u003d publisher_id_parts[1]"},{"line_number":37,"context_line":"    publisher \u003d base.NotificationPublisher(context\u003dcontext, host\u003dhost,"},{"line_number":38,"context_line":"                                           binary\u003dbinary)"},{"line_number":39,"context_line":"    event_type \u003d base.EventType("}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_341a1118","line":36,"range":{"start_line":34,"start_character":4,"end_line":36,"end_character":32},"in_reply_to":"7aa08908_1f545352","updated":"2016-06-16 20:43:06.000000000","message":"So, another thing on the assumptions for the form of the publisher_id, unless I\u0027m mistaken, that\u0027s formed here:\n\nhttps://github.com/openstack/nova/blob/master/nova/notifications/base.py#L68\n\nCONF.default_publisher_id defaults to None, but could be something. But if CONF.default_publisher_id is not set it uses CONF.host which defaults to the socket hostname.\n\nThis code above looks like it\u0027s assuming that publisher_id is not provided here:\n\nhttps://github.com/openstack/nova/blob/master/nova/rpc.py#L191\n\nSo it defaults to service(binary).host, which is what\u0027s checked above.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def emit_versioned_exception_notification(notifier, context, ex):"},{"line_number":33,"context_line":"    versioned_exception_payload \u003d utils.get_versioned_exception(ex)"},{"line_number":34,"context_line":"    publisher_id_parts \u003d notifier.notifier.publisher_id.split(\u0027.\u0027)"},{"line_number":35,"context_line":"    binary \u003d publisher_id_parts[0]"},{"line_number":36,"context_line":"    host \u003d publisher_id_parts[1]"},{"line_number":37,"context_line":"    publisher \u003d base.NotificationPublisher(context\u003dcontext, host\u003dhost,"},{"line_number":38,"context_line":"                                           binary\u003dbinary)"},{"line_number":39,"context_line":"    event_type \u003d base.EventType("}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_93ef7e1c","line":36,"range":{"start_line":34,"start_character":4,"end_line":36,"end_character":32},"in_reply_to":"7aa08908_341a1118","updated":"2016-06-17 12:38:10.000000000","message":"This is ugly I agree. Instead of reading it back from oslo I proposed to pass it down to the wrap_exception. That is used only three places in the code base so it is an easy change.\n\nPlease note that the CONF.default_publisher_id is only used in the notify_decorator which is totally different code path from the wrap_exception decorator. The notify_decorator is something that needs to be transformed as well. \n\nAlso the assumption on the format is problematic I agree as the rpc.get_notifier() allows to pass in arbitrary publisher_id. Fortunately the legacy wrap_exception does not use this possibility so get_notifier() always generate a format of publisher_id \u003d \"%s.%s\" % (service, host or CONF.host). We can avoid relying on this fact by passing host and binary directly to wrap_exception.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    notification.emit(context)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def emit_legacy_exception_notification(notifier, context, ex, function_name,"},{"line_number":51,"context_line":"                                       args):"},{"line_number":52,"context_line":"    payload \u003d dict(exception\u003dex, args\u003dargs)"},{"line_number":53,"context_line":"    notifier.error(context, function_name, payload)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_7f2d97fc","line":50,"range":{"start_line":50,"start_character":4,"end_line":50,"end_character":38},"updated":"2016-06-16 20:34:33.000000000","message":"Does this need to be public? I\u0027d make it private if it\u0027s only used in this method.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    notification.emit(context)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def emit_legacy_exception_notification(notifier, context, ex, function_name,"},{"line_number":51,"context_line":"                                       args):"},{"line_number":52,"context_line":"    payload \u003d dict(exception\u003dex, args\u003dargs)"},{"line_number":53,"context_line":"    notifier.error(context, function_name, payload)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_d8ce4582","line":50,"range":{"start_line":50,"start_character":4,"end_line":50,"end_character":38},"in_reply_to":"7aa08908_7f2d97fc","updated":"2016-06-17 12:38:10.000000000","message":"Made it private.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def _cleanse_dict(original):"},{"line_number":93,"context_line":"    \"\"\"Strip all admin_password, new_pass, rescue_pass keys from a dict.\"\"\""},{"line_number":94,"context_line":"    return {k: v for k, v in six.iteritems(original) if \"_pass\" not in k}"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_dfaacb84","line":94,"updated":"2016-06-16 20:34:33.000000000","message":"I realize this is just copying what already exists, and I think rlrossit might have already tried working on this, but I think we should be using strutils.mask_password at some point here - unless Ryan added that to oslo.messaging.\n\nAh yup: c990ee02faa9f88e07a27af12eae397e7e8097dc\n\nThat doesn\u0027t fix all notification drivers though, e.g.:\n\nhttps://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/notify/messaging.py#L47\n\nAnyway, this is a separate fix.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def _cleanse_dict(original):"},{"line_number":93,"context_line":"    \"\"\"Strip all admin_password, new_pass, rescue_pass keys from a dict.\"\"\""},{"line_number":94,"context_line":"    return {k: v for k, v in six.iteritems(original) if \"_pass\" not in k}"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_f319a2d2","line":94,"in_reply_to":"7aa08908_dfaacb84","updated":"2016-06-17 12:38:10.000000000","message":"I made a note on the wiki to have a follow up patch fixing this.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/notifications/objects/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"@nova_base.NovaObjectRegistry.register_notification"},{"line_number":18,"context_line":"class ExceptionPayload(base.NotificationPayloadBase):"},{"line_number":19,"context_line":"    # Version 1.0: Initial version"},{"line_number":20,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":21,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_d18f5f2c","line":18,"updated":"2016-06-16 20:34:33.000000000","message":"Is this supposed to define a SCHEMA?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"@nova_base.NovaObjectRegistry.register_notification"},{"line_number":18,"context_line":"class ExceptionPayload(base.NotificationPayloadBase):"},{"line_number":19,"context_line":"    # Version 1.0: Initial version"},{"line_number":20,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":21,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_735bf286","line":18,"in_reply_to":"7aa08908_d18f5f2c","updated":"2016-06-17 12:38:10.000000000","message":"No. SCHEMA can be used to copy data from existing ovos to the notificaiton ovo.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/tests/functional/notification_sample_tests/test_exception_notification.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"67794c983902b8dc9ea55ab7e69029bfec6d763d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        except Exception:"},{"line_number":68,"context_line":"            # The exception gets raised through the call stack"},{"line_number":69,"context_line":"            pass"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        self.assertEqual(expected_notification,"},{"line_number":72,"context_line":"                         fake_notifier.VERSIONED_NOTIFICATIONS[0])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_467544f8","line":70,"updated":"2016-05-26 07:34:49.000000000","message":"We need to have a sample file and we need to verify that.","commit_id":"ee1fdfdea632b33ac7a02b6b8879d610ed707b67"}],"nova/tests/unit/compute/test_compute_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                         self.block_device_mapping[2][\u0027device_name\u0027])"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class VersionedExceptionTestCase(test.TestCase):"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @mock.patch(\u0027nova.notifications.objects.exception.ExceptionPayload\u0027)"},{"line_number":389,"context_line":"    @mock.patch(\u0027inspect.getmodule\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_51f08f66","line":386,"range":{"start_line":386,"start_character":38,"end_line":386,"end_character":46},"updated":"2016-06-16 20:34:33.000000000","message":"Extend NoDBTestCase?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                         self.block_device_mapping[2][\u0027device_name\u0027])"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class VersionedExceptionTestCase(test.TestCase):"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @mock.patch(\u0027nova.notifications.objects.exception.ExceptionPayload\u0027)"},{"line_number":389,"context_line":"    @mock.patch(\u0027inspect.getmodule\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_08eb58dd","line":386,"range":{"start_line":386,"start_character":38,"end_line":386,"end_character":46},"in_reply_to":"7aa08908_51f08f66","updated":"2016-06-17 12:38:10.000000000","message":"Done","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"62a9c04f2ab4d78ef675afd01e0ea109aee7001a","unresolved":false,"context_lines":[{"line_number":386,"context_line":"class VersionedExceptionTestCase(test.TestCase):"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @mock.patch(\u0027nova.notifications.objects.exception.ExceptionPayload\u0027)"},{"line_number":389,"context_line":"    @mock.patch(\u0027inspect.getmodule\u0027)"},{"line_number":390,"context_line":"    @mock.patch(\u0027inspect.trace\u0027)"},{"line_number":391,"context_line":"    def test_get_versioned_exception_extracts_correct_values(self, mock_trace,"},{"line_number":392,"context_line":"                                                             mock_getmodule,"},{"line_number":393,"context_line":"                                                             mock_payload):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_d1aabf19","line":390,"range":{"start_line":389,"start_character":4,"end_line":390,"end_character":32},"updated":"2016-06-16 20:34:33.000000000","message":"Is this stuff basically already tested here:\n\nhttps://review.openstack.org/#/c/310700/19/nova/tests/unit/test_exception.py","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":386,"context_line":"class VersionedExceptionTestCase(test.TestCase):"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @mock.patch(\u0027nova.notifications.objects.exception.ExceptionPayload\u0027)"},{"line_number":389,"context_line":"    @mock.patch(\u0027inspect.getmodule\u0027)"},{"line_number":390,"context_line":"    @mock.patch(\u0027inspect.trace\u0027)"},{"line_number":391,"context_line":"    def test_get_versioned_exception_extracts_correct_values(self, mock_trace,"},{"line_number":392,"context_line":"                                                             mock_getmodule,"},{"line_number":393,"context_line":"                                                             mock_payload):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_289c5469","line":390,"range":{"start_line":389,"start_character":4,"end_line":390,"end_character":32},"in_reply_to":"7aa08908_d1aabf19","updated":"2016-06-17 12:38:10.000000000","message":"Good catch. Let\u0027s drop this test as the other has a better coverage anyhow.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/tests/unit/objects/test_objects.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53f82053eaa1b45cc2e39e05d28c1992fa92b7ec","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    \u0027EC2SnapshotMapping\u0027: \u00271.0-47e7ddabe1af966dce0cfd0ed6cd7cd1\u0027,"},{"line_number":1122,"context_line":"    \u0027EC2VolumeMapping\u0027: \u00271.0-5b713751d6f97bad620f3378a521020d\u0027,"},{"line_number":1123,"context_line":"    \u0027EventType\u0027: \u00271.1-8291570eed00192197c7fa02ac677cd4\u0027,"},{"line_number":1124,"context_line":"    \u0027ExceptionNotification\u0027: \u00271.0-a73147b93b520ff0061865849d3dfa56\u0027,"},{"line_number":1125,"context_line":"    \u0027ExceptionPayload\u0027: \u00271.0-4516ae282a55fe2fd5c754967ee6248b\u0027,"},{"line_number":1126,"context_line":"    \u0027FixedIP\u0027: \u00271.14-53e1c10b539f1a82fe83b1af4720efae\u0027,"},{"line_number":1127,"context_line":"    \u0027FixedIPList\u0027: \u00271.14-87a39361c8f08f059004d6b15103cdfd\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_3f2f8f89","line":1124,"updated":"2016-06-16 19:45:41.000000000","message":"The spec says:\n\nhttp://specs.openstack.org/openstack/nova-specs/specs/newton/approved/versioned-notification-transformation.html\n\n\"Separate the unit tests so that we can test the unregistered object hashes to maintain versioning.\"\n\nIs that all going to happen later?","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b75854d36d6c5e442ba363abfea87ee095eb0f8e","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    \u0027EC2SnapshotMapping\u0027: \u00271.0-47e7ddabe1af966dce0cfd0ed6cd7cd1\u0027,"},{"line_number":1122,"context_line":"    \u0027EC2VolumeMapping\u0027: \u00271.0-5b713751d6f97bad620f3378a521020d\u0027,"},{"line_number":1123,"context_line":"    \u0027EventType\u0027: \u00271.1-8291570eed00192197c7fa02ac677cd4\u0027,"},{"line_number":1124,"context_line":"    \u0027ExceptionNotification\u0027: \u00271.0-a73147b93b520ff0061865849d3dfa56\u0027,"},{"line_number":1125,"context_line":"    \u0027ExceptionPayload\u0027: \u00271.0-4516ae282a55fe2fd5c754967ee6248b\u0027,"},{"line_number":1126,"context_line":"    \u0027FixedIP\u0027: \u00271.14-53e1c10b539f1a82fe83b1af4720efae\u0027,"},{"line_number":1127,"context_line":"    \u0027FixedIPList\u0027: \u00271.14-87a39361c8f08f059004d6b15103cdfd\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a9d85d2_86eddc8d","line":1124,"in_reply_to":"5a9d85d2_1a302501","updated":"2016-06-20 15:33:07.000000000","message":"I proposed the separation in https://review.openstack.org/331727","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7be29489a231dec882639ea71379c95acd9172d9","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    \u0027EC2SnapshotMapping\u0027: \u00271.0-47e7ddabe1af966dce0cfd0ed6cd7cd1\u0027,"},{"line_number":1122,"context_line":"    \u0027EC2VolumeMapping\u0027: \u00271.0-5b713751d6f97bad620f3378a521020d\u0027,"},{"line_number":1123,"context_line":"    \u0027EventType\u0027: \u00271.1-8291570eed00192197c7fa02ac677cd4\u0027,"},{"line_number":1124,"context_line":"    \u0027ExceptionNotification\u0027: \u00271.0-a73147b93b520ff0061865849d3dfa56\u0027,"},{"line_number":1125,"context_line":"    \u0027ExceptionPayload\u0027: \u00271.0-4516ae282a55fe2fd5c754967ee6248b\u0027,"},{"line_number":1126,"context_line":"    \u0027FixedIP\u0027: \u00271.14-53e1c10b539f1a82fe83b1af4720efae\u0027,"},{"line_number":1127,"context_line":"    \u0027FixedIPList\u0027: \u00271.14-87a39361c8f08f059004d6b15103cdfd\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a9d85d2_1a302501","line":1124,"in_reply_to":"7aa08908_0e7b6ef5","updated":"2016-06-20 14:18:42.000000000","message":"Separating before this change would make the most sense probably.","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"20f1ea35f990a6180f566167c55ed779d2645507","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"    \u0027EC2SnapshotMapping\u0027: \u00271.0-47e7ddabe1af966dce0cfd0ed6cd7cd1\u0027,"},{"line_number":1122,"context_line":"    \u0027EC2VolumeMapping\u0027: \u00271.0-5b713751d6f97bad620f3378a521020d\u0027,"},{"line_number":1123,"context_line":"    \u0027EventType\u0027: \u00271.1-8291570eed00192197c7fa02ac677cd4\u0027,"},{"line_number":1124,"context_line":"    \u0027ExceptionNotification\u0027: \u00271.0-a73147b93b520ff0061865849d3dfa56\u0027,"},{"line_number":1125,"context_line":"    \u0027ExceptionPayload\u0027: \u00271.0-4516ae282a55fe2fd5c754967ee6248b\u0027,"},{"line_number":1126,"context_line":"    \u0027FixedIP\u0027: \u00271.14-53e1c10b539f1a82fe83b1af4720efae\u0027,"},{"line_number":1127,"context_line":"    \u0027FixedIPList\u0027: \u00271.14-87a39361c8f08f059004d6b15103cdfd\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_0e7b6ef5","line":1124,"in_reply_to":"7aa08908_3f2f8f89","updated":"2016-06-17 12:38:10.000000000","message":"Yeah that was the plan. Then we realized that moving the notification objects to different object registry would be a major version bump so we kept them in the NovaObjectRegistry which automatically means that it tested by the current unit test case. But you are right we can still have a separate hash list for the notification objects and a separate unit test checking that. Do you accept doing that as a follow up or shall I add it before this commit? I added a note to the wiki not to forget it [1]\n\n[1] https://wiki.openstack.org/wiki/Nova/VersionedNotificationTransformation#Follow_up_tasks","commit_id":"511a56b5f92ebfb18885abc0f15b2e481cee7657"}],"nova/tests/unit/test_exception.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"53ce32ebd09eb9ed5e65ea2e98b544b53d59fce6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova import exception_wrapper"},{"line_number":25,"context_line":"from nova import rpc"},{"line_number":26,"context_line":"from nova import test"},{"line_number":27,"context_line":"from nova.tests.unit import fake_notifier"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def good_function(self, context):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_3fde5e11","line":27,"updated":"2016-06-07 13:37:16.000000000","message":"Well done on the reusability, I forgot this existed.","commit_id":"c37c9bafbc3cca39dffce381f63900ce4ce0d0a4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5c39c41ab49a46124d37f121d6d3abe4f4c0ef32","unresolved":false,"context_lines":[{"line_number":38,"context_line":"class WrapExceptionTestCase(test.NoDBTestCase):"},{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(WrapExceptionTestCase, self).setUp()"},{"line_number":41,"context_line":"        fake_notifier.stub_notifier(self.stubs)"},{"line_number":42,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_wrap_exception_good_return(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_762a0be9","line":41,"updated":"2016-06-10 08:06:48.000000000","message":"I think stubs is the one that we are deprecating?\n\nSee these changes:\nhttps://review.openstack.org/#/c/322742/2\n\nCan we avoid that somehow?","commit_id":"c37c9bafbc3cca39dffce381f63900ce4ce0d0a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a4fb5446c927be190cd8b78ed24ccf915375afef","unresolved":false,"context_lines":[{"line_number":38,"context_line":"class WrapExceptionTestCase(test.NoDBTestCase):"},{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(WrapExceptionTestCase, self).setUp()"},{"line_number":41,"context_line":"        fake_notifier.stub_notifier(self.stubs)"},{"line_number":42,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_wrap_exception_good_return(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7aa08908_ecd2a733","line":41,"in_reply_to":"7aa08908_762a0be9","updated":"2016-06-10 09:37:33.000000000","message":"Good point. I replaced the mox call with a mock call (stub_out) in fake_notifier in the parent of this commit. https://review.openstack.org/#/c/328197","commit_id":"c37c9bafbc3cca39dffce381f63900ce4ce0d0a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c2cec3fd1e1f1039a126b0705c247a525b01ff1b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.assertIn(key, notification.payload.keys())"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.assertEqual(1, len(fake_notifier.VERSIONED_NOTIFICATIONS))"},{"line_number":66,"context_line":"        notification \u003d fake_notifier.VERSIONED_NOTIFICATIONS[0]"},{"line_number":67,"context_line":"        self.assertEqual(\u0027compute.exception\u0027, notification[\u0027event_type\u0027])"},{"line_number":68,"context_line":"        self.assertEqual(\u0027fake-binary:fake-mini\u0027, notification[\u0027publisher_id\u0027])"},{"line_number":69,"context_line":"        self.assertEqual(\u0027ERROR\u0027, notification[\u0027priority\u0027])"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a9d85d2_73350f45","line":66,"updated":"2016-06-20 16:28:56.000000000","message":"Does this not contain a version in it? Sorry for a basic question here, I don\u0027t have the spec in my head.","commit_id":"aa274f1799eb6e6d4775698ee925261e1a0bc3a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bc064de20c0cd178527ec65839fedec0bb717236","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.assertIn(key, notification.payload.keys())"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.assertEqual(1, len(fake_notifier.VERSIONED_NOTIFICATIONS))"},{"line_number":66,"context_line":"        notification \u003d fake_notifier.VERSIONED_NOTIFICATIONS[0]"},{"line_number":67,"context_line":"        self.assertEqual(\u0027compute.exception\u0027, notification[\u0027event_type\u0027])"},{"line_number":68,"context_line":"        self.assertEqual(\u0027fake-binary:fake-mini\u0027, notification[\u0027publisher_id\u0027])"},{"line_number":69,"context_line":"        self.assertEqual(\u0027ERROR\u0027, notification[\u0027priority\u0027])"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a9d85d2_8442d33c","line":66,"in_reply_to":"5a9d85d2_73350f45","updated":"2016-06-21 07:40:57.000000000","message":"good point, let\u0027s assert the version as well.","commit_id":"aa274f1799eb6e6d4775698ee925261e1a0bc3a2"}]}
