)]}'
{"neutron/common/utils.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5cdc2832da92d831da61813d5a06720ba2a36cf","unresolved":true,"context_lines":[{"line_number":987,"context_line":"def skip_exceptions(exceptions\u003dNone):"},{"line_number":988,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    # NOTE(ralonsoh): could me rehomed to neutron-lib."},{"line_number":991,"context_line":"    if not exceptions:"},{"line_number":992,"context_line":"        exceptions \u003d [Exception]"},{"line_number":993,"context_line":"    if not isinstance(exceptions, list):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ce3bf1f0_53d21daf","line":990,"range":{"start_line":990,"start_character":28,"end_line":990,"end_character":30},"updated":"2021-08-11 11:21:11.000000000","message":"nit: be","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"238dcb5d7adca212396b1f5b9ed4cd56b89c3cd7","unresolved":false,"context_lines":[{"line_number":987,"context_line":"def skip_exceptions(exceptions\u003dNone):"},{"line_number":988,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    # NOTE(ralonsoh): could me rehomed to neutron-lib."},{"line_number":991,"context_line":"    if not exceptions:"},{"line_number":992,"context_line":"        exceptions \u003d [Exception]"},{"line_number":993,"context_line":"    if not isinstance(exceptions, list):"}],"source_content_type":"text/x-python","patch_set":1,"id":"86e14406_6a77f985","line":990,"range":{"start_line":990,"start_character":28,"end_line":990,"end_character":30},"in_reply_to":"ce3bf1f0_53d21daf","updated":"2021-08-12 08:06:29.000000000","message":"Done","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"41ccedbb1fc025db1424cc549f538b8b8b4749a2","unresolved":true,"context_lines":[{"line_number":988,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    # NOTE(ralonsoh): could me rehomed to neutron-lib."},{"line_number":991,"context_line":"    if not exceptions:"},{"line_number":992,"context_line":"        exceptions \u003d [Exception]"},{"line_number":993,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":994,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":995,"context_line":""},{"line_number":996,"context_line":"    def decorator(function):"},{"line_number":997,"context_line":"        @functools.wraps(function)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ee1c1b1c_1c3c6bf1","line":994,"range":{"start_line":991,"start_character":4,"end_line":994,"end_character":33},"updated":"2021-08-12 06:51:09.000000000","message":"if not exceptions or not isinstance(exceptions, list):\n        exceptions \u003d [Exception]\n\nif conditions can be merged","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"68ea6554f246a53ac12e653a6b24e4c4ce62ee1f","unresolved":true,"context_lines":[{"line_number":988,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    # NOTE(ralonsoh): could me rehomed to neutron-lib."},{"line_number":991,"context_line":"    if not exceptions:"},{"line_number":992,"context_line":"        exceptions \u003d [Exception]"},{"line_number":993,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":994,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":995,"context_line":""},{"line_number":996,"context_line":"    def decorator(function):"},{"line_number":997,"context_line":"        @functools.wraps(function)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5c259d84_1fdacd33","line":994,"range":{"start_line":991,"start_character":4,"end_line":994,"end_character":33},"in_reply_to":"d23933a9_0b19c8aa","updated":"2021-08-12 11:11:31.000000000","message":"ah, misread the words","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"238dcb5d7adca212396b1f5b9ed4cd56b89c3cd7","unresolved":true,"context_lines":[{"line_number":988,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"    # NOTE(ralonsoh): could me rehomed to neutron-lib."},{"line_number":991,"context_line":"    if not exceptions:"},{"line_number":992,"context_line":"        exceptions \u003d [Exception]"},{"line_number":993,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":994,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":995,"context_line":""},{"line_number":996,"context_line":"    def decorator(function):"},{"line_number":997,"context_line":"        @functools.wraps(function)"}],"source_content_type":"text/x-python","patch_set":1,"id":"d23933a9_0b19c8aa","line":994,"range":{"start_line":991,"start_character":4,"end_line":994,"end_character":33},"in_reply_to":"ee1c1b1c_1c3c6bf1","updated":"2021-08-12 08:06:29.000000000","message":"L992 and L994 are different, I can\u0027t merge them","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5cdc2832da92d831da61813d5a06720ba2a36cf","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"            except Exception as exc:"},{"line_number":1002,"context_line":"                with excutils.save_and_reraise_exception() as ctx:"},{"line_number":1003,"context_line":"                    if issubclass(type(exc), tuple(exceptions)):"},{"line_number":1004,"context_line":"                        ctx.reraise \u003d False"},{"line_number":1005,"context_line":"        return wrapper"},{"line_number":1006,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":1,"id":"ee063adf_3982fcf2","line":1004,"range":{"start_line":1004,"start_character":24,"end_line":1004,"end_character":43},"updated":"2021-08-11 11:21:11.000000000","message":"not sure save_and_reraise_exception will log smth in case of reraise \u003d\u003d False, maybe a warning log will be useful.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"238dcb5d7adca212396b1f5b9ed4cd56b89c3cd7","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"            except Exception as exc:"},{"line_number":1002,"context_line":"                with excutils.save_and_reraise_exception() as ctx:"},{"line_number":1003,"context_line":"                    if issubclass(type(exc), tuple(exceptions)):"},{"line_number":1004,"context_line":"                        ctx.reraise \u003d False"},{"line_number":1005,"context_line":"        return wrapper"},{"line_number":1006,"context_line":"    return decorator"}],"source_content_type":"text/x-python","patch_set":1,"id":"02e1e497_c3395bd1","line":1004,"range":{"start_line":1004,"start_character":24,"end_line":1004,"end_character":43},"in_reply_to":"ee063adf_3982fcf2","updated":"2021-08-12 08:06:29.000000000","message":"Not a warning but a info message. When this decorator is used we are explicitly shadowing the exceptions because we don\u0027t care. A warning message could look suspicious here.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"466a9eb4a0a4cc99e2c3c92fab6aee7b6262c52c","unresolved":true,"context_lines":[{"line_number":995,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"    # NOTE(ralonsoh): could be rehomed to neutron-lib."},{"line_number":998,"context_line":"    if not exceptions:"},{"line_number":999,"context_line":"        exceptions \u003d [Exception]"},{"line_number":1000,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":1001,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"04889310_1a90e85b","line":999,"range":{"start_line":998,"start_character":4,"end_line":999,"end_character":32},"updated":"2021-08-23 13:06:51.000000000","message":"isn\u0027t this too wide?","commit_id":"b4492508fb9b745febd6e343057869dcc3c24849"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a50247c841c729c701dcff32267fea41cbf9fb0f","unresolved":true,"context_lines":[{"line_number":995,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"    # NOTE(ralonsoh): could be rehomed to neutron-lib."},{"line_number":998,"context_line":"    if not exceptions:"},{"line_number":999,"context_line":"        exceptions \u003d [Exception]"},{"line_number":1000,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":1001,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"db6a0d78_b54187cd","line":999,"range":{"start_line":998,"start_character":4,"end_line":999,"end_character":32},"in_reply_to":"04889310_1a90e85b","updated":"2021-08-23 13:11:33.000000000","message":"This is up to the developer. If no exception is given, all exceptions will be skipped.","commit_id":"b4492508fb9b745febd6e343057869dcc3c24849"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"522e6538257c421216cfd9a595b9f60278e809c2","unresolved":false,"context_lines":[{"line_number":995,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"    # NOTE(ralonsoh): could be rehomed to neutron-lib."},{"line_number":998,"context_line":"    if not exceptions:"},{"line_number":999,"context_line":"        exceptions \u003d [Exception]"},{"line_number":1000,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":1001,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"c39afb29_ba09e712","line":999,"range":{"start_line":998,"start_character":4,"end_line":999,"end_character":32},"in_reply_to":"50523f94_5c15d96c","updated":"2021-08-25 12:59:23.000000000","message":"Done","commit_id":"b4492508fb9b745febd6e343057869dcc3c24849"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"172c41d6306d655b4adffa282ab9033c029bfdc5","unresolved":true,"context_lines":[{"line_number":995,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"    # NOTE(ralonsoh): could be rehomed to neutron-lib."},{"line_number":998,"context_line":"    if not exceptions:"},{"line_number":999,"context_line":"        exceptions \u003d [Exception]"},{"line_number":1000,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":1001,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"50523f94_5c15d96c","line":999,"range":{"start_line":998,"start_character":4,"end_line":999,"end_character":32},"in_reply_to":"bf80643a_72fc1f98","updated":"2021-08-25 12:58:45.000000000","message":"+1, that sounds good","commit_id":"b4492508fb9b745febd6e343057869dcc3c24849"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"051b9c3ce3f5e72a82c69a4bb9515e0acaf296e8","unresolved":true,"context_lines":[{"line_number":995,"context_line":"    \"\"\"Decorator to catch and hide any provided exception in the argument\"\"\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"    # NOTE(ralonsoh): could be rehomed to neutron-lib."},{"line_number":998,"context_line":"    if not exceptions:"},{"line_number":999,"context_line":"        exceptions \u003d [Exception]"},{"line_number":1000,"context_line":"    if not isinstance(exceptions, list):"},{"line_number":1001,"context_line":"        exceptions \u003d [exceptions]"},{"line_number":1002,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf80643a_72fc1f98","line":999,"range":{"start_line":998,"start_character":4,"end_line":999,"end_character":32},"in_reply_to":"db6a0d78_b54187cd","updated":"2021-08-24 11:32:06.000000000","message":"Or, if you prefer, we can make mandatory the \"exceptions\" exception/list of exceptions. That will remove L998-999","commit_id":"b4492508fb9b745febd6e343057869dcc3c24849"}],"neutron/scheduler/base_resource_filter.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b5cdc2832da92d831da61813d5a06720ba2a36cf","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"208c21b6_9646b8cf","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"updated":"2021-08-11 11:21:11.000000000","message":"Maybe reflect that in method name, like \u0027try_bind\u0027 or \u0027try_inc_load\u0027 to better reflect what this method is doing (not sure what the intent was to name it \u0027bind\u0027)","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"41ccedbb1fc025db1424cc549f538b8b8b4749a2","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"85652dfe_f217f00e","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"in_reply_to":"208c21b6_9646b8cf","updated":"2021-08-12 06:51:09.000000000","message":"Seems only used for networking binding DHCP agent in network scheduling process. Renaming the function is good for code reading to specify what is this function is doing.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"dcadfcc192b6e15925e163e2246b2c09ea071864","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"729dbaf3_dce24ac2","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"in_reply_to":"2c9e2d18_f237d8dd","updated":"2021-08-12 09:05:10.000000000","message":"I\u0027m thinking about it from caller code perspective: if I see \u0027scheduler.bind()\u0027 somewhere I expect that it will rather do binding or fail; when I read further code I assume binding was done. Skipped DB error and unsuccessful binding is kind of unexpected in caller code, and seems not quite correct.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"02a02bfe9894030abf6b17675df88686fee5de55","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"75614615_f6e7ef0d","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"in_reply_to":"729dbaf3_dce24ac2","updated":"2021-08-12 09:10:19.000000000","message":"try/except in caller code is explicit and clear. \"scheduler.try_bind()\" is not that explicit but still suggests that binding might not be done after it.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c8ed818c55e0bd25d3fb44bfbc161df0da597795","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"92b42ccd_64757003","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"in_reply_to":"85652dfe_f217f00e","updated":"2021-08-12 07:49:49.000000000","message":"but it\u0027s part of Base class, I\u0027m not sure if we should change name of it just like that :)","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"31809b18cc36ecf4950bab9d59fd89db3a415615","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    def filter_agents(self, plugin, context, resource):"},{"line_number":28,"context_line":"        \"\"\"Return the agents that can host the resource.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @n_utils.skip_exceptions(db_exc.DBError)"},{"line_number":31,"context_line":"    def bind(self, context, agents, resource_id, force_scheduling\u003dFalse):"},{"line_number":32,"context_line":"        \"\"\"Bind the resource to the agents.\"\"\""},{"line_number":33,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"2c9e2d18_f237d8dd","line":30,"range":{"start_line":30,"start_character":4,"end_line":30,"end_character":44},"in_reply_to":"92b42ccd_64757003","updated":"2021-08-12 08:56:45.000000000","message":"I\u0027m not going to change a base class method name, regardless of the use, in this patch. If needed, that could be done opening another bug.\n\nThe decorator itself is changing the function. You need to read both, the decorator and the method name. The method is not trying to bind, it is actually binding and failing if not possible. The decorator is the one skipping any defined error.","commit_id":"1180d5fc81a0dd798ad11fb0f0252208b91aab41"}]}
