)]}'
{"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"445ba9079bcc1d9c703dfd942148f6552ba6f74f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            return cfg.CONF.resource_plugin.mapping_use_doc_values"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @property"},{"line_number":86,"context_line":"    def resource_group_name(self):"},{"line_number":87,"context_line":"        if not getattr(self, \u0027_group_name\u0027, None):"},{"line_number":88,"context_line":"            if self.options.resource_group_name is not None:"},{"line_number":89,"context_line":"                self._group_name \u003d self.options.resource_group_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_6c9cb9c0","line":86,"range":{"start_line":86,"start_character":32,"end_line":86,"end_character":34},"updated":"2016-03-17 04:11:04.000000000","message":"I think it\u0027s best to put the parent check here (as the first \u0027if\u0027 block) -\nif self.parent_plugin: self._group_name \u003d self.parent_plugin.resource_group_name","commit_id":"655ec160bde7ef92cd2aa846f95f5118ac35f84c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"445ba9079bcc1d9c703dfd942148f6552ba6f74f","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        if not self.parent_plugin:"},{"line_number":338,"context_line":"            parent.child_plugins.append(self)"},{"line_number":339,"context_line":"            self.parent_plugin \u003d parent"},{"line_number":340,"context_line":"            if self.options.resource_group_name is not None:"},{"line_number":341,"context_line":"                LOG.warning(_LW("},{"line_number":342,"context_line":"                    \"Using parent plugin\u0027s resource group name \""},{"line_number":343,"context_line":"                    \"%(resource_group)s, resource_group_name configuration \""}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_8cce65b2","line":340,"range":{"start_line":340,"start_character":27,"end_line":340,"end_character":28},"updated":"2016-03-17 04:11:04.000000000","message":"We\u0027ve had to remove this option - see https://review.openstack.org/#/c/293685/ and the bug associated with it. This line won\u0027t work (self.options won\u0027t contain resource_group_name); we\u0027ll have to add the warning back in once we solve the problem","commit_id":"655ec160bde7ef92cd2aa846f95f5118ac35f84c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"445ba9079bcc1d9c703dfd942148f6552ba6f74f","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                    \"for %(document_type)s will be ignored.\") %"},{"line_number":345,"context_line":"                    {\u0027resource_group\u0027: parent.resource_group_name,"},{"line_number":346,"context_line":"                     \u0027document_type\u0027: self.get_document_type()})"},{"line_number":347,"context_line":"            self._group_name \u003d parent.resource_group_name"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def get_index_display_name(self, indent_level\u003d0):"},{"line_number":350,"context_line":"        \"\"\"The string used to list this plugin when indexing\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_acf401f2","line":347,"range":{"start_line":347,"start_character":17,"end_line":347,"end_character":28},"updated":"2016-03-17 04:11:04.000000000","message":"See the note above - depending on the order in which parent and child plugins are registered, this may not be safe. If plugin A is the parent, B the child and C the grandchild:\nC.register_parent(B)   -\u003e C._group_name \u003d B.resource_group_name\nB.register_parent(A)   -\u003e B._group_name \u003d A.resource_group_name\n\nC and B will end up different. I think doing the parent check in resource_group_name is safer.","commit_id":"655ec160bde7ef92cd2aa846f95f5118ac35f84c"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"a99c709d5234930a88d6d490cb4139d1abba34c2","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    @property"},{"line_number":87,"context_line":"    def resource_group_name(self):"},{"line_number":88,"context_line":"        if not getattr(self, \u0027_group_name\u0027, None):"},{"line_number":89,"context_line":"            if self.parent_plugin:"},{"line_number":90,"context_line":"                self._group_name \u003d self.parent_plugin.resource_group_name"},{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                if self.options.resource_group_name is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_5a1e975f","line":89,"range":{"start_line":89,"start_character":20,"end_line":89,"end_character":33},"updated":"2016-05-10 20:43:23.000000000","message":"I think we should output a WARNING where self.options.resource_group_name is not None and where it is different from the parent plugin, since that indicates a specific misconfiguration. Something like \"Overriding resource_group for \u003cplugin\u003e because it differs from parent \u003cplugin\u003e \u003cresource_group\u003e\". This might result in a lot of warnings depending how often plugins are constructed but it is a very specific case.","commit_id":"8e2088d6895f12b10b67a274a125e6cc5df87342"}],"searchlight/tests/fake_plugins.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"445ba9079bcc1d9c703dfd942148f6552ba6f74f","unresolved":false,"context_lines":[{"line_number":209,"context_line":"class FakeWrongIndexChildPlugin(FakeChildPlugin):"},{"line_number":210,"context_line":"    def __init__(self, es_engine):"},{"line_number":211,"context_line":"        super(FakeWrongIndexChildPlugin, self).__init__(es_engine)"},{"line_number":212,"context_line":"        self.options.resource_group_name \u003d \u0027wrong-group-name\u0027"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    @classmethod"},{"line_number":215,"context_line":"    def get_document_type(cls):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_ac42410e","line":212,"range":{"start_line":212,"start_character":21,"end_line":212,"end_character":40},"updated":"2016-03-17 04:11:04.000000000","message":"Because of https://review.openstack.org/#/c/293685/ - see the test file for a suggestion","commit_id":"655ec160bde7ef92cd2aa846f95f5118ac35f84c"}],"searchlight/tests/unit/test_plugin.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"445ba9079bcc1d9c703dfd942148f6552ba6f74f","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        parent_plugin \u003d fake_plugins.FakeSimplePlugin(es_engine\u003dmock_engine)"},{"line_number":245,"context_line":"        child_plugin \u003d fake_plugins.FakeWrongIndexChildPlugin("},{"line_number":246,"context_line":"            es_engine\u003dmock_engine)"},{"line_number":247,"context_line":"        self.assertNotEqual(child_plugin.resource_group_name,"},{"line_number":248,"context_line":"                            parent_plugin.resource_group_name)"},{"line_number":249,"context_line":"        mock_stevedore_parent \u003d mock.Mock()"},{"line_number":250,"context_line":"        mock_stevedore_parent.obj \u003d parent_plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_cc47cd1b","line":247,"range":{"start_line":247,"start_character":13,"end_line":247,"end_character":27},"updated":"2016-03-17 04:11:04.000000000","message":"This check won\u0027t work any more because of https://review.openstack.org/#/c/293685/, though we should add it back when we remove the single index limitation.\n\nA way to test this (with the suggestion in base.py) would be to patch resouce_group_name on the parent plugin using a PropertyMock (there are other examples of that) and check that child.resource_group_name is the same even though it\u0027s not mocked.","commit_id":"655ec160bde7ef92cd2aa846f95f5118ac35f84c"}]}
