)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"06f9fe89993fa8a4e57b329badd2b11b275daa98","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"77287b66_8faa4d44","updated":"2024-09-19 13:54:40.000000000","message":"Sorry for late jumping in. I\u0027ve managed to tweak the unit test code to workaround the failure. IIUC the current problem resides only within unit tests then I guess this approach is better.\n\nhttps://review.opendev.org/c/openstack/cinder/+/929932","commit_id":"a6db46e6e3d7bbef67f876aa0eeddcfd3fea93c8"}],"cinder/volume/drivers/datacore/utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"1e0ad1cbbb5785ef0092009f181b1d24bb24a208","unresolved":true,"context_lines":[{"line_number":31,"context_line":"        else:"},{"line_number":32,"context_line":"            return \u0027%s:%s\u0027 % (host, port)"},{"line_number":33,"context_line":"    except TypeError:"},{"line_number":34,"context_line":"        return \u0027%s:%s\u0027 % (host, port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def get_first(predicate, source):"}],"source_content_type":"text/x-python","patch_set":1,"id":"72b14480_7b63c91f","line":34,"updated":"2024-08-30 16:24:12.000000000","message":"I think the above is fine, just wanted to point out that it just looks like it could generate a flake8 warning because of all the else and return statements, this is a little simpler and I think the same:\n\ntry:\n    if netutils.is_valid_ipv6(host):\n        return \u0027[%s]:%s\u0027 % (host, port)\nexcept TypeError:\n    pass\nreturn \u0027%s:%s\u0027 % (host, port)\n\n\n... actually, looking in oslo.utils, I don\u0027t think is_valid_ipv6() can return a TypeError, can it? We don\u0027t have a try/except in neutron code.\n\nLooking at the failure in the requirements bump patch, this is the failure:\n\nTypeError: Invalid type: \u003cclass \u0027unittest.mock.MagicMock\u0027\u003e\n\nI think that\u0027s showing the test setUp() or related mocking is wrong, from looking it always seems to return a MagicMock() for all calls, and that won\u0027t be an IP address or string :-/","commit_id":"262e28ea2ca075490350604950ff26d850db193c"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"fa60fb3f93fd5dc51378a65dcad0af26d663c1aa","unresolved":true,"context_lines":[{"line_number":31,"context_line":"        else:"},{"line_number":32,"context_line":"            return \u0027%s:%s\u0027 % (host, port)"},{"line_number":33,"context_line":"    except TypeError:"},{"line_number":34,"context_line":"        return \u0027%s:%s\u0027 % (host, port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def get_first(predicate, source):"}],"source_content_type":"text/x-python","patch_set":1,"id":"f9aff63a_710c112a","line":34,"in_reply_to":"72b14480_7b63c91f","updated":"2024-09-02 08:30:26.000000000","message":"yes, I was thinking on to just change the unit test, but my idea was that it is better change and make failure proof the production code and not just changing the test code. I hope now this part is safe from this exception even if oslo.utils is changed","commit_id":"262e28ea2ca075490350604950ff26d850db193c"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"f611b49882576670b60e93d83bb12877ce573d8b","unresolved":true,"context_lines":[{"line_number":31,"context_line":"        else:"},{"line_number":32,"context_line":"            return \u0027%s:%s\u0027 % (host, port)"},{"line_number":33,"context_line":"    except TypeError:"},{"line_number":34,"context_line":"        return \u0027%s:%s\u0027 % (host, port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def get_first(predicate, source):"}],"source_content_type":"text/x-python","patch_set":1,"id":"0081dc3b_50d7a64c","line":34,"in_reply_to":"f9aff63a_710c112a","updated":"2024-09-02 08:31:21.000000000","message":"thanks, your version looks simpler","commit_id":"262e28ea2ca075490350604950ff26d850db193c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"004e3cbcbcff828f1342a67abd9147bbc84f3a92","unresolved":true,"context_lines":[{"line_number":30,"context_line":"            return \u0027[%s]:%s\u0027 % (host, port)"},{"line_number":31,"context_line":"    except TypeError:"},{"line_number":32,"context_line":"        pass"},{"line_number":33,"context_line":"    return \u0027%s:%s\u0027 % (host, port)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def get_first(predicate, source):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5bcfb3f2_3f222942","line":33,"updated":"2024-09-03 15:26:02.000000000","message":"Thanks for the change.\n\nI still think we\u0027re working around a unit test bug as mentioned in my previous comment, but if no one else has time to look into that this will work for now, and can be reverted later.","commit_id":"a6db46e6e3d7bbef67f876aa0eeddcfd3fea93c8"}]}
