)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2d0b8306e9b6fa464ba5e8fb4d2eaf2c6463a445","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"0e72b1a5_3ee2a9e5","updated":"2026-07-24 20:36:04.000000000","message":"check experimental","commit_id":"9de9d8e5981ff9ccb5cf98b16f36bb4d2b234768"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"7a2e210db88b36c32671add41f70f82bb665329e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f656d1a3_2019f20e","updated":"2026-08-04 20:42:52.000000000","message":"I\u0027ll redo this patch to not use the pattern\n```\nobjects \u003d object.get_objects()\nget_other_objects \u003d object.get_objects(objects)\n```\nbut do a single query instead","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"43993c7adbd870933adf55d26af157060bb91078","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e0a54f2e_a6d9d5d3","updated":"2026-07-27 12:53:45.000000000","message":"check experimental","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"}],"neutron/services/bgp/commands.py":[{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"2bf9e5906b7536e30bbe3f831953884a9e8c759c","unresolved":true,"context_lines":[{"line_number":893,"context_line":"            self.tenant_ls_name,"},{"line_number":894,"context_line":"        ).run_idl(txn)"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        try:"},{"line_number":897,"context_line":"            provider_switch \u003d _get_provider_switch(self.api)"},{"line_number":898,"context_line":"        except exceptions.ReconcileError:"},{"line_number":899,"context_line":"            LOG.warning(\"Provider switch not found, skipping static \""},{"line_number":900,"context_line":"                        \"route creation for subnet %s.\","},{"line_number":901,"context_line":"                        self.subnet_cidr)"},{"line_number":902,"context_line":"            return"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        interconnect_switch_name \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a77b63a_fde9cc86","line":901,"range":{"start_line":896,"start_character":0,"end_line":901,"end_character":41},"updated":"2026-08-04 20:43:19.000000000","message":"Just asking. If this error is raised, the `ConnectRouterToSwitchCommand` will still the tenant LS to the main router. Is that OK?","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"}],"neutron/services/bgp/plugin.py":[{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"eeaec0cda2c80624612d2b1ce499c7e978d1e131","unresolved":true,"context_lines":[{"line_number":210,"context_line":"    def _is_last_leaked_subnet_on_network(context, network_id):"},{"line_number":211,"context_line":"        leaked \u003d bgp_objects.SubnetBGPLeakRoutes.get_objects(context)"},{"line_number":212,"context_line":"        leaked_subnet_ids \u003d [e.subnet_id for e in leaked]"},{"line_number":213,"context_line":"        if not leaked_subnet_ids:"},{"line_number":214,"context_line":"            return True"},{"line_number":215,"context_line":"        subnets \u003d subnet_objects.Subnet.get_objects("},{"line_number":216,"context_line":"            context, id\u003dleaked_subnet_ids)"},{"line_number":217,"context_line":"        return not any(s.network_id \u003d\u003d network_id for s in subnets)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a318a63_b678ec94","line":214,"range":{"start_line":213,"start_character":0,"end_line":214,"end_character":23},"updated":"2026-08-04 20:33:32.000000000","message":"nit: you could return as soon as `if not leaked` without needing that for loop","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"7a2e210db88b36c32671add41f70f82bb665329e","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def _is_last_leaked_subnet_on_network(context, network_id):"},{"line_number":211,"context_line":"        leaked \u003d bgp_objects.SubnetBGPLeakRoutes.get_objects(context)"},{"line_number":212,"context_line":"        leaked_subnet_ids \u003d [e.subnet_id for e in leaked]"},{"line_number":213,"context_line":"        if not leaked_subnet_ids:"},{"line_number":214,"context_line":"            return True"},{"line_number":215,"context_line":"        subnets \u003d subnet_objects.Subnet.get_objects("},{"line_number":216,"context_line":"            context, id\u003dleaked_subnet_ids)"},{"line_number":217,"context_line":"        return not any(s.network_id \u003d\u003d network_id for s in subnets)"}],"source_content_type":"text/x-python","patch_set":2,"id":"20f75b3c_a60d33f7","line":214,"range":{"start_line":213,"start_character":0,"end_line":214,"end_character":23},"in_reply_to":"3a318a63_b678ec94","updated":"2026-08-04 20:42:52.000000000","message":"Done","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"eeaec0cda2c80624612d2b1ce499c7e978d1e131","unresolved":true,"context_lines":[{"line_number":212,"context_line":"        leaked_subnet_ids \u003d [e.subnet_id for e in leaked]"},{"line_number":213,"context_line":"        if not leaked_subnet_ids:"},{"line_number":214,"context_line":"            return True"},{"line_number":215,"context_line":"        subnets \u003d subnet_objects.Subnet.get_objects("},{"line_number":216,"context_line":"            context, id\u003dleaked_subnet_ids)"},{"line_number":217,"context_line":"        return not any(s.network_id \u003d\u003d network_id for s in subnets)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _leak_subnet(self, context, subnet, tenant_ls_name):"},{"line_number":220,"context_line":"        subnet_id \u003d subnet[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"8c9d20df_edc58437","line":217,"range":{"start_line":215,"start_character":0,"end_line":217,"end_character":67},"updated":"2026-08-04 20:33:32.000000000","message":"This looked like an expensive call to me(if you consider a large deployment). Claude recommended using `object_exist` as that will make the DB do the work and should be faster\n```\n    leaked_subnet_ids \u003d [e.subnet_id for e in leaked]\n    return not subnet_objects.Subnet.objects_exist(\n        context, id\u003dleaked_subnet_ids, network_id\u003dnetwork_id)\n```","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"eeaec0cda2c80624612d2b1ce499c7e978d1e131","unresolved":true,"context_lines":[{"line_number":224,"context_line":"        router_port \u003d self._get_router_port_for_subnet(context, subnet_id)"},{"line_number":225,"context_line":"        router \u003d router_objects.Router.get_object("},{"line_number":226,"context_line":"            context, id\u003drouter_port.device_id)"},{"line_number":227,"context_line":"        nexthop_ip \u003d self._get_nexthop_ip(context, router, ip_version)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        bgp_commands.LeakSubnetCommand("},{"line_number":230,"context_line":"            self._nb_ovn,"}],"source_content_type":"text/x-python","patch_set":2,"id":"2d693646_3f381fe0","line":227,"updated":"2026-08-04 20:33:32.000000000","message":"`_get_next_hop` can return `None`. Maybe you can guard it and log warning?","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"eeaec0cda2c80624612d2b1ce499c7e978d1e131","unresolved":true,"context_lines":[{"line_number":265,"context_line":"        tenant_ls_name \u003d ovn_utils.ovn_name(network_id)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        for cidr in cidrs:"},{"line_number":268,"context_line":"            last_on_network \u003d self._is_last_leaked_subnet_on_network("},{"line_number":269,"context_line":"                context, network_id)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"            bgp_commands.UnleakSubnetCommand("},{"line_number":272,"context_line":"                self._nb_ovn,"}],"source_content_type":"text/x-python","patch_set":2,"id":"87ceb3c6_2f44e2c7","line":269,"range":{"start_line":268,"start_character":0,"end_line":269,"end_character":36},"updated":"2026-08-04 20:33:32.000000000","message":"I think you can do this outside of the for loop, no? Does `context` change on each iteration?","commit_id":"6b1d90ef2a0222662018422f781ae544dcf3b8c2"}]}
