)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"17a68caabe88ec61ceba04e97257a9c4f13dcab0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lina He \u003clina.he@nokia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-03-05 06:11:24 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Unblock security group update with same stateful data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I46d80a2a4f114a6775827ab3caa61dee9f5f1361"},{"line_number":10,"context_line":"Blueprint: stateless-security-groups"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_6f6853b8","line":7,"updated":"2020-03-05 13:45:54.000000000","message":"Can you also add a paragraph below explaining the reason for this change and what it accomplishes?\n\nAlso, if this is fixing some kind of functional issue, is it possible to add a test that would have caught the problem?","commit_id":"45675a39543661cad9f77acd94774f4802a2da5a"},{"author":{"_account_id":31669,"name":"lina He","email":"lina.he@nokia.com","username":"linahe"},"change_message_id":"b6360fd4733034bd39719e6531f541d69b33f555","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lina He \u003clina.he@nokia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-03-05 06:11:24 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Unblock security group update with same stateful data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I46d80a2a4f114a6775827ab3caa61dee9f5f1361"},{"line_number":10,"context_line":"Blueprint: stateless-security-groups"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_3b34cf92","line":7,"in_reply_to":"1fa4df85_6f6853b8","updated":"2020-03-06 05:35:09.000000000","message":"I created a bug ticket and added here.","commit_id":"45675a39543661cad9f77acd94774f4802a2da5a"}],"neutron/db/securitygroups_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dda9370cca136245a60997741369abc48023a530","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                              exc_cls\u003dext_sg.SecurityGroupConflict, **kwargs)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":298,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":299,"context_line":"            if sg.name \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":300,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":301,"context_line":"            sg_dict \u003d self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_577ba179","side":"PARENT","line":298,"updated":"2020-03-06 02:48:41.000000000","message":"I believe moving this will cause issues since it\u0027s now outside the db writer context","commit_id":"c243f3b561344119b10e6e51ebd5cf3525f1ec8b"},{"author":{"_account_id":31669,"name":"lina He","email":"lina.he@nokia.com","username":"linahe"},"change_message_id":"b6360fd4733034bd39719e6531f541d69b33f555","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                              exc_cls\u003dext_sg.SecurityGroupConflict, **kwargs)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":298,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":299,"context_line":"            if sg.name \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":300,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":301,"context_line":"            sg_dict \u003d self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_9b24e35f","side":"PARENT","line":298,"in_reply_to":"1fa4df85_577ba179","updated":"2020-03-06 05:35:09.000000000","message":"Thanks for your comment. I fixed it in the next patchset.","commit_id":"c243f3b561344119b10e6e51ebd5cf3525f1ec8b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a1fca6f5a2e513eafb29663a9f83a945678d2496","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        with db_api.CONTEXT_READER.using(context):"},{"line_number":283,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":284,"context_line":"            if \u0027stateful\u0027 in s and s[\u0027stateful\u0027] !\u003d sg[\u0027stateful\u0027]:"},{"line_number":285,"context_line":"                filters \u003d {\u0027security_group_id\u0027: [id]}"},{"line_number":286,"context_line":"                ports \u003d self._get_port_security_group_bindings(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_d086b2b9","line":283,"updated":"2020-03-06 14:51:51.000000000","message":"I\u0027ll let Nate comment on this too, but the problem now is there will always be two lookups for the SG now, which could affect performance.  One way to lessen this would be a slight change here, something like:\n\nif \u0027stateful\u0027 in s:\n    with ...READER...:\n        sg \u003d self._get_security_group(context, id)\n        if s[\u0027stateful\u0027] !\u003d sg[\u0027stateful\u0027]:\n            filters \u003d {...}\n            ...\n\nThat would defer the lookup to only happen if \u0027stateful\u0027 is present.","commit_id":"65c5182071264847c97729f72ca6510cb46e86ab"},{"author":{"_account_id":31669,"name":"lina He","email":"lina.he@nokia.com","username":"linahe"},"change_message_id":"f0cfb321b0ca75b3a18494f50325651bb642d6b2","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        with db_api.CONTEXT_READER.using(context):"},{"line_number":283,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":284,"context_line":"            if \u0027stateful\u0027 in s and s[\u0027stateful\u0027] !\u003d sg[\u0027stateful\u0027]:"},{"line_number":285,"context_line":"                filters \u003d {\u0027security_group_id\u0027: [id]}"},{"line_number":286,"context_line":"                ports \u003d self._get_port_security_group_bindings(context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_78d8007a","line":283,"in_reply_to":"1fa4df85_d086b2b9","updated":"2020-03-06 17:51:55.000000000","message":"I changed to only get sg when updating stateful. Thanks for your comment.","commit_id":"65c5182071264847c97729f72ca6510cb46e86ab"}],"neutron/tests/unit/db/test_securitygroups_db.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"fb0f802e77432d0eb1c2f7fafc8d02b97890a206","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            with testtools.ExpectedException(securitygroup.SecurityGroupInUse):"},{"line_number":95,"context_line":"                self.mixin.delete_security_group(self.ctx, mock.ANY)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_update_security_group_in_use_conflict(self):"},{"line_number":98,"context_line":"        FAKE_SECGROUP[\u0027security_group\u0027][\u0027stateful\u0027] \u003d mock.ANY"},{"line_number":99,"context_line":"        sg_dict \u003d self.mixin.create_security_group(self.ctx, FAKE_SECGROUP)"},{"line_number":100,"context_line":"        FAKE_SECGROUP[\u0027security_group\u0027][\u0027stateful\u0027] \u003d not sg_dict[\u0027stateful\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_523e21b8","line":97,"range":{"start_line":97,"start_character":8,"end_line":97,"end_character":50},"updated":"2020-03-10 10:34:01.000000000","message":"nit: Just to make the name more a \"speaking\" name, something like:\ntest_update_security_group_statefullness_binded_conflict","commit_id":"414abcbd35738e38947ffb3c366cd161243671f2"},{"author":{"_account_id":31669,"name":"lina He","email":"lina.he@nokia.com","username":"linahe"},"change_message_id":"590bb0ace9f7d637477183bde955a0f94ee299c0","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            with testtools.ExpectedException(securitygroup.SecurityGroupInUse):"},{"line_number":95,"context_line":"                self.mixin.delete_security_group(self.ctx, mock.ANY)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_update_security_group_in_use_conflict(self):"},{"line_number":98,"context_line":"        FAKE_SECGROUP[\u0027security_group\u0027][\u0027stateful\u0027] \u003d mock.ANY"},{"line_number":99,"context_line":"        sg_dict \u003d self.mixin.create_security_group(self.ctx, FAKE_SECGROUP)"},{"line_number":100,"context_line":"        FAKE_SECGROUP[\u0027security_group\u0027][\u0027stateful\u0027] \u003d not sg_dict[\u0027stateful\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_64dfcd0c","line":97,"range":{"start_line":97,"start_character":8,"end_line":97,"end_character":50},"in_reply_to":"1fa4df85_523e21b8","updated":"2020-03-11 04:45:05.000000000","message":"Done","commit_id":"414abcbd35738e38947ffb3c366cd161243671f2"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"fb0f802e77432d0eb1c2f7fafc8d02b97890a206","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            with testtools.ExpectedException(securitygroup.SecurityGroupInUse):"},{"line_number":106,"context_line":"                self.mixin.update_security_group(self.ctx, sg_dict[\u0027id\u0027],"},{"line_number":107,"context_line":"                                                 FAKE_SECGROUP)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_update_security_group_conflict(self):"},{"line_number":110,"context_line":"        with mock.patch.object(registry, \"notify\") as mock_notify:"},{"line_number":111,"context_line":"            mock_notify.side_effect \u003d exceptions.CallbackFailure(Exception())"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_526701ea","line":108,"updated":"2020-03-10 10:34:01.000000000","message":"And I miss here a positive test here, like:\ntest_update_security_group_statefullnes_to_same","commit_id":"414abcbd35738e38947ffb3c366cd161243671f2"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"ca2d90a665f26c9ea2bd863b6b1d8759fb11ee58","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            with testtools.ExpectedException(securitygroup.SecurityGroupInUse):"},{"line_number":106,"context_line":"                self.mixin.update_security_group(self.ctx, sg_dict[\u0027id\u0027],"},{"line_number":107,"context_line":"                                                 FAKE_SECGROUP)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_update_security_group_conflict(self):"},{"line_number":110,"context_line":"        with mock.patch.object(registry, \"notify\") as mock_notify:"},{"line_number":111,"context_line":"            mock_notify.side_effect \u003d exceptions.CallbackFailure(Exception())"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_b4d7404b","line":108,"in_reply_to":"1fa4df85_526701ea","updated":"2020-03-10 13:32:24.000000000","message":"+1","commit_id":"414abcbd35738e38947ffb3c366cd161243671f2"},{"author":{"_account_id":31669,"name":"lina He","email":"lina.he@nokia.com","username":"linahe"},"change_message_id":"ec2ba95ce64ffcbe5a199e7f8953425d387c6d92","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            with testtools.ExpectedException(securitygroup.SecurityGroupInUse):"},{"line_number":106,"context_line":"                self.mixin.update_security_group(self.ctx, sg_dict[\u0027id\u0027],"},{"line_number":107,"context_line":"                                                 FAKE_SECGROUP)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_update_security_group_conflict(self):"},{"line_number":110,"context_line":"        with mock.patch.object(registry, \"notify\") as mock_notify:"},{"line_number":111,"context_line":"            mock_notify.side_effect \u003d exceptions.CallbackFailure(Exception())"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_f11aaac3","line":108,"in_reply_to":"1fa4df85_526701ea","updated":"2020-03-10 13:34:18.000000000","message":"I added in this test to avoid duplicated code: test_security_group_precommit_update_event","commit_id":"414abcbd35738e38947ffb3c366cd161243671f2"}]}
