)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5a783b950f320c65ec6626e3a2bee15cea97ccaf","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I6482223ed2a479de4f5ef4cef056c311c0281408"},{"line_number":41,"context_line":"Closes-Bug: #1841967"},{"line_number":42,"context_line":"Depends-On: https://review.opendev.org/680001"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_e2398aa2","line":42,"updated":"2019-09-05 10:05:58.000000000","message":"We don\u0027t make depends-on in the same repo but rebase on top of this patch.\n\nAnyway, once this patch is merged, the problem in the gate will be solved.\n\nYou should just remove this dependency.","commit_id":"172f253fc96cd1701c3fb0846c0605850f54b5fb"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6811501e7962dfa1f10e57e7ddd9093b53c5aee2","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I6482223ed2a479de4f5ef4cef056c311c0281408"},{"line_number":41,"context_line":"Closes-Bug: #1841967"},{"line_number":42,"context_line":"Depends-On: https://review.opendev.org/680001"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_62e11afc","line":42,"in_reply_to":"7faddb67_e2398aa2","updated":"2019-09-05 10:15:27.000000000","message":"It works, and means I don\u0027t need to rebase my patch if that gets updated. I can remove it if you like though.","commit_id":"172f253fc96cd1701c3fb0846c0605850f54b5fb"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"08443e8b16476083ba0608d3e1d62b2ce019d886","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"    def _delete_subnet(self, context, subnet):"},{"line_number":1067,"context_line":"        registry.notify(resources.SUBNET, events.BEFORE_DELETE,"},{"line_number":1068,"context_line":"                        self, context\u003dcontext, subnet_id\u003dsubnet.id)"},{"line_number":1069,"context_line":"        with db_api.exc_to_retry(sql_exc.IntegrityError), \\"},{"line_number":1070,"context_line":"                db_api.CONTEXT_WRITER.using(context):"},{"line_number":1071,"context_line":"            registry.notify(resources.SUBNET, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_deed9724","line":1068,"updated":"2019-08-30 20:49:24.000000000","message":"first of all, notify() method is already deprecated and publish() should be used instead.\nAnd secondly, such notification is already send in _check_subnet_not_used() function, which is called in L1061","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"b288f6aff6ea6595e44e4bd5b664f26b4c20534f","unresolved":false,"context_lines":[{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"    def _delete_subnet(self, context, subnet):"},{"line_number":1067,"context_line":"        registry.notify(resources.SUBNET, events.BEFORE_DELETE,"},{"line_number":1068,"context_line":"                        self, context\u003dcontext, subnet_id\u003dsubnet.id)"},{"line_number":1069,"context_line":"        with db_api.exc_to_retry(sql_exc.IntegrityError), \\"},{"line_number":1070,"context_line":"                db_api.CONTEXT_WRITER.using(context):"},{"line_number":1071,"context_line":"            registry.notify(resources.SUBNET, events.PRECOMMIT_DELETE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c04926b8","line":1068,"in_reply_to":"7faddb67_deed9724","updated":"2019-09-02 11:25:20.000000000","message":"Thanks, hadn\u0027t spotted that. I\u0027ll remove it.","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5d371ef1145887f714ca043fd1208f6ed768131e","unresolved":false,"context_lines":[{"line_number":494,"context_line":"            # retry reference errors so we can check the port type and"},{"line_number":495,"context_line":"            # cleanup if a network-owned port snuck in without failing"},{"line_number":496,"context_line":"            for subnet in subnets:"},{"line_number":497,"context_line":"                registry.publish("},{"line_number":498,"context_line":"                    resources.SUBNET, events.BEFORE_DELETE, None,"},{"line_number":499,"context_line":"                    payload\u003devents.DBEventPayload(context,"},{"line_number":500,"context_line":"                                                  resource_id\u003dsubnet.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_cf715147","line":497,"updated":"2019-09-02 16:45:54.000000000","message":"According to the bug description, what we need is to create a network context before the deletion of the segments. But here you are implementing a BEFORE_EVENT for the subnets. I don\u0027t see the relationship here.","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"789e06b7d5566564b143c293b603942e0c070d05","unresolved":false,"context_lines":[{"line_number":494,"context_line":"            # retry reference errors so we can check the port type and"},{"line_number":495,"context_line":"            # cleanup if a network-owned port snuck in without failing"},{"line_number":496,"context_line":"            for subnet in subnets:"},{"line_number":497,"context_line":"                registry.publish("},{"line_number":498,"context_line":"                    resources.SUBNET, events.BEFORE_DELETE, None,"},{"line_number":499,"context_line":"                    payload\u003devents.DBEventPayload(context,"},{"line_number":500,"context_line":"                                                  resource_id\u003dsubnet.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_30564160","line":497,"in_reply_to":"7faddb67_cf715147","updated":"2019-09-03 08:22:02.000000000","message":"From the commit message:\n\nA similar change has been made for subnets, both to keep the pattern consistent and avoid any similar issues.\n\nIn this path we don\u0027t get a BEFORE_DELETE event for subnet deletion, since it\u0027s called from delete_subnet rather than _delete_subnet.","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"c97e044ea8bbbd37f08fe8979ba46d1c9fa5b047","unresolved":false,"context_lines":[{"line_number":497,"context_line":"                registry.publish("},{"line_number":498,"context_line":"                    resources.SUBNET, events.BEFORE_DELETE, None,"},{"line_number":499,"context_line":"                    payload\u003devents.DBEventPayload(context,"},{"line_number":500,"context_line":"                                                  resource_id\u003dsubnet.id))"},{"line_number":501,"context_line":"                self._delete_subnet(context, subnet)"},{"line_number":502,"context_line":"            with db_api.CONTEXT_WRITER.using(context):"},{"line_number":503,"context_line":"                network_db \u003d self._get_network(context, id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ceedd7b8","line":500,"updated":"2019-09-02 13:10:01.000000000","message":"_delete_subnet doesn\u0027t call BEFORE_DELETE, so added it here.","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"08443e8b16476083ba0608d3e1d62b2ce019d886","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1216,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1219,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1220,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1221,"context_line":"        self.mechanism_manager.delete_network_precommit("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_de54b7c8","line":1218,"updated":"2019-08-30 20:49:24.000000000","message":"Can\u0027t You simply use higher priority for this handler to make sure that this will always be called first?","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"59b303689532b8a8018f45fc4980c727772f0984","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1216,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1219,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1220,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1221,"context_line":"        self.mechanism_manager.delete_network_precommit("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_cebf17a9","line":1218,"in_reply_to":"7faddb67_6e7dc36b","updated":"2019-09-02 13:04:54.000000000","message":"Ok, but is there a benefit to that approach vs. this one?","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c77a33882484f135d93457f510ae6224f8861d18","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1216,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1219,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1220,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1221,"context_line":"        self.mechanism_manager.delete_network_precommit("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6e7dc36b","line":1218,"in_reply_to":"7faddb67_80eece88","updated":"2019-09-02 12:47:44.000000000","message":"By this: https://opendev.org/openstack/neutron-lib/src/branch/master/neutron_lib/callbacks/priority_group.py#L19, you can choose zero or 1 as highest priority.","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"b288f6aff6ea6595e44e4bd5b664f26b4c20534f","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1216,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1219,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1220,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1221,"context_line":"        self.mechanism_manager.delete_network_precommit("}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_80eece88","line":1218,"in_reply_to":"7faddb67_de54b7c8","updated":"2019-09-02 11:25:20.000000000","message":"I considered doing that. The problem with priorities is that they\u0027re a bit arbitrary - how do I pick a number that ensures I\u0027ll always run before other handlers that might modify the network? With before_delete I know I\u0027ll always have an unmodified copy of the network.\n\nThat said, I\u0027m sure you\u0027re more familiar with this code than I am, so if there\u0027s a good reason not to do this I\u0027m open to using priorities.","commit_id":"a719faee4235be927e6f469b4d1aecec4c00585a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5d371ef1145887f714ca043fd1208f6ed768131e","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"                                                     network)"},{"line_number":1215,"context_line":"        # TODO(kevinbenton): move this mech context into something like"},{"line_number":1216,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1217,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1220,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_6faa9d84","line":1217,"range":{"start_line":1217,"start_character":27,"end_line":1217,"end_character":35},"updated":"2019-09-02 16:45:54.000000000","message":"just a question: why this change? This won\u0027t interfere with _subnet_mech_context because those are different contexts","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"789e06b7d5566564b143c293b603942e0c070d05","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"                                                     network)"},{"line_number":1215,"context_line":"        # TODO(kevinbenton): move this mech context into something like"},{"line_number":1216,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1217,"context_line":"        setattr(context, \u0027_network_mech_context\u0027, mech_context)"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE])"},{"line_number":1220,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_307de1e5","line":1217,"range":{"start_line":1217,"start_character":27,"end_line":1217,"end_character":35},"in_reply_to":"7faddb67_6faa9d84","updated":"2019-09-03 08:22:02.000000000","message":"See the last paragraph of the commit message. Without this, the unit tests failed when deleting networks, and deleting subnets belonging to that network. It uses the same context, so after the subnet deletion is finished the NetworkContext gets replaced with a SubnetContext.","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5d371ef1145887f714ca043fd1208f6ed768131e","unresolved":false,"context_lines":[{"line_number":1335,"context_line":"                                                    subnet, network)"},{"line_number":1336,"context_line":"        # TODO(kevinbenton): move this mech context into something like"},{"line_number":1337,"context_line":"        # a \u0027delete context\u0027 so it\u0027s not polluting the real context object"},{"line_number":1338,"context_line":"        setattr(context, \u0027_subnet_mech_context\u0027, mech_context)"},{"line_number":1339,"context_line":""},{"line_number":1340,"context_line":"    @registry.receives(resources.SUBNET, [events.PRECOMMIT_DELETE])"},{"line_number":1341,"context_line":"    def _subnet_delete_precommit_handler(self, rtype, event, trigger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_8f883922","line":1338,"range":{"start_line":1338,"start_character":26,"end_line":1338,"end_character":46},"updated":"2019-09-02 16:45:54.000000000","message":"ditto","commit_id":"9051ba2f6828a681081a85d1be3c1e1fe5ae92d1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"24a0c1c0834e91dd16c99d883736e640e155b528","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"    # other precommit handlers. This is necessary to ensure we avoid another"},{"line_number":1205,"context_line":"    # handler deleting a subresource of the network, e.g. segments."},{"line_number":1206,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE],"},{"line_number":1207,"context_line":"                       priority\u003d0)"},{"line_number":1208,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1209,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1210,"context_line":"        network \u003d self.get_network(context, network_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_986e0c94","line":1207,"updated":"2019-09-05 09:08:41.000000000","message":"I\u0027m ok with this change (this is cleaner).\n\none nit: registry priority should be something generally available (neutron_lib.callbacks.priority_group) for any other project (out-of-tree ml2 driver, for example).","commit_id":"c1d4faf8a9816a58eab089c8c341c9d3f6dcd1a4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5a783b950f320c65ec6626e3a2bee15cea97ccaf","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"    # other precommit handlers. This is necessary to ensure we avoid another"},{"line_number":1205,"context_line":"    # handler deleting a subresource of the network, e.g. segments."},{"line_number":1206,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE],"},{"line_number":1207,"context_line":"                       priority\u003d0)"},{"line_number":1208,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1209,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1210,"context_line":"        network \u003d self.get_network(context, network_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_62d7da50","line":1207,"in_reply_to":"7faddb67_6236fae9","updated":"2019-09-05 10:05:58.000000000","message":"Yes, I know. This could be for next versions, IMO this is not a blocker at all.","commit_id":"c1d4faf8a9816a58eab089c8c341c9d3f6dcd1a4"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a6b002d54fdda0ae88d67ffdaafa1d027463d000","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"    # other precommit handlers. This is necessary to ensure we avoid another"},{"line_number":1205,"context_line":"    # handler deleting a subresource of the network, e.g. segments."},{"line_number":1206,"context_line":"    @registry.receives(resources.NETWORK, [events.PRECOMMIT_DELETE],"},{"line_number":1207,"context_line":"                       priority\u003d0)"},{"line_number":1208,"context_line":"    def _network_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1209,"context_line":"                                          context, network_id, **kwargs):"},{"line_number":1210,"context_line":"        network \u003d self.get_network(context, network_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_6236fae9","line":1207,"in_reply_to":"7faddb67_986e0c94","updated":"2019-09-05 09:55:28.000000000","message":"Are you saying there should be some constant defined in neutron-lib for the value zero?\n\nThat would require a new neutron-lib release, so I guess it\u0027s too late to do that for Train?","commit_id":"c1d4faf8a9816a58eab089c8c341c9d3f6dcd1a4"}]}
