)]}'
{"neutron/db/l3_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"68c12ec969a747e14436fab6a2f4dacf0442fbc0","unresolved":true,"context_lines":[{"line_number":187,"context_line":"                        \"deleting.\", port_id)"},{"line_number":188,"context_line":"            self._core_plugin.delete_port("},{"line_number":189,"context_line":"                context, port_id, l3_port_check\u003dFalse)"},{"line_number":190,"context_line":"            registry.notify(resources.FLOATING_IP, events.AFTER_DELETE,"},{"line_number":191,"context_line":"                            self, context\u003dcontext, **fips[0])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _get_dead_floating_port_candidates(self, context):"},{"line_number":194,"context_line":"        filters \u003d {\u0027device_id\u0027: [\u0027PENDING\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"add0ad26_ed391d43","side":"PARENT","line":191,"range":{"start_line":190,"start_character":12,"end_line":191,"end_character":61},"updated":"2021-07-09 11:20:50.000000000","message":"Was this moved or just deleted and why?","commit_id":"f12df766d5f02864cad5fedc1df2b00d460ce188"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7560240c8bae8392dde05d466a425b798885e545","unresolved":true,"context_lines":[{"line_number":187,"context_line":"                        \"deleting.\", port_id)"},{"line_number":188,"context_line":"            self._core_plugin.delete_port("},{"line_number":189,"context_line":"                context, port_id, l3_port_check\u003dFalse)"},{"line_number":190,"context_line":"            registry.notify(resources.FLOATING_IP, events.AFTER_DELETE,"},{"line_number":191,"context_line":"                            self, context\u003dcontext, **fips[0])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _get_dead_floating_port_candidates(self, context):"},{"line_number":194,"context_line":"        filters \u003d {\u0027device_id\u0027: [\u0027PENDING\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"47cbea55_073081be","side":"PARENT","line":191,"range":{"start_line":190,"start_character":12,"end_line":191,"end_character":61},"in_reply_to":"add0ad26_ed391d43","updated":"2021-07-09 14:26:23.000000000","message":"Just deleted, because it had never any chance to work.\n\nCondition in line 179 checks if there is anything in fips list.\nIf there isn\u0027t we removing port and then there is this notify call that attempts to get first element from empty list which will always end up with IndexError.","commit_id":"f12df766d5f02864cad5fedc1df2b00d460ce188"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"68c12ec969a747e14436fab6a2f4dacf0442fbc0","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1632,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1633,"context_line":"                context, id\u003d[f.id for f in floating_ip_objs])"},{"line_number":1634,"context_line":"            new_fips \u003d {fip.id: self._make_floatingip_dict(fip)"},{"line_number":1635,"context_line":"                        for fip in floating_ip_objs}"},{"line_number":1636,"context_line":"            for fip in floating_ip_objs:"},{"line_number":1637,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_UPDATE,"},{"line_number":1638,"context_line":"                                self, context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":5,"id":"817874ad_2decd008","line":1635,"range":{"start_line":1634,"start_character":12,"end_line":1635,"end_character":52},"updated":"2021-07-09 11:20:50.000000000","message":"this introduces quite a heavy DB request on each port delete, why is it needed? If it\u0027s not fixing some bug then please avoid adding DB requests.","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7d32201b60c421c8c8d666b1926a0aad565e47a2","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1632,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1633,"context_line":"                context, id\u003d[f.id for f in floating_ip_objs])"},{"line_number":1634,"context_line":"            new_fips \u003d {fip.id: self._make_floatingip_dict(fip)"},{"line_number":1635,"context_line":"                        for fip in floating_ip_objs}"},{"line_number":1636,"context_line":"            for fip in floating_ip_objs:"},{"line_number":1637,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_UPDATE,"},{"line_number":1638,"context_line":"                                self, context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":5,"id":"d1804eb8_e1bf9069","line":1635,"range":{"start_line":1634,"start_character":12,"end_line":1635,"end_character":52},"in_reply_to":"7ae5dc2e_598fca06","updated":"2021-07-09 13:13:44.000000000","message":"+1 on this, do we need the updated FIP in the event? is it used by any listener? if it wasn\u0027t before, why now?","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8558302b1ea72b3fafb4c9d8e8048c055a1a95e7","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1632,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1633,"context_line":"                context, id\u003d[f.id for f in floating_ip_objs])"},{"line_number":1634,"context_line":"            new_fips \u003d {fip.id: self._make_floatingip_dict(fip)"},{"line_number":1635,"context_line":"                        for fip in floating_ip_objs}"},{"line_number":1636,"context_line":"            for fip in floating_ip_objs:"},{"line_number":1637,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_UPDATE,"},{"line_number":1638,"context_line":"                                self, context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ae5dc2e_598fca06","line":1635,"range":{"start_line":1634,"start_character":12,"end_line":1635,"end_character":52},"in_reply_to":"817874ad_2decd008","updated":"2021-07-09 12:40:29.000000000","message":"sorry, I meant line 1632","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7560240c8bae8392dde05d466a425b798885e545","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"                context, values, fixed_port_id\u003dport_id)"},{"line_number":1632,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1633,"context_line":"                context, id\u003d[f.id for f in floating_ip_objs])"},{"line_number":1634,"context_line":"            new_fips \u003d {fip.id: self._make_floatingip_dict(fip)"},{"line_number":1635,"context_line":"                        for fip in floating_ip_objs}"},{"line_number":1636,"context_line":"            for fip in floating_ip_objs:"},{"line_number":1637,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_UPDATE,"},{"line_number":1638,"context_line":"                                self, context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":5,"id":"2052bcf4_ddefe86f","line":1635,"range":{"start_line":1634,"start_character":12,"end_line":1635,"end_character":52},"in_reply_to":"d1804eb8_e1bf9069","updated":"2021-07-09 14:26:23.000000000","message":"- why is it needed? do we need the updated FIP in the event?\nYeah. When publishing AFTER_UPDATE notification we are expected to provide state of the object before and after the change.\n\n- is it used by any listener?\nYup, only _create_dvr_floating_gw_port in l3_dvr_db in Neutron, but it\u0027s also quite important in our 3rd party plugin.\n\n- if it wasn\u0027t before, why now?\nBecause previously noone cared too much about content of those notifications it seems.\nEvery FIP notification had a different field names for same data, and some fields were missing in some of notifications. Working with these was a huge pain.\nIn case of delete_floatingip previously we were faking creation of FIP state dict in line 1644, but it was missing a couple of fields that _make_floatingip_dict adds.\n\n- this introduces quite a heavy DB request on each port delete\nEh, very true. Another get_objects call was added because update_objects don\u0027t change state of objects in floating_ip_objs.\n\nBut now when I think about it - we only need FloatingIP objects with updated state for _make_floatingip_dict call, not actual state directly from db.\nI\u0027ll try to update those without querying DB, it may be enough.","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95336c2385e11ee9c8422eabd7b8861e805b2fd","unresolved":true,"context_lines":[{"line_number":1659,"context_line":"                fip.fixed_ip_address \u003d None"},{"line_number":1660,"context_line":"                fip.router_id \u003d None"},{"line_number":1661,"context_line":"            new_fips \u003d {fip.id: self._make_floatingip_dict(fip)"},{"line_number":1662,"context_line":"                        for fip in floating_ip_objs}"},{"line_number":1663,"context_line":"            for fip in floating_ip_objs:"},{"line_number":1664,"context_line":"                registry.notify(resources.FLOATING_IP, events.PRECOMMIT_UPDATE,"},{"line_number":1665,"context_line":"                                self, context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":8,"id":"b91a6937_f78c7e5a","line":1662,"updated":"2021-08-05 13:52:44.000000000","message":"nit You could do both things in one loop:\n\n    new_fips \u003d {}\n    for fip in floating_ip_objs:\n        fip.fixed_port_id \u003d None\n        fip.fixed_ip_address \u003d None\n        fip.router_id \u003d None\n        new_fips[fip.id] \u003d self._make_floatingip_dict(fip)","commit_id":"e9fb094978a536a133c19b4e10ddb9c9eb4a585e"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"68c12ec969a747e14436fab6a2f4dacf0442fbc0","unresolved":true,"context_lines":[{"line_number":438,"context_line":"    @registry.receives(resources.FLOATING_IP, [events.AFTER_CREATE,"},{"line_number":439,"context_line":"                                               events.AFTER_UPDATE])"},{"line_number":440,"context_line":"    def _create_dvr_floating_gw_port(self, rtype, event, trigger,"},{"line_number":441,"context_line":"                                     payload\u003dNone):"},{"line_number":442,"context_line":"        \"\"\"Create floating agent gw port for DVR."},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        Floating IP Agent gateway port will be created when a"}],"source_content_type":"text/x-python","patch_set":5,"id":"117c5838_bceb3af7","line":441,"range":{"start_line":441,"start_character":37,"end_line":441,"end_character":49},"updated":"2021-07-09 11:20:50.000000000","message":"payload is required parameter","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"},{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"7560240c8bae8392dde05d466a425b798885e545","unresolved":true,"context_lines":[{"line_number":438,"context_line":"    @registry.receives(resources.FLOATING_IP, [events.AFTER_CREATE,"},{"line_number":439,"context_line":"                                               events.AFTER_UPDATE])"},{"line_number":440,"context_line":"    def _create_dvr_floating_gw_port(self, rtype, event, trigger,"},{"line_number":441,"context_line":"                                     payload\u003dNone):"},{"line_number":442,"context_line":"        \"\"\"Create floating agent gw port for DVR."},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        Floating IP Agent gateway port will be created when a"}],"source_content_type":"text/x-python","patch_set":5,"id":"26badbbe_32b092fa","line":441,"range":{"start_line":441,"start_character":37,"end_line":441,"end_character":49},"in_reply_to":"117c5838_bceb3af7","updated":"2021-07-09 14:26:23.000000000","message":"Ok, will fix. (I copy-pasted method signature from line 418 though)","commit_id":"026bd943c5152d618d93abd9deb143cf8acd8079"}]}
