)]}'
{"searchlight/elasticsearch/plugins/utils.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"df12437d319e9a18ec6557fd4ae9e3dd08f035d1","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    old_index \u003d None"},{"line_number":242,"context_line":"    try:"},{"line_number":243,"context_line":"        current_indices \u003d es_engine.indices.get_alias("},{"line_number":244,"context_line":"            name\u003dalias_search, ignore\u003d404)"},{"line_number":245,"context_line":"        # Grab first (and only) index in the list from get_alias()."},{"line_number":246,"context_line":"        old_index \u003d list(current_indices.keys())[0]"},{"line_number":247,"context_line":"        if old_index \u003d\u003d index_name:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_c3648223","line":244,"range":{"start_line":244,"start_character":38,"end_line":244,"end_character":41},"updated":"2016-04-06 17:30:31.000000000","message":"Didn\u0027t we decide we weren\u0027t going to ignore this any more, in favor of catching it explicitly?","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"98bc1a5e1eceabc2d75765e11cf8e47f47ffd52e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    old_index \u003d None"},{"line_number":242,"context_line":"    try:"},{"line_number":243,"context_line":"        current_indices \u003d es_engine.indices.get_alias("},{"line_number":244,"context_line":"            name\u003dalias_search, ignore\u003d404)"},{"line_number":245,"context_line":"        # Grab first (and only) index in the list from get_alias()."},{"line_number":246,"context_line":"        old_index \u003d list(current_indices.keys())[0]"},{"line_number":247,"context_line":"        if old_index \u003d\u003d index_name:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_98c2ed32","line":244,"range":{"start_line":244,"start_character":38,"end_line":244,"end_character":41},"in_reply_to":"9a061dce_c3648223","updated":"2016-04-06 21:23:53.000000000","message":"Yes we did and we made the fix in the unit test patchset. We will pick it up when we merge those changes, assuming it gets approved first. I can make the fix here also if that is preferred.","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1d64454746084a7b4849bcdf58f757896c958625","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                \u0027alias\u0027: alias_search}}"},{"line_number":244,"context_line":"        ]"},{"line_number":245,"context_line":"    }"},{"line_number":246,"context_line":"    old_index \u003d None"},{"line_number":247,"context_line":"    try:"},{"line_number":248,"context_line":"        current_indices \u003d es_engine.indices.get_alias(name\u003dalias_search)"},{"line_number":249,"context_line":"        # Grab first (and only) index in the list from get_alias()."}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_75f2289c","line":246,"range":{"start_line":246,"start_character":4,"end_line":246,"end_character":13},"updated":"2016-04-11 21:10:59.000000000","message":"This is no longer necessary; if you have to do another patchset it can be removed but no biggie","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"}],"searchlight/tests/fake_plugins.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"faf4ef5da530a691f7be2d51151131f570dbe332","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        return doc"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"class ReindexRoleSeparatedPlugin(FakePluginBase):"},{"line_number":143,"context_line":"    def __init__(self, es_engine):"},{"line_number":144,"context_line":"        super(ReindexRoleSeparatedPlugin, self).__init__(es_engine)"},{"line_number":145,"context_line":"        self.options.admin_only_fields \u003d \u0027admin_wildcard_*,admin_specific\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_43cca088","line":142,"range":{"start_line":142,"start_character":6,"end_line":142,"end_character":32},"updated":"2016-04-07 22:21:36.000000000","message":"Not clear why this additional class is required. If possible it\u0027s nicer to reuse existing ones but if there\u0027s a reason that\u0027s fine.","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8cd2582bc589520f84669a186e341f55b024445d","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        return doc"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"class ReindexRoleSeparatedPlugin(FakePluginBase):"},{"line_number":143,"context_line":"    def __init__(self, es_engine):"},{"line_number":144,"context_line":"        super(ReindexRoleSeparatedPlugin, self).__init__(es_engine)"},{"line_number":145,"context_line":"        self.options.admin_only_fields \u003d \u0027admin_wildcard_*,admin_specific\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a1b2928_d1731cb0","line":142,"range":{"start_line":142,"start_character":6,"end_line":142,"end_character":32},"in_reply_to":"9a061dce_43cca088","updated":"2016-04-11 18:44:45.000000000","message":"I broke them out when I was debugging an exception and adding extra fields. They have been removed.","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"}],"searchlight/tests/functional/__init__.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"df12437d319e9a18ec6557fd4ae9e3dd08f035d1","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            es_response \u003d jsonutils.loads(es_response)"},{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self):"},{"line_number":578,"context_line":"        es_url \u003d \"http://localhost:%s/_search\" % ("},{"line_number":579,"context_line":"            self.api_server.elasticsearch_port)"},{"line_number":580,"context_line":"        response, content \u003d httplib2.Http().request(es_url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_83e3aaa3","line":577,"range":{"start_line":577,"start_character":35,"end_line":577,"end_character":36},"updated":"2016-04-06 17:30:31.000000000","message":"I think i added this, and i slap myself on the list. This function should accept (and probably later require) an index list (_get_all_elasticsearch_docs, *indices) that can all be comma-joined to the api request","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"98bc1a5e1eceabc2d75765e11cf8e47f47ffd52e","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            es_response \u003d jsonutils.loads(es_response)"},{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self):"},{"line_number":578,"context_line":"        es_url \u003d \"http://localhost:%s/_search\" % ("},{"line_number":579,"context_line":"            self.api_server.elasticsearch_port)"},{"line_number":580,"context_line":"        response, content \u003d httplib2.Http().request(es_url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_c57e3d69","line":577,"range":{"start_line":577,"start_character":35,"end_line":577,"end_character":36},"in_reply_to":"9a061dce_83e3aaa3","updated":"2016-04-06 21:23:53.000000000","message":"We will change this to accept a list of indices.","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"df12437d319e9a18ec6557fd4ae9e3dd08f035d1","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        self.assertEqual(200, response.status)"},{"line_number":582,"context_line":"        return jsonutils.loads(content)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def _get_elasticsearch_index(self, index_name):"},{"line_number":585,"context_line":"        es_url \u003d \"http://localhost:%s/%s/_search\" % ("},{"line_number":586,"context_line":"            self.api_server.elasticsearch_port, index_name)"},{"line_number":587,"context_line":"        response, content \u003d httplib2.Http().request(es_url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_3147894c","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":32},"updated":"2016-04-06 17:30:31.000000000","message":"This function seems like a special case of _get_all_elasticsearch_docs and the name\u0027s not clear - remove it and take a list of arguments in the function above?","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"98bc1a5e1eceabc2d75765e11cf8e47f47ffd52e","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        self.assertEqual(200, response.status)"},{"line_number":582,"context_line":"        return jsonutils.loads(content)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def _get_elasticsearch_index(self, index_name):"},{"line_number":585,"context_line":"        es_url \u003d \"http://localhost:%s/%s/_search\" % ("},{"line_number":586,"context_line":"            self.api_server.elasticsearch_port, index_name)"},{"line_number":587,"context_line":"        response, content \u003d httplib2.Http().request(es_url)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_0595d585","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":32},"in_reply_to":"9a061dce_3147894c","updated":"2016-04-06 21:23:53.000000000","message":"This will go away with the changes to _get_all_elasticsearch_docs.","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"faf4ef5da530a691f7be2d51151131f570dbe332","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            es_response \u003d jsonutils.loads(es_response)"},{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self, indices\u003d[]):"},{"line_number":578,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":579,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":580,"context_line":"           to the ES API. If the list is empty, we will search all indices."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_030e288b","line":577,"range":{"start_line":577,"start_character":49,"end_line":577,"end_character":54},"updated":"2016-04-07 22:21:36.000000000","message":"In this case it\u0027s ok, but I would tend to avoid using [] as a default argument in general. There be dragons!","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8cd2582bc589520f84669a186e341f55b024445d","unresolved":false,"context_lines":[{"line_number":574,"context_line":"            es_response \u003d jsonutils.loads(es_response)"},{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self, indices\u003d[]):"},{"line_number":578,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":579,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":580,"context_line":"           to the ES API. If the list is empty, we will search all indices."}],"source_content_type":"text/x-python","patch_set":5,"id":"7a1b2928_d1815c4c","line":577,"range":{"start_line":577,"start_character":49,"end_line":577,"end_character":54},"in_reply_to":"9a061dce_030e288b","updated":"2016-04-11 18:44:45.000000000","message":"Hahaha. The idea is that we are not modifying all usages, only the new ones for the Zero Downtime functional tests. Thus the old calls needed a default argument of []. This will change when in the future we change all of the usages and remove the default argument. But you knew that :)","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"faf4ef5da530a691f7be2d51151131f570dbe332","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self, indices\u003d[]):"},{"line_number":578,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":579,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":580,"context_line":"           to the ES API. If the list is empty, we will search all indices."},{"line_number":581,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_8371980e","line":578,"range":{"start_line":578,"start_character":34,"end_line":578,"end_character":35},"updated":"2016-04-07 22:21:36.000000000","message":"Bit of a nit, but the wording\u0027s a bit weird. I think the comma delimited string bit can be left out; a user of this function only cares about what indices is used for and what happens if it\u0027s empty. What does the function do?","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8cd2582bc589520f84669a186e341f55b024445d","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        return [h[\"_source\"] for h in es_response[\"hits\"][\"hits\"]]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _get_all_elasticsearch_docs(self, indices\u003d[]):"},{"line_number":578,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":579,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":580,"context_line":"           to the ES API. If the list is empty, we will search all indices."},{"line_number":581,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a1b2928_f1f3b808","line":578,"range":{"start_line":578,"start_character":34,"end_line":578,"end_character":35},"in_reply_to":"9a061dce_8371980e","updated":"2016-04-11 18:44:45.000000000","message":"I modified the comment. In terms of what the function does, didn\u0027t you write it initially :)","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"faf4ef5da530a691f7be2d51151131f570dbe332","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        return json_content"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _get_elasticsearch_aliases(self, indices):"},{"line_number":598,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":599,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":600,"context_line":"           to the ES API. If the list is empty, we will search all indices."},{"line_number":601,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_e3c97427","line":598,"range":{"start_line":598,"start_character":32,"end_line":598,"end_character":34},"updated":"2016-04-07 22:21:36.000000000","message":"Same comment about docstring as above - what\u0027s the intent?","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8cd2582bc589520f84669a186e341f55b024445d","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        return json_content"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _get_elasticsearch_aliases(self, indices):"},{"line_number":598,"context_line":"        \"\"\"Indices is a list of ES indices to search. We will extract"},{"line_number":599,"context_line":"           the indices as a comma delimited string and pass them directly"},{"line_number":600,"context_line":"           to the ES API. If the list is empty, we will search all indices."},{"line_number":601,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a1b2928_71e84811","line":598,"range":{"start_line":598,"start_character":32,"end_line":598,"end_character":34},"in_reply_to":"9a061dce_e3c97427","updated":"2016-04-11 18:44:45.000000000","message":"Modified.","commit_id":"e5c060679aeaf8770885c4cd24ef6f635e490cc8"}],"searchlight/tests/functional/test_reindex.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"df12437d319e9a18ec6557fd4ae9e3dd08f035d1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.non_role_plugin.initial_indexing()"},{"line_number":54,"context_line":"        self._flush_elasticsearch(listener)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs()"},{"line_number":57,"context_line":"        self.assertEqual(num_docs, es_docs[\u0027hits\u0027][\u0027total\u0027])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # Create and prepare a new index."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_1b28a499","line":56,"range":{"start_line":56,"start_character":23,"end_line":56,"end_character":50},"updated":"2016-04-06 17:30:31.000000000","message":"I would recommend passing an explicit list of indices here. There\u0027s a very high chance we\u0027ll modify the tests so that the parallel processes coexist on a single (still transient) elasticsearch because we\u0027ve suffered memory exhaustion on the CI nodes. This test will start doing weird things at that point.\n\nEDIT - i am now aware you didn\u0027t add the function :)  I would recommend though explicitly passing an index name","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"98bc1a5e1eceabc2d75765e11cf8e47f47ffd52e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.non_role_plugin.initial_indexing()"},{"line_number":54,"context_line":"        self._flush_elasticsearch(listener)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs()"},{"line_number":57,"context_line":"        self.assertEqual(num_docs, es_docs[\u0027hits\u0027][\u0027total\u0027])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # Create and prepare a new index."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_65bc9106","line":56,"range":{"start_line":56,"start_character":23,"end_line":56,"end_character":50},"in_reply_to":"9a061dce_1b28a499","updated":"2016-04-06 21:23:53.000000000","message":"See the comment in __init__.py.","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"df12437d319e9a18ec6557fd4ae9e3dd08f035d1","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Set up the aliases."},{"line_number":65,"context_line":"        es_utils.setup_alias(new_index, search, listener)"},{"line_number":66,"context_line":"        es_alias \u003d self._get_elasticsearch_aliases()"},{"line_number":67,"context_line":"        self.assertEqual(2, len(es_alias))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Reindex using the plugins."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_b6854f08","line":66,"range":{"start_line":66,"start_character":24,"end_line":66,"end_character":50},"updated":"2016-04-06 17:30:31.000000000","message":"Same comment here - can we make this more deterministic rather than relying on the server being empty?","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"98bc1a5e1eceabc2d75765e11cf8e47f47ffd52e","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Set up the aliases."},{"line_number":65,"context_line":"        es_utils.setup_alias(new_index, search, listener)"},{"line_number":66,"context_line":"        es_alias \u003d self._get_elasticsearch_aliases()"},{"line_number":67,"context_line":"        self.assertEqual(2, len(es_alias))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Reindex using the plugins."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_e53ee189","line":66,"range":{"start_line":66,"start_character":24,"end_line":66,"end_character":50},"in_reply_to":"9a061dce_b6854f08","updated":"2016-04-06 21:23:53.000000000","message":"Ditto.","commit_id":"77598b8b5a97a5b1f8a1335de663979e91fcf60b"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c60e19b45416c43594e72938ed86f04237bf2197","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        reindexing. We want to verify: the number of documents during reindex,"},{"line_number":43,"context_line":"        the number of aliases during the reindex, the number of documents"},{"line_number":44,"context_line":"        after the reindex and the aliases after the reindex."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        listener \u003d self.role_plugin.alias_name_listener"},{"line_number":47,"context_line":"        search \u003d self.role_plugin.alias_name_search"},{"line_number":48,"context_line":"        group \u003d self.role_plugin.resource_group_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_8d895029","line":45,"updated":"2016-04-13 15:40:24.000000000","message":"_alias on these variables would make the code a little easier to step through, but i imagine you did this to avoid pep8 line wrapping (which also makes it harder to read).","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"379e5504d41c0925ebbc90fa7133133d13bc6e26","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        reindexing. We want to verify: the number of documents during reindex,"},{"line_number":43,"context_line":"        the number of aliases during the reindex, the number of documents"},{"line_number":44,"context_line":"        after the reindex and the aliases after the reindex."},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        listener \u003d self.role_plugin.alias_name_listener"},{"line_number":47,"context_line":"        search \u003d self.role_plugin.alias_name_search"},{"line_number":48,"context_line":"        group \u003d self.role_plugin.resource_group_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_0f6ff02b","line":45,"in_reply_to":"5a18252c_8d895029","updated":"2016-04-13 18:25:42.000000000","message":"The variable names were shortened for PEP8. But relooking at the code, I guess some earlier refactoring means that the line lengths are no longer a concerned. I\u0027ll rename the variables back to alias_listener, alias_search and resource_group. I agree that PEP8 line wrapping makes the code harder to read!","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c60e19b45416c43594e72938ed86f04237bf2197","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        search \u003d self.role_plugin.alias_name_search"},{"line_number":48,"context_line":"        group \u003d self.role_plugin.resource_group_name"},{"line_number":49,"context_line":"        num_docs \u003d 6  # 4 role and 2 non-role docs."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Create a set of documents in ElasticSearch."},{"line_number":52,"context_line":"        self.role_plugin.initial_indexing()"},{"line_number":53,"context_line":"        self.non_role_plugin.initial_indexing()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_0a0ec63a","line":50,"updated":"2016-04-13 15:40:24.000000000","message":"Line 51 to 67 look to be exactly the same in every single test.  Is there any reason why it makes sense to copy paste them everywhere rather than have a common function? I think it would be easier to read the specifics of each test if that common code was separated.  I do know that sometimes people like to keep everything in a test function, so would like to understand thoughts here.","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"379e5504d41c0925ebbc90fa7133133d13bc6e26","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        search \u003d self.role_plugin.alias_name_search"},{"line_number":48,"context_line":"        group \u003d self.role_plugin.resource_group_name"},{"line_number":49,"context_line":"        num_docs \u003d 6  # 4 role and 2 non-role docs."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Create a set of documents in ElasticSearch."},{"line_number":52,"context_line":"        self.role_plugin.initial_indexing()"},{"line_number":53,"context_line":"        self.non_role_plugin.initial_indexing()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_ef50b460","line":50,"in_reply_to":"5a18252c_0a0ec63a","updated":"2016-04-13 18:25:42.000000000","message":"Since this is setup, I\u0027ll move it to a common method.","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c60e19b45416c43594e72938ed86f04237bf2197","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.role_plugin.initial_indexing()"},{"line_number":71,"context_line":"        self.non_role_plugin.initial_indexing()"},{"line_number":72,"context_line":"        self._flush_elasticsearch(listener)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs()"},{"line_number":75,"context_line":"        self.assertEqual((2 * num_docs), es_docs[\u0027hits\u0027][\u0027total\u0027])"},{"line_number":76,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs([new_index])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_4da1f8a2","line":73,"updated":"2016-04-13 15:40:24.000000000","message":"Lines 74 to 89 seem to be identical in every single test. Same comment as above.  It makes for a lot of extra reading to figure out if anything is really difference between them. However, the primary difference in testing here is what is under the #Reindex using the *** block in each test.","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"379e5504d41c0925ebbc90fa7133133d13bc6e26","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.role_plugin.initial_indexing()"},{"line_number":71,"context_line":"        self.non_role_plugin.initial_indexing()"},{"line_number":72,"context_line":"        self._flush_elasticsearch(listener)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs()"},{"line_number":75,"context_line":"        self.assertEqual((2 * num_docs), es_docs[\u0027hits\u0027][\u0027total\u0027])"},{"line_number":76,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs([new_index])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_0f79b0c8","line":73,"in_reply_to":"5a18252c_4da1f8a2","updated":"2016-04-13 18:25:42.000000000","message":"I\u0027m on the fence on this. I usually don\u0027t like sharing the actual verification between tests, but I\u0027ll make the change.","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"379e5504d41c0925ebbc90fa7133133d13bc6e26","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        old_index \u003d es_utils.alias_search_update(search, new_index)"},{"line_number":81,"context_line":"        es_utils.alias_listener_update(listener, old_index)"},{"line_number":82,"context_line":"        self._flush_elasticsearch(listener)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        es_docs \u003d self._get_all_elasticsearch_docs([new_index])"},{"line_number":85,"context_line":"        self.assertEqual(num_docs, es_docs[\u0027hits\u0027][\u0027total\u0027])"},{"line_number":86,"context_line":"        es_alias \u003d self._get_elasticsearch_aliases([new_index])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_557dfae5","line":83,"updated":"2016-04-13 18:25:42.000000000","message":"To save you some typing during the next review, I\u0027ll refactor this code also :)","commit_id":"b44bec87cee30ebd3a2a27a53d396253f49871b5"}]}
