)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"710197405de8701d0f4bc4ec70090ae97845aca1","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some of the OVN maintenance tasks are expected to be run just once and"},{"line_number":10,"context_line":"then they raise periodic.NeverAgain() to not be run anymore. Those tasks"},{"line_number":11,"context_line":"also require to have accuried ovn db lock so that only one of the"},{"line_number":12,"context_line":"maintenance workers really runs them."},{"line_number":13,"context_line":"All those tasks had set 600 seconds as a spacing time so they were run"},{"line_number":14,"context_line":"every 600 seconds. This works fine usually but that may cause small"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"43c2384a_2d9aaf44","line":11,"range":{"start_line":11,"start_character":21,"end_line":11,"end_character":29},"updated":"2024-07-30 12:45:49.000000000","message":"acquired?","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0e3271d840b4b04d321dd05f0a1950a0e058981e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some of the OVN maintenance tasks are expected to be run just once and"},{"line_number":10,"context_line":"then they raise periodic.NeverAgain() to not be run anymore. Those tasks"},{"line_number":11,"context_line":"also require to have accuried ovn db lock so that only one of the"},{"line_number":12,"context_line":"maintenance workers really runs them."},{"line_number":13,"context_line":"All those tasks had set 600 seconds as a spacing time so they were run"},{"line_number":14,"context_line":"every 600 seconds. This works fine usually but that may cause small"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"d55d2aa7_92fef798","line":11,"range":{"start_line":11,"start_character":21,"end_line":11,"end_character":29},"in_reply_to":"43c2384a_2d9aaf44","updated":"2024-07-30 15:04:24.000000000","message":"Done","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"710197405de8701d0f4bc4ec70090ae97845aca1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ee17ad0e_86b78dba","updated":"2024-07-30 12:45:49.000000000","message":"I think closures are preferable here as it will introduce less complexity.","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"7c05a46ac8a0bbb78fe6c67106dac483c304528c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0617420c_cd26fa3d","updated":"2024-07-30 18:28:55.000000000","message":"Thanks! :)","commit_id":"24795b9e54a2a4d0b6ed2383bb411829d60105fa"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"38d59bd2d5574611d3e410c3250ecc2922a20678","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"34aeec9c_09e513b0","updated":"2024-07-31 14:38:22.000000000","message":"The code looks good, just think we should change the message","commit_id":"c8c132f4a88217b914a35d261ed2099a67eb3fc5"},{"author":{"_account_id":34451,"name":"Fernando Royo","email":"froyo@redhat.com","username":"froyo"},"change_message_id":"851ce31b5532ac4fe56c50702200378038854711","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ad9b64fb_e25e727e","updated":"2024-08-01 10:57:13.000000000","message":"Thx Slawek for this!!","commit_id":"04c217bcd0eda07d52a60121b6f86236ba6e26ee"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"19acfd45ca80525f1e4a9c64e960f2d51e4bc419","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"bb42b3f8_3dfc017b","updated":"2024-08-02 05:59:28.000000000","message":"recheck neutron-tempest-plugin-ovn","commit_id":"04c217bcd0eda07d52a60121b6f86236ba6e26ee"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"048423fe58236f3df5fcdfc4ae48a23b82bec183","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"b581fe84_d9a55731","updated":"2024-08-02 06:02:10.000000000","message":"recheck test_list_pagination_page_reverse_with_href_links","commit_id":"04c217bcd0eda07d52a60121b6f86236ba6e26ee"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3449cb3ccf92e547877d4ac250c6b8c28075e5ac","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    return wrapper"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def has_lock_periodic_with_run_limit(*args, **kwargs):"},{"line_number":75,"context_line":"    def wrapper(f):"},{"line_number":76,"context_line":"        @functools.wraps(f)"},{"line_number":77,"context_line":"        @periodics.periodic(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"72b6ef41_e342cdf1","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":36},"updated":"2024-07-30 13:24:32.000000000","message":"I would just append the other method \"has_lock_periodic\", passing a kwarg variable called, for example, \"periodic_run_limit\", that should be removed from kwargs before executing \"decorator\".","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e651970c94d05f48acd6cd4d338c6293c361adb1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    return wrapper"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def has_lock_periodic_with_run_limit(*args, **kwargs):"},{"line_number":75,"context_line":"    def wrapper(f):"},{"line_number":76,"context_line":"        @functools.wraps(f)"},{"line_number":77,"context_line":"        @periodics.periodic(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"d3176641_24bd46b1","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":36},"in_reply_to":"72b6ef41_e342cdf1","updated":"2024-07-31 09:59:20.000000000","message":"Done","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"7c05a46ac8a0bbb78fe6c67106dac483c304528c","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    return wrapper"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def has_lock_periodic_with_run_limit(*args, **kwargs):"},{"line_number":75,"context_line":"    def wrapper(f):"},{"line_number":76,"context_line":"        @functools.wraps(f)"},{"line_number":77,"context_line":"        @periodics.periodic(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b7b1fb99_962e2a9b","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":36},"in_reply_to":"72b6ef41_e342cdf1","updated":"2024-07-30 18:28:55.000000000","message":"I think the previous decorator is small enough that imho the copy\u0026pasted content is tolerable. I\u0027d just add doctext to both decorators to let readers know what to use under which conditions.","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ca087ea5162beb9ab8ed9a04168e7ed113039960","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    return wrapper"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def has_lock_periodic_with_run_limit(*args, **kwargs):"},{"line_number":75,"context_line":"    def wrapper(f):"},{"line_number":76,"context_line":"        @functools.wraps(f)"},{"line_number":77,"context_line":"        @periodics.periodic(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"92b5defa_aa2c3a47","line":74,"range":{"start_line":74,"start_character":4,"end_line":74,"end_character":36},"in_reply_to":"b7b1fb99_962e2a9b","updated":"2024-07-31 10:04:08.000000000","message":"Done","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"710197405de8701d0f4bc4ec70090ae97845aca1","unresolved":true,"context_lines":[{"line_number":187,"context_line":"        self._idl \u003d self._nb_idl.idl"},{"line_number":188,"context_line":"        self._idl.set_lock(\u0027ovn_db_inconsistencies_periodics\u0027)"},{"line_number":189,"context_line":"        self._sync_timer \u003d timeutils.StopWatch()"},{"line_number":190,"context_line":"        self._task_retries \u003d collections.defaultdict(int)"},{"line_number":191,"context_line":"        super(DBInconsistenciesPeriodics, self).__init__(ovn_client)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self._resources_func_map \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"aaf90b90_df6f0e6b","line":190,"updated":"2024-07-30 12:45:49.000000000","message":"Given that this is related to the decorator and not to the instance of this class it makes more sense to use it there in a closure","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3449cb3ccf92e547877d4ac250c6b8c28075e5ac","unresolved":true,"context_lines":[{"line_number":187,"context_line":"        self._idl \u003d self._nb_idl.idl"},{"line_number":188,"context_line":"        self._idl.set_lock(\u0027ovn_db_inconsistencies_periodics\u0027)"},{"line_number":189,"context_line":"        self._sync_timer \u003d timeutils.StopWatch()"},{"line_number":190,"context_line":"        self._task_retries \u003d collections.defaultdict(int)"},{"line_number":191,"context_line":"        super(DBInconsistenciesPeriodics, self).__init__(ovn_client)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self._resources_func_map \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"983e57e5_c817de29","line":190,"in_reply_to":"aaf90b90_df6f0e6b","updated":"2024-07-30 13:24:32.000000000","message":"+1","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0e3271d840b4b04d321dd05f0a1950a0e058981e","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        self._idl \u003d self._nb_idl.idl"},{"line_number":188,"context_line":"        self._idl.set_lock(\u0027ovn_db_inconsistencies_periodics\u0027)"},{"line_number":189,"context_line":"        self._sync_timer \u003d timeutils.StopWatch()"},{"line_number":190,"context_line":"        self._task_retries \u003d collections.defaultdict(int)"},{"line_number":191,"context_line":"        super(DBInconsistenciesPeriodics, self).__init__(ovn_client)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        self._resources_func_map \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"fc3f49e6_3fdf81a6","line":190,"in_reply_to":"aaf90b90_df6f0e6b","updated":"2024-07-30 15:04:24.000000000","message":"Done","commit_id":"a8d8a3f207e4b7b3f7ce8e6d753f979da5a71047"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"38d59bd2d5574611d3e410c3250ecc2922a20678","unresolved":true,"context_lines":[{"line_number":66,"context_line":"            # This periodic task is included in DBInconsistenciesPeriodics"},{"line_number":67,"context_line":"            # since it uses the lock to ensure only one worker is executing"},{"line_number":68,"context_line":"            # additonally, if periodic_run_limit parameter with value \u003e 0 is"},{"line_number":69,"context_line":"            # provided and lock is not accuired for periodic_run_limit"},{"line_number":70,"context_line":"            # times, task will not be run anymore by this maintenance worker"},{"line_number":71,"context_line":"            nonlocal _retries"},{"line_number":72,"context_line":"            if not self.has_lock:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffc8af9d_993dff28","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":47},"updated":"2024-07-31 14:38:22.000000000","message":"nit: s/acquired","commit_id":"c8c132f4a88217b914a35d261ed2099a67eb3fc5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2dd633aa2b020f14d1f66c023990b5192adfcb20","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            # This periodic task is included in DBInconsistenciesPeriodics"},{"line_number":67,"context_line":"            # since it uses the lock to ensure only one worker is executing"},{"line_number":68,"context_line":"            # additonally, if periodic_run_limit parameter with value \u003e 0 is"},{"line_number":69,"context_line":"            # provided and lock is not accuired for periodic_run_limit"},{"line_number":70,"context_line":"            # times, task will not be run anymore by this maintenance worker"},{"line_number":71,"context_line":"            nonlocal _retries"},{"line_number":72,"context_line":"            if not self.has_lock:"}],"source_content_type":"text/x-python","patch_set":5,"id":"865ff705_35cf9b7e","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":47},"in_reply_to":"ffc8af9d_993dff28","updated":"2024-07-31 15:08:47.000000000","message":"Done","commit_id":"c8c132f4a88217b914a35d261ed2099a67eb3fc5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"38d59bd2d5574611d3e410c3250ecc2922a20678","unresolved":true,"context_lines":[{"line_number":72,"context_line":"            if not self.has_lock:"},{"line_number":73,"context_line":"                if periodic_run_limit \u003e 0:"},{"line_number":74,"context_line":"                    if _retries \u003e\u003d periodic_run_limit:"},{"line_number":75,"context_line":"                        LOG.debug(\"Task \u0027%s\u0027 run %s times. Limit reached.\","},{"line_number":76,"context_line":"                                  f, _retries)"},{"line_number":77,"context_line":"                        raise periodics.NeverAgain()"},{"line_number":78,"context_line":"                    _retries +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"6f3e06b3_f83f719f","line":75,"range":{"start_line":75,"start_character":45,"end_line":75,"end_character":48},"updated":"2024-07-31 14:38:22.000000000","message":"nit: s/ran or \u0027has run\u0027\n\nAnd thinking about it some more, we might as well be more descriptive since the string doesn\u0027t say why or what it means, so someone would have to look at the code to know. How about:\n\n\"Have not been able to acquire lock to run task \u0027%s\u0027 after %s tries, limit reached. No more attempts will be made.\"","commit_id":"c8c132f4a88217b914a35d261ed2099a67eb3fc5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2dd633aa2b020f14d1f66c023990b5192adfcb20","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            if not self.has_lock:"},{"line_number":73,"context_line":"                if periodic_run_limit \u003e 0:"},{"line_number":74,"context_line":"                    if _retries \u003e\u003d periodic_run_limit:"},{"line_number":75,"context_line":"                        LOG.debug(\"Task \u0027%s\u0027 run %s times. Limit reached.\","},{"line_number":76,"context_line":"                                  f, _retries)"},{"line_number":77,"context_line":"                        raise periodics.NeverAgain()"},{"line_number":78,"context_line":"                    _retries +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"4adc8c6f_3239703f","line":75,"range":{"start_line":75,"start_character":45,"end_line":75,"end_character":48},"in_reply_to":"6f3e06b3_f83f719f","updated":"2024-07-31 15:08:47.000000000","message":"Done","commit_id":"c8c132f4a88217b914a35d261ed2099a67eb3fc5"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_maintenance.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ca087ea5162beb9ab8ed9a04168e7ed113039960","unresolved":true,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        worker_mock \u003d mock.MagicMock()"},{"line_number":54,"context_line":"        worker_mock.has_lock \u003d True"},{"line_number":55,"context_line":"t"},{"line_number":56,"context_line":"        for _ in range(3):"},{"line_number":57,"context_line":"            test_maintenance_task(worker_mock)"},{"line_number":58,"context_line":"        self.assertEqual(3, run_counter)"}],"source_content_type":"text/x-python","patch_set":4,"id":"c7cf29b9_4b042697","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":1},"updated":"2024-07-31 10:04:08.000000000","message":"remove this, please","commit_id":"2a63aac9820723d44abbf40e64edd4d9c46a2cf7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5d429c91d0e78f9a6a50ca182e101357fa3b6d35","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        worker_mock \u003d mock.MagicMock()"},{"line_number":54,"context_line":"        worker_mock.has_lock \u003d True"},{"line_number":55,"context_line":"t"},{"line_number":56,"context_line":"        for _ in range(3):"},{"line_number":57,"context_line":"            test_maintenance_task(worker_mock)"},{"line_number":58,"context_line":"        self.assertEqual(3, run_counter)"}],"source_content_type":"text/x-python","patch_set":4,"id":"c4bf8e5c_c0e5eac3","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":1},"in_reply_to":"c7cf29b9_4b042697","updated":"2024-07-31 10:09:22.000000000","message":"Done. Sorry for that 😊","commit_id":"2a63aac9820723d44abbf40e64edd4d9c46a2cf7"}]}
