)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"f9401dd9c3afa58637f2e18a1efd1aacff0017ee","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangbailin \u003czhangbailin@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-07-30 10:35:41 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Optimize _create_and_bind_arqs logic in conducor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Optimize the _create_and_bind_arqs logic in conducor to increase the"},{"line_number":10,"context_line":"readability and scalability of the code."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9f560f44_41a86f76","line":7,"range":{"start_line":7,"start_character":40,"end_line":7,"end_character":48},"updated":"2020-08-13 07:05:43.000000000","message":"conductor","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"43311d54bdb0e170642d6ef742e915680ff1381e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangbailin \u003czhangbailin@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-07-30 10:35:41 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Optimize _create_and_bind_arqs logic in conducor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Optimize the _create_and_bind_arqs logic in conducor to increase the"},{"line_number":10,"context_line":"readability and scalability of the code."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9f560f44_fe1b757d","line":7,"range":{"start_line":7,"start_character":40,"end_line":7,"end_character":48},"in_reply_to":"9f560f44_41a86f76","updated":"2020-08-25 07:51:36.000000000","message":"Done","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"}],"nova/conductor/manager.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6ed15bba13d092c02d4e8e9ca494ec0a7bf96c5a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            accel_uuids \u003d []"},{"line_number":842,"context_line":"            if dp_name:"},{"line_number":843,"context_line":"                try:"},{"line_number":844,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":845,"context_line":"                        local_reqspec.get_request_group_mapping())"},{"line_number":846,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("},{"line_number":847,"context_line":"                        context, dp_name, instance.uuid,"},{"line_number":848,"context_line":"                        host.nodename, resource_provider_mapping)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_ee5b7951","line":845,"range":{"start_line":844,"start_character":0,"end_line":845,"end_character":66},"updated":"2020-05-11 10:13:05.000000000","message":"can we drag this out of the try-except? I don\u0027t see anything obvious that could raise an exception in here","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"62e0a55d7aca3bc400589e06d4bfd6e834cae01e","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            accel_uuids \u003d []"},{"line_number":842,"context_line":"            if dp_name:"},{"line_number":843,"context_line":"                try:"},{"line_number":844,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":845,"context_line":"                        local_reqspec.get_request_group_mapping())"},{"line_number":846,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("},{"line_number":847,"context_line":"                        context, dp_name, instance.uuid,"},{"line_number":848,"context_line":"                        host.nodename, resource_provider_mapping)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_e7d0a153","line":845,"range":{"start_line":844,"start_character":0,"end_line":845,"end_character":66},"in_reply_to":"ff570b3c_ee5b7951","updated":"2020-05-12 10:40:15.000000000","message":"Of course.","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6ed15bba13d092c02d4e8e9ca494ec0a7bf96c5a","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"            accel_uuids \u003d []"},{"line_number":1627,"context_line":"            if dp_name:"},{"line_number":1628,"context_line":"                try:"},{"line_number":1629,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":1630,"context_line":"                        request_spec.get_request_group_mapping())"},{"line_number":1631,"context_line":"                    # Using nodename instead of hostname. See:"},{"line_number":1632,"context_line":"                    # http://lists.openstack.org/pipermail/openstack-discuss/2019-November/011044.html  # noqa"},{"line_number":1633,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_2e56112b","line":1630,"range":{"start_line":1629,"start_character":0,"end_line":1630,"end_character":65},"updated":"2020-05-11 10:13:05.000000000","message":"ditto","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"62e0a55d7aca3bc400589e06d4bfd6e834cae01e","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"            accel_uuids \u003d []"},{"line_number":1627,"context_line":"            if dp_name:"},{"line_number":1628,"context_line":"                try:"},{"line_number":1629,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":1630,"context_line":"                        request_spec.get_request_group_mapping())"},{"line_number":1631,"context_line":"                    # Using nodename instead of hostname. See:"},{"line_number":1632,"context_line":"                    # http://lists.openstack.org/pipermail/openstack-discuss/2019-November/011044.html  # noqa"},{"line_number":1633,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_87bf25fa","line":1630,"range":{"start_line":1629,"start_character":0,"end_line":1630,"end_character":65},"in_reply_to":"ff570b3c_2e56112b","updated":"2020-05-12 10:40:15.000000000","message":"Done","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6ed15bba13d092c02d4e8e9ca494ec0a7bf96c5a","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":1630,"context_line":"                        request_spec.get_request_group_mapping())"},{"line_number":1631,"context_line":"                    # Using nodename instead of hostname. See:"},{"line_number":1632,"context_line":"                    # http://lists.openstack.org/pipermail/openstack-discuss/2019-November/011044.html  # noqa"},{"line_number":1633,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("},{"line_number":1634,"context_line":"                        context, dp_name, instance.uuid,"},{"line_number":1635,"context_line":"                        host.nodename, resource_provider_mapping)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_4e2ee5a5","line":1632,"range":{"start_line":1632,"start_character":102,"end_line":1632,"end_character":110},"updated":"2020-05-11 10:13:05.000000000","message":"not really related, but I\u0027m pretty sure this isn\u0027t necessary. flake8 allows long comments without spaces in them (URLs, essentially)","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"62e0a55d7aca3bc400589e06d4bfd6e834cae01e","unresolved":false,"context_lines":[{"line_number":1629,"context_line":"                    resource_provider_mapping \u003d ("},{"line_number":1630,"context_line":"                        request_spec.get_request_group_mapping())"},{"line_number":1631,"context_line":"                    # Using nodename instead of hostname. See:"},{"line_number":1632,"context_line":"                    # http://lists.openstack.org/pipermail/openstack-discuss/2019-November/011044.html  # noqa"},{"line_number":1633,"context_line":"                    accel_uuids \u003d self._create_and_bind_arqs("},{"line_number":1634,"context_line":"                        context, dp_name, instance.uuid,"},{"line_number":1635,"context_line":"                        host.nodename, resource_provider_mapping)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_67bc9105","line":1632,"range":{"start_line":1632,"start_character":102,"end_line":1632,"end_character":110},"in_reply_to":"ff570b3c_4e2ee5a5","updated":"2020-05-12 10:40:15.000000000","message":"Done","commit_id":"915841b5ea7dd98924fa57a573f59f804b5ff69f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"2d47696a8d39ccb0536add043278a589371b459c","unresolved":false,"context_lines":[{"line_number":1645,"context_line":"                except Exception as exc:"},{"line_number":1646,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":1647,"context_line":"                        self._cleanup_build_artifacts("},{"line_number":1648,"context_line":"                            context, exc, instances, build_requests, request_specs,"},{"line_number":1649,"context_line":"                            block_device_mapping, tags, cell_mapping_cache)"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"            # NOTE(danms): Compute RPC expects security group names or ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_829ba070","line":1648,"updated":"2020-07-28 03:15:15.000000000","message":"pep8: E501 line too long (83 \u003e 79 characters)","commit_id":"d4d34c6b8ec5df43072fd5633d5bb75ef6d82549"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"cc5c93dd02b158ad5494308e3034ef2ab913cd4e","unresolved":false,"context_lines":[{"line_number":837,"context_line":"            LOG.debug(\"Selected host: %s; Selected node: %s; Alternates: %s\","},{"line_number":838,"context_line":"                    host.service_host, host.nodename, alts, instance\u003dinstance)"},{"line_number":839,"context_line":""},{"line_number":840,"context_line":"            dp_name \u003d instance.flavor.extra_specs.get(\u0027accel:device_profile\u0027)"},{"line_number":841,"context_line":"            accel_uuids \u003d []"},{"line_number":842,"context_line":"            if dp_name:"},{"line_number":843,"context_line":"                try:"},{"line_number":844,"context_line":"                    accel_uuids \u003d self._create_and_bind_arq_for_instance("},{"line_number":845,"context_line":"                        context, dp_name, instance, host, local_reqspec)"},{"line_number":846,"context_line":"                except Exception as exc:"},{"line_number":847,"context_line":"                    LOG.exception(\u0027Failed to reschedule. Reason: %s\u0027, exc)"},{"line_number":848,"context_line":"                    self._cleanup_when_reschedule_fails("},{"line_number":849,"context_line":"                        context, instance, exc, legacy_request_spec,"},{"line_number":850,"context_line":"                        requested_networks)"},{"line_number":851,"context_line":"                    continue"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"            self.compute_rpcapi.build_and_run_instance(context,"},{"line_number":854,"context_line":"                    instance\u003dinstance, host\u003dhost.service_host, image\u003dimage,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_092a757d","line":851,"range":{"start_line":840,"start_character":0,"end_line":851,"end_character":28},"updated":"2020-08-25 07:59:41.000000000","message":"I don\u0027t think this helps much about scalability. The only thing the if dp_name condition guards is a call to request_spec.get_request_group_mapping() which is pretty cheap. In the other hand this is more like decreasing readability due to the extra indent and due to leaking arq related information, the fact that it depends on dp_name) out from _create_and_bind_arq_for_instance()","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"cc5c93dd02b158ad5494308e3034ef2ab913cd4e","unresolved":false,"context_lines":[{"line_number":1638,"context_line":""},{"line_number":1639,"context_line":"            dp_name \u003d instance.flavor.extra_specs.get(\u0027accel:device_profile\u0027)"},{"line_number":1640,"context_line":"            accel_uuids \u003d []"},{"line_number":1641,"context_line":"            if dp_name:"},{"line_number":1642,"context_line":"                try:"},{"line_number":1643,"context_line":"                    accel_uuids \u003d self._create_and_bind_arq_for_instance("},{"line_number":1644,"context_line":"                        context, dp_name, instance, host, request_spec)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_2923f9a8","line":1641,"updated":"2020-08-25 07:59:41.000000000","message":"ditto","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"c7f2755810cc6613d2520a9106d7ac2131903f45","unresolved":false,"context_lines":[{"line_number":1668,"context_line":"                    limits\u003dhost.limits, host_list\u003dhost_list,"},{"line_number":1669,"context_line":"                    accel_uuids\u003daccel_uuids)"},{"line_number":1670,"context_line":""},{"line_number":1671,"context_line":"    def _create_and_bind_arqs(self, context, dp_name, instance_uuid,"},{"line_number":1672,"context_line":"                              hostname, resource_provider_mapping):"},{"line_number":1673,"context_line":"        \"\"\"Create ARQs, determine their RPs and initiate ARQ binding."},{"line_number":1674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_e197033a","line":1671,"range":{"start_line":1671,"start_character":35,"end_line":1671,"end_character":68},"updated":"2020-08-13 07:04:31.000000000","message":"It is ok. But IMO it is not necessary to switch instance_uuid position here.","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"43311d54bdb0e170642d6ef742e915680ff1381e","unresolved":false,"context_lines":[{"line_number":1668,"context_line":"                    limits\u003dhost.limits, host_list\u003dhost_list,"},{"line_number":1669,"context_line":"                    accel_uuids\u003daccel_uuids)"},{"line_number":1670,"context_line":""},{"line_number":1671,"context_line":"    def _create_and_bind_arqs(self, context, dp_name, instance_uuid,"},{"line_number":1672,"context_line":"                              hostname, resource_provider_mapping):"},{"line_number":1673,"context_line":"        \"\"\"Create ARQs, determine their RPs and initiate ARQ binding."},{"line_number":1674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_9e27d9c7","line":1671,"range":{"start_line":1671,"start_character":35,"end_line":1671,"end_character":68},"in_reply_to":"9f560f44_e197033a","updated":"2020-08-25 07:51:36.000000000","message":"We should think of the next commit, so add the dp_name before the instance_uuid.","commit_id":"8505b2e776a20a3cf32c5b8ecce3b33d86120e86"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"079af07b46be6bd71f7e65a3c5cb248cef8089ee","unresolved":false,"context_lines":[{"line_number":862,"context_line":"                    limits\u003dhost.limits, host_list\u003dhost_list,"},{"line_number":863,"context_line":"                    accel_uuids\u003daccel_uuids)"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def _create_and_bind_arq_for_instance(self, context, dp_name, instance,"},{"line_number":866,"context_line":"                                          host, request_spec):"},{"line_number":867,"context_line":"        try:"},{"line_number":868,"context_line":"            resource_provider_mapping \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_c9fb5d44","line":865,"updated":"2020-08-25 08:44:34.000000000","message":"I do agree with gibi here. You\u0027re even not factorizing a call, you just provide a new argument by punting the flavor verification.\n\nUnless you want to use the same method in a new change (but then you should do the factorize there) I don\u0027t see why we should accept this.","commit_id":"552be5db019307888a314ab80d908abb2caed2c3"}]}
