)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"f02c5f23ac8358a490a0631e2b893d04b8b062b6","unresolved":true,"context_lines":[{"line_number":13,"context_line":"This patch skips the message in this scenario."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"We also make bump_revision return a bool that indicates whether revision"},{"line_number":16,"context_line":"was bumped. This is then used in unit tests to explicitly confirm that"},{"line_number":17,"context_line":"bump did (not) occur."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Reported-By: Yatin Karel \u003cykarel@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"8dd525af_356d0630","line":16,"updated":"2024-09-09 16:22:02.000000000","message":"As discussed privately, this seems like unnecessary thing and we used to check if the revision was bumped or not before by fetching the revision number and compare if it changed.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"65968d790c042a59ce7f2fe582a922ff94e91221","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch skips the message in this scenario."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"We also make bump_revision return a bool that indicates whether revision"},{"line_number":16,"context_line":"was bumped. This is then used in unit tests to explicitly confirm that"},{"line_number":17,"context_line":"bump did (not) occur."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Reported-By: Yatin Karel \u003cykarel@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"b5b6e94e_1f39ee96","line":16,"in_reply_to":"8dd525af_356d0630","updated":"2024-09-25 21:45:52.000000000","message":"I now remember why I did do this change: it\u0027s because what I have to validate otherwise is that context.session.merge() is not called twice (based on the current implementation), and that\u0027s a bit ugly.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"00f4291a51aff70f36091a161d159c462f49341e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"08bba690_dae1655b","updated":"2024-05-13 17:10:43.000000000","message":"Checking if maybe better to short-circuit it even earlier, when running CheckRevisionNumberCommand","commit_id":"b815abd086029ef4306da18bc5c9f531487dd825"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2c76d221d74b19ff894c38b56a63814d77568db0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a3a3cf17_c21db83c","updated":"2024-05-13 19:30:12.000000000","message":"Should squash with the next patch and add some tests here first.","commit_id":"b815abd086029ef4306da18bc5c9f531487dd825"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ffd65e6092c09a12aece35e7d8d67def356ed8b4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f03557cb_6c91627e","updated":"2024-09-09 16:18:51.000000000","message":"As Jakub helpfully pointed out, there are other ways to check if bump happened that  don\u0027t require changing the signature of the function.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fe13655f1e976060c86859ad799aac8d092fbd21","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ecd909db_2c54f0f4","updated":"2024-11-19 21:55:24.000000000","message":"I am at this point convinced that this change cannot be meaningfully validated in unit tests without relying on internal implementation (the fact that .merge is called; or that a flag is returned, or a log message is produced...) This is ok, it happens, so I will stick to the very minimal change that is hopefully obviously correct.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"5eacdd4ce4866af415e2e601e38b2145613a1883","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3cbeade3_5e169a5e","updated":"2024-08-26 19:54:39.000000000","message":"recheck","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"61f6e28d2273b08004c517085dd35074f8fd8cae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9d25ff4e_f81a05d1","updated":"2024-11-28 08:54:45.000000000","message":"Looks ok, good catch","commit_id":"2d314a752e81803ea0b92e9c1e2a17d6f35f8abd"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"4e66a1b500fcd3dd337f56dd3bcc40f258cd2dae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ae5068b9_3c487b52","updated":"2024-11-29 09:32:08.000000000","message":"Looks ok, good catch","commit_id":"2d314a752e81803ea0b92e9c1e2a17d6f35f8abd"}],"neutron/db/ovn_revision_numbers_db.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0d33601b965ffd1823e667f202e6e864100c88ef","unresolved":true,"context_lines":[{"line_number":176,"context_line":"        row \u003d context.session.merge(ovn_models.OVNRevisionNumbers("},{"line_number":177,"context_line":"            standard_attr_id\u003dstd_attr_id, resource_uuid\u003dresource[\u0027id\u0027],"},{"line_number":178,"context_line":"            resource_type\u003dresource_type))"},{"line_number":179,"context_line":"        if revision_number \u003d\u003d row.revision_number:"},{"line_number":180,"context_line":"            # no-op neutron db updates don\u0027t result in revision bump"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        if revision_number \u003c row.revision_number:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba875d55_db65ed65","line":179,"updated":"2024-05-13 20:16:42.000000000","message":"I think it would make sense to add the equal sign to the condition below and update the message, or add another debug message here - just to make troubleshooting easier in case of some of-by-one issue with revision numbers.","commit_id":"b815abd086029ef4306da18bc5c9f531487dd825"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"3f4841196dcd8cce71e538c4af367745afe3df2e","unresolved":true,"context_lines":[{"line_number":176,"context_line":"        row \u003d context.session.merge(ovn_models.OVNRevisionNumbers("},{"line_number":177,"context_line":"            standard_attr_id\u003dstd_attr_id, resource_uuid\u003dresource[\u0027id\u0027],"},{"line_number":178,"context_line":"            resource_type\u003dresource_type))"},{"line_number":179,"context_line":"        if revision_number \u003d\u003d row.revision_number:"},{"line_number":180,"context_line":"            # no-op neutron db updates don\u0027t result in revision bump"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        if revision_number \u003c row.revision_number:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f1ec01e9_8d95e5a1","line":179,"in_reply_to":"ba875d55_db65ed65","updated":"2024-05-14 12:31:43.000000000","message":"+1","commit_id":"b815abd086029ef4306da18bc5c9f531487dd825"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d21a2ff6ad68c4361803b79b883972cddc74d6a3","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        row \u003d context.session.merge(ovn_models.OVNRevisionNumbers("},{"line_number":177,"context_line":"            standard_attr_id\u003dstd_attr_id, resource_uuid\u003dresource[\u0027id\u0027],"},{"line_number":178,"context_line":"            resource_type\u003dresource_type))"},{"line_number":179,"context_line":"        if revision_number \u003d\u003d row.revision_number:"},{"line_number":180,"context_line":"            # no-op neutron db updates don\u0027t result in revision bump"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        if revision_number \u003c row.revision_number:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7974c8ea_e4c20f4e","line":179,"in_reply_to":"f1ec01e9_8d95e5a1","updated":"2024-08-28 18:12:06.000000000","message":"Done","commit_id":"b815abd086029ef4306da18bc5c9f531487dd825"}],"neutron/tests/unit/db/test_ovn_revision_numbers_db.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"f02c5f23ac8358a490a0631e2b893d04b8b062b6","unresolved":true,"context_lines":[{"line_number":71,"context_line":"            row \u003d ovn_rn_db.get_revision_row(self.ctx, self.net[\u0027id\u0027])"},{"line_number":72,"context_line":"            self.assertEqual(123, row.revision_number)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_bump_older_revision(self):"},{"line_number":75,"context_line":"        with db_api.CONTEXT_WRITER.using(self.ctx):"},{"line_number":76,"context_line":"            self._create_initial_revision("},{"line_number":77,"context_line":"                self.net[\u0027id\u0027], ovn_rn_db.TYPE_NETWORKS,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dff76cde_f6001860","line":74,"updated":"2024-09-09 16:22:02.000000000","message":"You can consider the two tests - this and below test_bump_same_revision together - calling a helper function with parametrized value for `net[\u0027revision_number\u0027]`.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a71e11d09a9ff7a577271f6db264b7e927afafaa","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            row \u003d ovn_rn_db.get_revision_row(self.ctx, self.net[\u0027id\u0027])"},{"line_number":72,"context_line":"            self.assertEqual(123, row.revision_number)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def test_bump_older_revision(self):"},{"line_number":75,"context_line":"        with db_api.CONTEXT_WRITER.using(self.ctx):"},{"line_number":76,"context_line":"            self._create_initial_revision("},{"line_number":77,"context_line":"                self.net[\u0027id\u0027], ovn_rn_db.TYPE_NETWORKS,"}],"source_content_type":"text/x-python","patch_set":2,"id":"17da0cb7_a43dcd5a","line":74,"in_reply_to":"dff76cde_f6001860","updated":"2024-11-19 21:56:05.000000000","message":"Done","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9a6d020b5f94b077b8bbac3961d2dbde6f25b913","unresolved":true,"context_lines":[{"line_number":83,"context_line":"            row \u003d ovn_rn_db.get_revision_row(self.ctx, self.net[\u0027id\u0027])"},{"line_number":84,"context_line":"            self.assertEqual(124, row.revision_number)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_bump_same_revision(self):"},{"line_number":87,"context_line":"        with db_api.CONTEXT_WRITER.using(self.ctx):"},{"line_number":88,"context_line":"            self._create_initial_revision("},{"line_number":89,"context_line":"                self.net[\u0027id\u0027], ovn_rn_db.TYPE_NETWORKS,"}],"source_content_type":"text/x-python","patch_set":2,"id":"a1760370_3ebc22c2","line":86,"updated":"2024-09-09 16:20:26.000000000","message":"(Kuba suggests that) some of these tests may be de-duplicated by introducing a helper common function.","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a71e11d09a9ff7a577271f6db264b7e927afafaa","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            row \u003d ovn_rn_db.get_revision_row(self.ctx, self.net[\u0027id\u0027])"},{"line_number":84,"context_line":"            self.assertEqual(124, row.revision_number)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_bump_same_revision(self):"},{"line_number":87,"context_line":"        with db_api.CONTEXT_WRITER.using(self.ctx):"},{"line_number":88,"context_line":"            self._create_initial_revision("},{"line_number":89,"context_line":"                self.net[\u0027id\u0027], ovn_rn_db.TYPE_NETWORKS,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fd0ae9fe_03903e6d","line":86,"in_reply_to":"a1760370_3ebc22c2","updated":"2024-11-19 21:56:05.000000000","message":"Done","commit_id":"536923de6763f997563fc71f9bf380beb47facdc"}]}
