)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0cdbb89289f6fe622a6c365426f834a261140215","unresolved":true,"context_lines":[{"line_number":9,"context_line":"[1] overwrites the port\u0027s binding:profile with the  allocation dict,but"},{"line_number":10,"context_line":"that dict can contain other fields also."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1]: https://review.opendev.org/c/openstack/neutron/+/805637#617"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I687686a673979cd9b95bac7282e836a6435f0521"},{"line_number":15,"context_line":"Partial-Bug: #1922237"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7681996c_fcfcac21","line":12,"updated":"2021-12-03 10:29:53.000000000","message":"you either drop #617 at the end of the url or use the whole url https://review.opendev.org/c/openstack/neutron/+/805637/12/neutron/services/qos/qos_plugin.py#617 so the line number make sense","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0962acd2f8b0a9edd51bf3d7dc723bd822b06f46","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4cb26921_9914ea8b","updated":"2021-12-03 10:07:21.000000000","message":"Maybe a UT (or modifying an existing one) could help to avoid a regression","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0cdbb89289f6fe622a6c365426f834a261140215","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"aef223f8_12604cf2","in_reply_to":"4cb26921_9914ea8b","updated":"2021-12-03 10:29:53.000000000","message":"I agree. \n\nI did a quick grep in the codebase to see if there are other code that overwrites the bindig:profile blindly. Fortunately I find no other places.","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3b1a6eb0252a458caf9d84fe07518ffd620a7008","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0fa7b992_48889b4b","updated":"2021-12-06 19:21:46.000000000","message":"recheck\ntest_revert_cold_migration","commit_id":"45d483d092469685f5b550797e2f5cc4ac54e120"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c8c9ede8bfe83f5ce906e179153ee11e45064535","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d9bdb005_def4da7e","updated":"2021-12-13 12:58:25.000000000","message":"OK, this bug was introduced during Yoga, in I99a49b107b1872ddf83d1d8497a26a8d728feb07 so no backport is needed.","commit_id":"6288dc7259a9032ef528c364f419b1a079a19cd9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a7ce98194dfade5474cdb9c3e061f2209f2d8d08","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"39084cba_8da6d8cb","updated":"2021-12-10 10:36:01.000000000","message":"recheck","commit_id":"6288dc7259a9032ef528c364f419b1a079a19cd9"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"84b2714e8637df43bc1fd9f7ea47977c96e27e08","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c0690e99_adb03671","updated":"2021-12-08 10:24:18.000000000","message":"recheck","commit_id":"6288dc7259a9032ef528c364f419b1a079a19cd9"}],"neutron/services/qos/qos_plugin.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0cdbb89289f6fe622a6c365426f834a261140215","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        #"},{"line_number":614,"context_line":"        # Subscribers should *NOT* modify event payload objects, but this is"},{"line_number":615,"context_line":"        # the only way we can avoid inconsistency in port\u0027s attributes."},{"line_number":616,"context_line":"        if \u0027binding:profile\u0027 in port and port[\u0027binding:profile\u0027]:"},{"line_number":617,"context_line":"            port[\u0027binding:profile\u0027].update({\u0027allocation\u0027: updated_allocation})"},{"line_number":618,"context_line":"        else:"},{"line_number":619,"context_line":"            port[\u0027binding:profile\u0027] \u003d {\u0027allocation\u0027: updated_allocation}"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a0d3e1a_30575a62","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":65},"updated":"2021-12-03 10:29:53.000000000","message":"If want you can avoid the if-else construct:\n\n  allocation \u003d port.get(\u0027binding:profile\u0027, {}) or {}\n  allocation.update(...)\n  port[\u0027binding:profile\u0027] \u003d allocation","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fa4a4ed746866bd74ccf704dc7644c23a5aed119","unresolved":true,"context_lines":[{"line_number":617,"context_line":"            port[\u0027binding:profile\u0027].update({\u0027allocation\u0027: updated_allocation})"},{"line_number":618,"context_line":"        else:"},{"line_number":619,"context_line":"            port[\u0027binding:profile\u0027] \u003d {\u0027allocation\u0027: updated_allocation}"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def _validate_update_port_callback(self, resource, event, trigger,"},{"line_number":622,"context_line":"                                       payload\u003dNone):"},{"line_number":623,"context_line":"        context \u003d payload.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"e2d869de_4571cd75","line":620,"updated":"2021-12-03 11:23:04.000000000","message":"OK based on downstream testing we need to use the orig_port as a source of the binding:profile information. This works in my test env:\n\n  allocation \u003d orig_port.get(\u0027binding:profile\u0027, {}) or {}\n  allocation.update({\u0027allocation\u0027: updated_allocation})\n  port[\u0027binding:profile\u0027] \u003d allocation","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6ac33745cb3db7dc1752287b00d536fff94eab02","unresolved":true,"context_lines":[{"line_number":617,"context_line":"            port[\u0027binding:profile\u0027].update({\u0027allocation\u0027: updated_allocation})"},{"line_number":618,"context_line":"        else:"},{"line_number":619,"context_line":"            port[\u0027binding:profile\u0027] \u003d {\u0027allocation\u0027: updated_allocation}"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def _validate_update_port_callback(self, resource, event, trigger,"},{"line_number":622,"context_line":"                                       payload\u003dNone):"},{"line_number":623,"context_line":"        context \u003d payload.context"}],"source_content_type":"text/x-python","patch_set":1,"id":"980e45bb_593f1c2c","line":620,"in_reply_to":"e2d869de_4571cd75","updated":"2021-12-06 15:33:56.000000000","message":"thanks, playing a little with unit tests, I think I have the clue of it 😊","commit_id":"dea060e95ce39ddf234e5dc59f4b734c386b48e0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"904631a8149ad642b20c4b5677d89a2657728841","unresolved":true,"context_lines":[{"line_number":614,"context_line":"        # Subscribers should *NOT* modify event payload objects, but this is"},{"line_number":615,"context_line":"        # the only way we can avoid inconsistency in port\u0027s attributes."},{"line_number":616,"context_line":"        orig_binding_prof \u003d orig_port.get(\u0027binding:profile\u0027, {})"},{"line_number":617,"context_line":"        orig_binding_prof.update({\u0027allocation\u0027: updated_allocation})"},{"line_number":618,"context_line":"        port[\u0027binding:profile\u0027] \u003d orig_binding_prof"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    def _validate_update_port_callback(self, resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"15006083_8fd78d9f","line":617,"range":{"start_line":617,"start_character":8,"end_line":617,"end_character":68},"updated":"2021-12-07 07:35:27.000000000","message":"this modifies binding profile of orig_port, hence it loses its \"orig\" state. Will it be better to make a copy of the the profile dict?","commit_id":"45d483d092469685f5b550797e2f5cc4ac54e120"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"f465ededede3fd404dab09ac7ffaf55e93b7018d","unresolved":true,"context_lines":[{"line_number":614,"context_line":"        # Subscribers should *NOT* modify event payload objects, but this is"},{"line_number":615,"context_line":"        # the only way we can avoid inconsistency in port\u0027s attributes."},{"line_number":616,"context_line":"        orig_binding_prof \u003d orig_port.get(\u0027binding:profile\u0027, {})"},{"line_number":617,"context_line":"        orig_binding_prof.update({\u0027allocation\u0027: updated_allocation})"},{"line_number":618,"context_line":"        port[\u0027binding:profile\u0027] \u003d orig_binding_prof"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    def _validate_update_port_callback(self, resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da075d50_dfc5f165","line":617,"range":{"start_line":617,"start_character":8,"end_line":617,"end_character":68},"in_reply_to":"15006083_8fd78d9f","updated":"2021-12-07 09:54:42.000000000","message":"thanks","commit_id":"45d483d092469685f5b550797e2f5cc4ac54e120"}]}
