)]}'
{"keystonemiddleware/audit/_notifier.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"061dd2635f7c3ee6e011f399e19b9f4d34998c21","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"neutron_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"neutron_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_7ad35a39","line":41,"range":{"start_line":40,"start_character":8,"end_line":41,"end_character":52},"updated":"2017-10-09 20:52:45.000000000","message":"This seems highly specific to neutron and we don\u0027t seem to have other patterns like this for other projects.","commit_id":"301de12b2193be84d35ca7b0e97932c379938511"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"50242e120bd440ea463443ee8602458031058ab1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"neutron_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"neutron_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_a0b69ff9","line":41,"range":{"start_line":40,"start_character":8,"end_line":41,"end_character":52},"in_reply_to":"5f4e5783_ecbca96a","updated":"2017-10-12 01:10:04.000000000","message":"Yeah, this is specific for neutron, not sure if this can be fixed in neutron, there are some places use \"neutron_context\" for notification in neutron[1][2]\n[1]: https://github.com/openstack/neutron/blob/master/neutron/pecan_wsgi/hooks/notifier.py#L61\n[2]: https://github.com/openstack/neutron/blob/master/neutron/pecan_wsgi/hooks/notifier.py#L67\nhttps://github.com/openstack/neutron/blob/master/neutron/pecan_wsgi/hooks/notifier.py#L102","commit_id":"301de12b2193be84d35ca7b0e97932c379938511"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"ccdd25aa899c1681b5fd109fd662e99e0334563c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"neutron_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"neutron_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_ecbca96a","line":41,"range":{"start_line":40,"start_character":8,"end_line":41,"end_character":52},"in_reply_to":"7f515b1d_7ad35a39","updated":"2017-10-11 10:50:06.000000000","message":"I was wondering exactly the same. Seems like we want to find the root cause and fix it, this seems to be a workaround","commit_id":"301de12b2193be84d35ca7b0e97932c379938511"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6d54d5d6d8fe246ec7a279243d4f4f166ba4a2db","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"service_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_47c32139","line":40,"updated":"2019-07-12 15:38:56.000000000","message":"As in Nova code, when a notification is sent [1] (very similar to the problem described in this bug), the context is removed. We can/should do the same here.\n\n# NOTE(gibi) remove context as well as it contains sensitive information\n# and it can also contain circular references\n\nAnother topic could be how to define a generic way to name the context (in this case, \"service_context\" is proposed).\n\n[1]https://review.opendev.org/#/c/447071/1/nova/exception_wrapper.py","commit_id":"155a95464a38c6cdee0ddd8417e03557aa191b84"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"bfc6d178b19ee62ccfc241195fffb96417fe51f1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"service_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_d5ed5fb7","line":40,"in_reply_to":"7faddb67_47c32139","updated":"2019-07-15 20:17:08.000000000","message":"\u003e As in Nova code, when a notification is sent [1] (very similar to\n \u003e the problem described in this bug), the context is removed. We\n \u003e can/should do the same here.\n \u003e \n \u003e # NOTE(gibi) remove context as well as it contains sensitive\n \u003e information\n \u003e # and it can also contain circular references\n\nThis is unrelated to the bug, if we need to address it we can do so in a separate patch.\n\n \u003e \n \u003e Another topic could be how to define a generic way to name the\n \u003e context (in this case, \"service_context\" is proposed).\n \u003e \n\nservice_context sounds fine to me, are you proposing that it should be something different? I don\u0027t think it\u0027s worth a bikeshed unless you have a specific issue with the name or a better idea to suggest.\n\n \u003e [1]https://review.opendev.org/#/c/447071/1/nova/exception_wrapper.py","commit_id":"155a95464a38c6cdee0ddd8417e03557aa191b84"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f9addf01f2cb2984d563ec2b63c2ca537497f776","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self._notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"service_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_22eeecb3","line":40,"in_reply_to":"7faddb67_d5ed5fb7","updated":"2019-07-16 11:53:40.000000000","message":"1) The problem found in Nova is directly related to this bug. In Nova, the context was removed in the exception wrapper because of a circular reference found during the encoding.\n\n2) I was not proposing anything else but supporting this idea and encouraging the community to comment about this. I have the same interest as the developer to have this resolved.","commit_id":"155a95464a38c6cdee0ddd8417e03557aa191b84"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"bfc6d178b19ee62ccfc241195fffb96417fe51f1","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"service_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_f5d17bfc","line":41,"updated":"2019-07-15 20:17:08.000000000","message":"Does the neutron context contain the same data as the keystonemiddleware context object? I\u0027m concerned this is losing data since it is replacing the context object with the value of just one of its keys.","commit_id":"155a95464a38c6cdee0ddd8417e03557aa191b84"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"9d104a7375857de4a0083d5027ab02e3cb83cd79","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context \u003d context.get(\"service_context\")"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_5d8131c3","line":41,"in_reply_to":"7faddb67_f5d17bfc","updated":"2019-07-22 21:19:20.000000000","message":"Good point, so I will just remove the unserializable service_context instead.","commit_id":"155a95464a38c6cdee0ddd8417e03557aa191b84"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"286fb5e31ddc27205a6699f16bbeca1f0e438ea8","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context.pop(\u0027neutron_context\u0027, None)"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_73020e41","line":41,"range":{"start_line":41,"start_character":25,"end_line":41,"end_character":40},"updated":"2019-07-23 17:49:10.000000000","message":"service_context, not neutron_context\n\nAgain I\u0027m unfamiliar with exactly what\u0027s contained in the service\u0027s context, is popping this context not also losing some data? Is there some way to convert that context object into a serializeable format to avoid losing data? Or is that not an issue?","commit_id":"4c4cc006a27348afb4169ba21c290893c38270ac"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context.pop(\u0027neutron_context\u0027, None)"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_821ec05c","line":41,"range":{"start_line":41,"start_character":25,"end_line":41,"end_character":40},"updated":"2019-08-01 21:12:09.000000000","message":"This still doesn\u0027t match the condition, do you really mean to pop \"neutron_context\" when an entirely different key \"service_context\" exists? Please also see the rest of my question on patchset 4 - couldn\u0027t this just be fixed on the neutron side, by making that context object serializeable? Or if this a useless enough object to just pop and leave behind, could we change oslo.messaging to just drop objects it can\u0027t serialize?","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def notify(self, context, event_type, payload):"},{"line_number":40,"context_line":"        if \"service_context\" in context:"},{"line_number":41,"context_line":"            context.pop(\u0027neutron_context\u0027, None)"},{"line_number":42,"context_line":"        self._notifier.info(context, event_type, payload)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_7bdd8712","line":41,"range":{"start_line":41,"start_character":25,"end_line":41,"end_character":40},"in_reply_to":"7faddb67_821ec05c","updated":"2019-10-10 20:27:55.000000000","message":"Done","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"}],"keystonemiddleware/tests/unit/audit/test_audit_oslo_messaging.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                       audit._notifier._LogNotifier))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_cadf_event_strip_service_context(self):"},{"line_number":98,"context_line":"        class UnserializableItem(dict):"},{"line_number":99,"context_line":"            def __init__(self):"},{"line_number":100,"context_line":"                self.findme \u003d True"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_c2f0386a","line":98,"range":{"start_line":98,"start_character":33,"end_line":98,"end_character":37},"updated":"2019-08-01 21:12:09.000000000","message":"A dict is serializeable, this should be an object","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                       audit._notifier._LogNotifier))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_cadf_event_strip_service_context(self):"},{"line_number":98,"context_line":"        class UnserializableItem(dict):"},{"line_number":99,"context_line":"            def __init__(self):"},{"line_number":100,"context_line":"                self.findme \u003d True"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_3be38fda","line":98,"range":{"start_line":98,"start_character":33,"end_line":98,"end_character":37},"in_reply_to":"7faddb67_c2f0386a","updated":"2019-10-10 20:27:55.000000000","message":"Ack, thanks.  Fixed.","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            def __init__(self):"},{"line_number":100,"context_line":"                self.findme \u003d True"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        self.cfg.config(driver\u003d\u0027log\u0027,"},{"line_number":103,"context_line":"                        group\u003d\u0027audit_middleware_notifications\u0027)"},{"line_number":104,"context_line":"        app \u003d self.create_simple_app()"},{"line_number":105,"context_line":"        middleware \u003d self.create_simple_middleware()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_82e6c0af","line":102,"range":{"start_line":102,"start_character":32,"end_line":102,"end_character":35},"updated":"2019-08-01 21:12:09.000000000","message":"The bug as well as the code change seem to imply that the problem is with the messaging driver, not the log driver","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            def __init__(self):"},{"line_number":100,"context_line":"                self.findme \u003d True"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        self.cfg.config(driver\u003d\u0027log\u0027,"},{"line_number":103,"context_line":"                        group\u003d\u0027audit_middleware_notifications\u0027)"},{"line_number":104,"context_line":"        app \u003d self.create_simple_app()"},{"line_number":105,"context_line":"        middleware \u003d self.create_simple_middleware()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_7effb500","line":102,"range":{"start_line":102,"start_character":32,"end_line":102,"end_character":35},"in_reply_to":"7faddb67_82e6c0af","updated":"2019-10-10 20:27:55.000000000","message":"fixed","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        req \u003d webob.Request.blank(\u0027/foo/bar\u0027,"},{"line_number":107,"context_line":"                                  environ\u003dself.get_environ_header(\u0027GET\u0027))"},{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_02bc1004","line":109,"range":{"start_line":109,"start_character":41,"end_line":109,"end_character":56},"updated":"2019-08-01 21:12:09.000000000","message":"service_context?","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        req \u003d webob.Request.blank(\u0027/foo/bar\u0027,"},{"line_number":107,"context_line":"                                  environ\u003dself.get_environ_header(\u0027GET\u0027))"},{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_5b01ab69","line":109,"range":{"start_line":109,"start_character":41,"end_line":109,"end_character":56},"in_reply_to":"7faddb67_02bc1004","updated":"2019-10-10 20:27:55.000000000","message":"Done","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"},{"line_number":113,"context_line":"            middleware(req)"},{"line_number":114,"context_line":"            # audit middleware conf has \u0027log\u0027 make sure that driver is invoked"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_62014438","line":111,"range":{"start_line":111,"start_character":47,"end_line":111,"end_character":66},"updated":"2019-08-01 21:12:09.000000000","message":"I thought it was the messaging driver, not the log driver?","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"},{"line_number":113,"context_line":"            middleware(req)"},{"line_number":114,"context_line":"            # audit middleware conf has \u0027log\u0027 make sure that driver is invoked"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_9e04f116","line":111,"range":{"start_line":111,"start_character":47,"end_line":111,"end_character":66},"in_reply_to":"7faddb67_62014438","updated":"2019-10-10 20:27:55.000000000","message":"fixed","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"cb5f85def76d8450f2e0c43262c1e139b90ca6af","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"},{"line_number":113,"context_line":"            middleware(req)"},{"line_number":114,"context_line":"            # audit middleware conf has \u0027log\u0027 make sure that driver is invoked"},{"line_number":115,"context_line":"            # and not the one specified in DEFAULT section"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_121118ad","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":54},"updated":"2019-07-26 22:10:38.000000000","message":"I had a terrible time trying to figure out how to simulate this functionality.  When looking through the various tests, I could not see anywhere where the context is actually passed through.  So this is probably both broken and ineffective.  I would very much like it if you could assist me in discovering a way to test for this change in a unit text context.  Thanks!","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        service_context \u003d UnserializableItem()"},{"line_number":109,"context_line":"        req.environ[\u0027audit.context\u0027] \u003d {\u0027neutron_context\u0027: service_context}"},{"line_number":110,"context_line":"        jsonme \u003d lambda *args,**kwargs:json.dumps(*args, **kwargs)"},{"line_number":111,"context_line":"        with mock.patch(\u0027oslo_messaging.notify._impl_log.LogDriver.notify\u0027,"},{"line_number":112,"context_line":"                        side_effect\u003djsonme) as driver:"},{"line_number":113,"context_line":"            middleware(req)"},{"line_number":114,"context_line":"            # audit middleware conf has \u0027log\u0027 make sure that driver is invoked"},{"line_number":115,"context_line":"            # and not the one specified in DEFAULT section"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_8269e0f8","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":54},"in_reply_to":"7faddb67_121118ad","updated":"2019-08-01 21:12:09.000000000","message":"This is what I\u0027ve come up with so far: http://paste.openstack.org/show/755249/\n\nHowever, I can\u0027t get it to reproduce the error in the bug report. I\u0027ve verified that the _MessagingNotifier notify() method is being called and that the object being passed in is unserializeable, but it doesn\u0027t follow the same code path in oslo.messaging as the traceback in the bug report indicates. Is the problem specific to the amqp driver of oslo.messaging?","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e3a99ce08d245502577cfbefe36e24c4b189b8de","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            isinstance(audit_middleware._notifier,"},{"line_number":96,"context_line":"                       audit._notifier._LogNotifier))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_cadf_event_strip_service_context(self):"},{"line_number":99,"context_line":"        class UnserializableItem(object):"},{"line_number":100,"context_line":"            def __init__(self):"},{"line_number":101,"context_line":"                self.findme \u003d True"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_d661303e","line":98,"updated":"2020-02-05 22:18:33.000000000","message":"This test passed for me without the change in the notifier, so I think it\u0027s not exposing the bug properly.","commit_id":"cacff748293474e95b7161910bcedcedef92f60f"}],"releasenotes/notes/service_context-8e51ef6b9ff29af4.yaml":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f5e1b2fb7037561a606e0bfd2903ed3d950f8490","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Some services invoke keystonemiddleware with an unserializable object in the"},{"line_number":5,"context_line":"    context.  Added a provision to drop from the context anything named"},{"line_number":6,"context_line":"    \u0027service_context\u0027 so that services have a place to put their"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7faddb67_a2cdfcb7","line":3,"updated":"2019-08-01 21:12:09.000000000","message":"Add a link to the bug","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"32b2a77d745fe751a71c81759deec519306cc6bc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Some services invoke keystonemiddleware with an unserializable object in the"},{"line_number":5,"context_line":"    context.  Added a provision to drop from the context anything named"},{"line_number":6,"context_line":"    \u0027service_context\u0027 so that services have a place to put their"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3fa7e38b_fe12c557","line":3,"in_reply_to":"7faddb67_a2cdfcb7","updated":"2019-10-10 20:27:55.000000000","message":"Done","commit_id":"0d3f0234d8ac35dd94ef07ba763ee0516e184dc8"}]}
