)]}'
{"neutron/api/extensions.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"cb08534a070bb53fcf47f794b9eba806b7d916f7","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        for ext in processed_exts.values():"},{"line_number":512,"context_line":"            ext.update_attributes_map(attr_map)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"    def check_faulty_extensions(self, faulty_extensions):"},{"line_number":515,"context_line":"        \"\"\"Raise for non-default faulty extensions."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        Gracefully fail for defective default extensions, which will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_a909f4df","line":514,"range":{"start_line":514,"start_character":8,"end_line":514,"end_character":31},"updated":"2016-08-08 13:12:35.000000000","message":"Do we really want this public?","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d9a8878da31958d4ec91e815a9b5be05d9c6c319","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        for ext in processed_exts.values():"},{"line_number":512,"context_line":"            ext.update_attributes_map(attr_map)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"    def check_faulty_extensions(self, faulty_extensions):"},{"line_number":515,"context_line":"        \"\"\"Raise for non-default faulty extensions."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        Gracefully fail for defective default extensions, which will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_c2d87520","line":514,"range":{"start_line":514,"start_character":8,"end_line":514,"end_character":31},"updated":"2016-08-08 15:52:04.000000000","message":"I think we should cover this method with unittests.","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"64c0492edf898eee8950926c5216d9f734f5776d","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        for ext in processed_exts.values():"},{"line_number":512,"context_line":"            ext.update_attributes_map(attr_map)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"    def check_faulty_extensions(self, faulty_extensions):"},{"line_number":515,"context_line":"        \"\"\"Raise for non-default faulty extensions."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        Gracefully fail for defective default extensions, which will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_5af778d2","line":514,"range":{"start_line":514,"start_character":8,"end_line":514,"end_character":31},"in_reply_to":"9ad45d7e_a909f4df","updated":"2016-08-11 21:59:34.000000000","message":"we don\u0027t have to.","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"64c0492edf898eee8950926c5216d9f734f5776d","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        for ext in processed_exts.values():"},{"line_number":512,"context_line":"            ext.update_attributes_map(attr_map)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"    def check_faulty_extensions(self, faulty_extensions):"},{"line_number":515,"context_line":"        \"\"\"Raise for non-default faulty extensions."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"        Gracefully fail for defective default extensions, which will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_9afd70b3","line":514,"range":{"start_line":514,"start_character":8,"end_line":514,"end_character":31},"in_reply_to":"9ad45d7e_c2d87520","updated":"2016-08-11 21:59:34.000000000","message":"this is covered indirectly whilst testing the caller, the only reason why I broke this out to make the code a little easier to read.","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"cb08534a070bb53fcf47f794b9eba806b7d916f7","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        else:"},{"line_number":525,"context_line":"            # Remove the faulty extensions so that they do not show during"},{"line_number":526,"context_line":"            # ext-list"},{"line_number":527,"context_line":"            for ext in default_extensions:"},{"line_number":528,"context_line":"                try:"},{"line_number":529,"context_line":"                    del self.extensions[ext]"},{"line_number":530,"context_line":"                except KeyError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_49ce7884","line":527,"range":{"start_line":527,"start_character":23,"end_line":527,"end_character":41},"updated":"2016-08-08 13:12:35.000000000","message":"Should this be \u0027faulty_extensions\u0027?","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"64c0492edf898eee8950926c5216d9f734f5776d","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        else:"},{"line_number":525,"context_line":"            # Remove the faulty extensions so that they do not show during"},{"line_number":526,"context_line":"            # ext-list"},{"line_number":527,"context_line":"            for ext in default_extensions:"},{"line_number":528,"context_line":"                try:"},{"line_number":529,"context_line":"                    del self.extensions[ext]"},{"line_number":530,"context_line":"                except KeyError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_3a0e04e5","line":527,"range":{"start_line":527,"start_character":23,"end_line":527,"end_character":41},"in_reply_to":"9ad45d7e_49ce7884","updated":"2016-08-11 21:59:34.000000000","message":"this might be an oversight on my part.","commit_id":"00f283ed92dcd6a332f8f5beff81c73225eabd91"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"652c365c12d91b30370ee11b2addc3b6d22cf6b3","unresolved":false,"context_lines":[{"line_number":539,"context_line":"        removed from the list of loaded extensions."},{"line_number":540,"context_line":"        \"\"\""},{"line_number":541,"context_line":"        default_extensions \u003d set(const.DEFAULT_SERVICE_PLUGINS.values())"},{"line_number":542,"context_line":"        if not faulty_extensions \u003c\u003d default_extensions:"},{"line_number":543,"context_line":"            raise exceptions.ExtensionsNotFound("},{"line_number":544,"context_line":"                extensions\u003dlist(faulty_extensions))"},{"line_number":545,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_f7d72ceb","line":542,"range":{"start_line":542,"start_character":11,"end_line":542,"end_character":54},"updated":"2016-08-12 18:23:41.000000000","message":"With the current code:\n- If a DEFAULT_SERVICE_PLUGINS [1] is missing; its removed from the list and neutron still starts. The missing plugin does not show up with ext-list.\n- If a non-default extension is missing, we get this ExtensionsNotFound exception and neutron fails to start.\n\n\nThat seems backwards to me. IMHO we should raise this exception when a core default extension [1] fails and just remove when a non-default fails. I\u0027d opt for this if: to check if any faulty_extensions are in default_extensions.\n\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/plugins/common/constants.py#L42","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2cef8dddd95ee7cde584f38ce9228abbe193f78a","unresolved":false,"context_lines":[{"line_number":539,"context_line":"        removed from the list of loaded extensions."},{"line_number":540,"context_line":"        \"\"\""},{"line_number":541,"context_line":"        default_extensions \u003d set(const.DEFAULT_SERVICE_PLUGINS.values())"},{"line_number":542,"context_line":"        if not faulty_extensions \u003c\u003d default_extensions:"},{"line_number":543,"context_line":"            raise exceptions.ExtensionsNotFound("},{"line_number":544,"context_line":"                extensions\u003dlist(faulty_extensions))"},{"line_number":545,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_5230c607","line":542,"range":{"start_line":542,"start_character":11,"end_line":542,"end_character":54},"in_reply_to":"9ad45d7e_529a86c6","updated":"2016-08-12 18:52:39.000000000","message":"Yes; thanks. I should\u0027ve clarified my comment with \"newbie comment\".","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2d78e96847499cf5143acc896a8ec7a873e9c70d","unresolved":false,"context_lines":[{"line_number":539,"context_line":"        removed from the list of loaded extensions."},{"line_number":540,"context_line":"        \"\"\""},{"line_number":541,"context_line":"        default_extensions \u003d set(const.DEFAULT_SERVICE_PLUGINS.values())"},{"line_number":542,"context_line":"        if not faulty_extensions \u003c\u003d default_extensions:"},{"line_number":543,"context_line":"            raise exceptions.ExtensionsNotFound("},{"line_number":544,"context_line":"                extensions\u003dlist(faulty_extensions))"},{"line_number":545,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_529a86c6","line":542,"range":{"start_line":542,"start_character":11,"end_line":542,"end_character":54},"in_reply_to":"9ad45d7e_f7d72ceb","updated":"2016-08-12 18:34:12.000000000","message":"Point 1)\n\nIf a default plugin has a broken dependency, Neutron stills starts. It must do so because we can\u0027t ask the admin to patch the code since default plugins are hardcoded (rightly so). This situation occurs when there\u0027s a bug somewhere in the core plugin configuration but we don\u0027t want to make this fatal because default plugins provide additional behavior that can be omitted. The bug report complained that defective default plugin\u0027s extensions still show up when they should not. That\u0027s inline with the report request.\n\nPoint 2)\n\nWe want to fail here because non-default extensions can be removed/added by controlling the api_extensions path. If there\u0027s a misconfiguration, it can be rectified. For Neutron \u0027native\u0027 extensions, e.g. those under neutron/extensions, we want to fail fast to catch programmatic errors sooner rather than later. In other words we should never get to a point where we ship an extension that has a broken dependency.\n\nMakes sense?","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0cadfeca540a881d09985c61d4a10351be62f814","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                try:"},{"line_number":550,"context_line":"                    del self.extensions[ext]"},{"line_number":551,"context_line":"                except KeyError:"},{"line_number":552,"context_line":"                    pass"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def _check_extension(self, extension):"},{"line_number":555,"context_line":"        \"\"\"Checks for required methods in extension objects.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_45bac16f","line":552,"updated":"2016-08-19 10:02:10.000000000","message":"@Hirofumi, no you were right, Armando\u0027s style sucks. :)","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"afede9f218544ceb9817b81d26bc8e8fb7613156","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            # Remove the faulty extensions so that they do not show during"},{"line_number":547,"context_line":"            # ext-list"},{"line_number":548,"context_line":"            for ext in faulty_extensions:"},{"line_number":549,"context_line":"                try:"},{"line_number":550,"context_line":"                    del self.extensions[ext]"},{"line_number":551,"context_line":"                except KeyError:"},{"line_number":552,"context_line":"                    pass"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def _check_extension(self, extension):"},{"line_number":555,"context_line":"        \"\"\"Checks for required methods in extension objects.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_38a34651","line":552,"range":{"start_line":549,"start_character":16,"end_line":552,"end_character":24},"updated":"2016-08-16 08:01:42.000000000","message":"very nit: If we just pass KeyError, how about self.extensions.pop(ext, None)?","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d444a18f36bb77f13e5045d7317d234d7a57826f","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            # Remove the faulty extensions so that they do not show during"},{"line_number":547,"context_line":"            # ext-list"},{"line_number":548,"context_line":"            for ext in faulty_extensions:"},{"line_number":549,"context_line":"                try:"},{"line_number":550,"context_line":"                    del self.extensions[ext]"},{"line_number":551,"context_line":"                except KeyError:"},{"line_number":552,"context_line":"                    pass"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def _check_extension(self, extension):"},{"line_number":555,"context_line":"        \"\"\"Checks for required methods in extension objects.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_85babcbe","line":552,"range":{"start_line":549,"start_character":16,"end_line":552,"end_character":24},"in_reply_to":"3ac371cc_38a34651","updated":"2016-08-16 14:35:47.000000000","message":"some people argue one style over the other, we can\u0027t please everyone!","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3869b4e58a1c6e50c852528c88aec6dd9a4aa408","unresolved":false,"context_lines":[{"line_number":549,"context_line":"                try:"},{"line_number":550,"context_line":"                    del self.extensions[ext]"},{"line_number":551,"context_line":"                except KeyError:"},{"line_number":552,"context_line":"                    pass"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def _check_extension(self, extension):"},{"line_number":555,"context_line":"        \"\"\"Checks for required methods in extension objects.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_ac1c6278","line":552,"in_reply_to":"3ac371cc_45bac16f","updated":"2016-08-19 12:24:44.000000000","message":":)","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"b43daf6d86ef972a0f04860d2fcada3bb92a69b5","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            # Remove the faulty extensions so that they do not show during"},{"line_number":547,"context_line":"            # ext-list"},{"line_number":548,"context_line":"            for ext in faulty_extensions:"},{"line_number":549,"context_line":"                try:"},{"line_number":550,"context_line":"                    del self.extensions[ext]"},{"line_number":551,"context_line":"                except KeyError:"},{"line_number":552,"context_line":"                    pass"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    def _check_extension(self, extension):"},{"line_number":555,"context_line":"        \"\"\"Checks for required methods in extension objects.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_fa8a2abe","line":552,"range":{"start_line":549,"start_character":16,"end_line":552,"end_character":24},"in_reply_to":"3ac371cc_85babcbe","updated":"2016-08-16 15:07:59.000000000","message":"You\u0027re right. Please ignore my wrong comment.","commit_id":"720a8b3ff011d5f765335e180af0a11bda1f7aa8"}]}
