)]}'
{"rally/cli/commands/task.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"dd6e10f3f2a2af3d0d34d85937c7a5808e36aee1","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"    @cliutils.args(\"--type\", dest\u003d\"output_type\", type\u003dstr,"},{"line_number":1016,"context_line":"                   required\u003dTrue,"},{"line_number":1017,"context_line":"                   help\u003d\"Report type (Defaults to HTML). Out-of-the-box \""},{"line_number":1018,"context_line":"                        \"types: HTML, HTML-Static, JUnit-XML, ElasticSearch. \""},{"line_number":1019,"context_line":"                        \"HINT: You can list all types, executing `rally \""},{"line_number":1020,"context_line":"                        \"plugin list --plugin-base TaskExporter` \""},{"line_number":1021,"context_line":"                        \"command.\")"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_30698f20","line":1018,"updated":"2017-09-27 20:53:04.000000000","message":"it would be interesting if we could generate this message automatically instead of hardcoding.","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"    @cliutils.args(\"--type\", dest\u003d\"output_type\", type\u003dstr,"},{"line_number":1016,"context_line":"                   required\u003dTrue,"},{"line_number":1017,"context_line":"                   help\u003d\"Report type (Defaults to HTML). Out-of-the-box \""},{"line_number":1018,"context_line":"                        \"types: HTML, HTML-Static, JUnit-XML, ElasticSearch. \""},{"line_number":1019,"context_line":"                        \"HINT: You can list all types, executing `rally \""},{"line_number":1020,"context_line":"                        \"plugin list --plugin-base TaskExporter` \""},{"line_number":1021,"context_line":"                        \"command.\")"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_7716c857","line":1018,"in_reply_to":"7f515b1d_30698f20","updated":"2017-09-28 15:15:11.000000000","message":"automatic generation can waste time, but we can use the hack like in verify command[1][2]. But it is work for a separate patch.\n\n[1] https://github.com/openstack/rally/blob/master/rally/cli/commands/verify.py#L45\n[2] https://github.com/openstack/rally/blob/master/tests/unit/cli/commands/test_verify.py#L756-L770","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"dd6e10f3f2a2af3d0d34d85937c7a5808e36aee1","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"        :param task_id: UUID of the task"},{"line_number":1037,"context_line":"        :param output_type: str, output type"},{"line_number":1038,"context_line":"        :param output_dest: output format (html, html-static, junit-xml,"},{"line_number":1039,"context_line":"                            elasticsearch, etc)"},{"line_number":1040,"context_line":"        \"\"\""},{"line_number":1041,"context_line":"        task_id \u003d isinstance(task_id, list) and task_id or [task_id]"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_b0545f54","line":1038,"updated":"2017-09-27 20:53:04.000000000","message":"do we need to change this line we don\u0027t need actually to specify all options that we have here...","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"        :param task_id: UUID of the task"},{"line_number":1037,"context_line":"        :param output_type: str, output type"},{"line_number":1038,"context_line":"        :param output_dest: output format (html, html-static, junit-xml,"},{"line_number":1039,"context_line":"                            elasticsearch, etc)"},{"line_number":1040,"context_line":"        \"\"\""},{"line_number":1041,"context_line":"        task_id \u003d isinstance(task_id, list) and task_id or [task_id]"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_d7645c24","line":1038,"in_reply_to":"7f515b1d_b0545f54","updated":"2017-09-28 15:15:11.000000000","message":"Actually, describing parameters in the docstrings are quite redundant in CLI, since it is a duplication of what we have described while calling `cliutils.args`. \nAlso, it is not displayed anywhere. I hope, that someday I\u0027ll find time to remove all these docstrings and write the unit tests to restrict them...","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"}],"rally/common/logging.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"9946e1c29be35fde1b669703b756742c1685dcb4","unresolved":false,"context_lines":[{"line_number":38,"context_line":"log.addLevelName(log.RDEBUG, \"RALLYDEBUG\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"CRITICAL \u003d log.CRITICAL"},{"line_number":41,"context_line":"DEBUG \u003d log.DEBUG"},{"line_number":42,"context_line":"ERROR \u003d log.ERROR"},{"line_number":43,"context_line":"FATAL \u003d log.FATAL"},{"line_number":44,"context_line":"INFO \u003d log.INFO"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_b5d9f1f3","side":"PARENT","line":41,"updated":"2017-09-27 20:31:07.000000000","message":"This is absolutely not related to patch, let\u0027s split this outside of it.","commit_id":"8523db9247f16911d90e37a1119a81baac3c4e54"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":37,"context_line":"log.RDEBUG \u003d log.DEBUG + 1"},{"line_number":38,"context_line":"log.addLevelName(log.RDEBUG, \"RALLYDEBUG\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"CRITICAL \u003d log.CRITICAL  # 50"},{"line_number":41,"context_line":"FATAL \u003d log.FATAL        # 50"},{"line_number":42,"context_line":"ERROR \u003d log.ERROR        # 40"},{"line_number":43,"context_line":"WARN \u003d log.WARN          # 30"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_9178dff8","line":40,"updated":"2017-10-10 08:21:56.000000000","message":"this seems unrelated","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"}],"rally/plugins/common/exporter/elastic.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"0de0fa768d6d55baec2b09cbc3143993a7d6b426","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        :param output_destination: Destination of report"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        # nothing to check :)"},{"line_number":44,"context_line":"        pass"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def check_index(self, _index):"},{"line_number":47,"context_line":"        if not self.es.indices.exists(_index):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_dcd095cc","line":44,"range":{"start_line":43,"start_character":8,"end_line":44,"end_character":12},"updated":"2017-07-31 10:49:17.000000000","message":"as far as I understand, it is wrong. You need to check that output_destination is not None and has valid format.","commit_id":"91a83ec73a473e2e1ce389f99ab398d3b9baf272"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"dd6e10f3f2a2af3d0d34d85937c7a5808e36aee1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"INDEX_DICT \u003d {"},{"line_number":29,"context_line":"    \"task\": \"rally_task_data_v1\","},{"line_number":30,"context_line":"    \"workload_sla\": \"rally_workload_sla_data_v1\","},{"line_number":31,"context_line":"    \"workload\": \"rally_workload_data_v1\","},{"line_number":32,"context_line":"    \"iteration\": \"rally_iteration_data_v1\","}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_9aeaa10c","line":29,"updated":"2017-09-27 20:53:04.000000000","message":"it would be actually better to call it rally_v1_*","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"INDEX_DICT \u003d {"},{"line_number":29,"context_line":"    \"task\": \"rally_task_data_v1\","},{"line_number":30,"context_line":"    \"workload_sla\": \"rally_workload_sla_data_v1\","},{"line_number":31,"context_line":"    \"workload\": \"rally_workload_data_v1\","},{"line_number":32,"context_line":"    \"iteration\": \"rally_iteration_data_v1\","}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_e229d489","line":29,"in_reply_to":"7f515b1d_9aeaa10c","updated":"2017-09-28 15:15:11.000000000","message":"imo, `rally_v1_*` prefix sounds like a result from v1 release of rally","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb00b9742174a8a190624b69e524beab2d7bcdb4","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"INDEX_DICT \u003d {"},{"line_number":29,"context_line":"    \"task\": \"rally_task_data_v1\","},{"line_number":30,"context_line":"    \"workload_sla\": \"rally_workload_sla_data_v1\","},{"line_number":31,"context_line":"    \"workload\": \"rally_workload_data_v1\","},{"line_number":32,"context_line":"    \"iteration\": \"rally_iteration_data_v1\","},{"line_number":33,"context_line":"    \"atomic\": \"rally_atomic_action_data_v1\""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_80058e13","line":30,"updated":"2017-09-27 22:15:54.000000000","message":"let\u0027s remove _data_ it\u0027s useless as well it\u0027s captain obvious","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"INDEX_DICT \u003d {"},{"line_number":29,"context_line":"    \"task\": \"rally_task_data_v1\","},{"line_number":30,"context_line":"    \"workload_sla\": \"rally_workload_sla_data_v1\","},{"line_number":31,"context_line":"    \"workload\": \"rally_workload_data_v1\","},{"line_number":32,"context_line":"    \"iteration\": \"rally_iteration_data_v1\","},{"line_number":33,"context_line":"    \"atomic\": \"rally_atomic_action_data_v1\""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_22336cf8","line":30,"in_reply_to":"7f515b1d_80058e13","updated":"2017-09-28 15:15:11.000000000","message":"as from the previous comment, data_v1 sounds better than rally_v1","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb00b9742174a8a190624b69e524beab2d7bcdb4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \"task\": \"rally_task_data_v1\","},{"line_number":30,"context_line":"    \"workload_sla\": \"rally_workload_sla_data_v1\","},{"line_number":31,"context_line":"    \"workload\": \"rally_workload_data_v1\","},{"line_number":32,"context_line":"    \"iteration\": \"rally_iteration_data_v1\","},{"line_number":33,"context_line":"    \"atomic\": \"rally_atomic_action_data_v1\""},{"line_number":34,"context_line":"}"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_402436af","line":32,"updated":"2017-09-27 22:15:54.000000000","message":"INDEX_DICT should be different  keys should be index names, values should be index mappings.","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"dd6e10f3f2a2af3d0d34d85937c7a5808e36aee1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"}"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"_RE_URL \u003d re.compile("},{"line_number":38,"context_line":"    # http:// or https://"},{"line_number":39,"context_line":"    r\"^(?:http|ftp)s?://\""},{"line_number":40,"context_line":"    # credentials"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_5aa2e9fd","line":37,"updated":"2017-09-27 20:53:04.000000000","message":"why do we even need to check this? \n\nlet\u0027s just fail if it doesn\u0027t work","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"dd6e10f3f2a2af3d0d34d85937c7a5808e36aee1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    r\"(?:/?|[/?]\\S+)$\", re.IGNORECASE)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_url_like(thing):"},{"line_number":56,"context_line":"    return _RE_URL.match(thing)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_5a3e698b","line":55,"updated":"2017-09-27 20:53:04.000000000","message":"def is_url_like(thing): \n     return urlparse.urlparse(url).schema in [\"http\", \"https\"]:\n      \nplease remove regexp it\u0027s not complete...","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    r\"(?:/?|[/?]\\S+)$\", re.IGNORECASE)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_url_like(thing):"},{"line_number":56,"context_line":"    return _RE_URL.match(thing)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_e2eaf40c","line":55,"in_reply_to":"7f515b1d_5a3e698b","updated":"2017-09-28 15:15:11.000000000","message":"in this case, `url.startswith(\"http\") or url.startswith(\"https\")` looks more practical","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb00b9742174a8a190624b69e524beab2d7bcdb4","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                elasticsearch.Elasticsearch(output_destination).info()"},{"line_number":103,"context_line":"            except Exception as e:"},{"line_number":104,"context_line":"                if logging.is_debug():"},{"line_number":105,"context_line":"                    LOG.error(\"Problems during validation of elastic \""},{"line_number":106,"context_line":"                              \"connection\")"},{"line_number":107,"context_line":"                raise exceptions.ValidationError(message\u003dstr(e))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_bd42f7a9","line":105,"updated":"2017-09-27 22:15:54.000000000","message":"what\u0027s the point of LOG.error? we need to\n\n  LOG.exception()","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        durations \u003d workload[\"statistics\"][\"durations\"]"},{"line_number":167,"context_line":"        success_rate \u003d durations[\"total\"][\"data\"][\"success\"]"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # should we save description of scenario?"},{"line_number":170,"context_line":"        workload_report \u003d {"},{"line_number":171,"context_line":"            \"scenario_name\": workload[\"name\"],"},{"line_number":172,"context_line":"            \"runner_type\": workload[\"runner_type\"],"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_608172fb","line":169,"updated":"2017-10-10 08:21:56.000000000","message":"we can have","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb00b9742174a8a190624b69e524beab2d7bcdb4","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                    if not iter_success:"},{"line_number":293,"context_line":"                        iter_report.update({\"error\": itr.get(\"error\", {})})"},{"line_number":294,"context_line":"                        self._mark_the_last_as_an_error(itr[\"atomic_actions\"])"},{"line_number":295,"context_line":"                    self._save_index("},{"line_number":296,"context_line":"                        INDEX_DICT[\"iteration\"], iter_report,"},{"line_number":297,"context_line":"                        doc_id\u003diter_id)"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_ddfa5341","line":295,"updated":"2017-09-27 22:15:54.000000000","message":"The whole logic of indexing is messed up. \n\nJust prepare all records in array \n\n {\"index\": \"right_index\" , \"type\":  \"right_type\"}\n {data}\n\nafter that \n\n  if urlparse.urlparse(url).schema in [\"http\", \"https\"]: \n      index_items_by_chunks_of_10k elements (20k items of array) \n  else: \n      with open(file) as f: \n         json.dump(f, data, indent\u003d2)\n\nI really do not understand why we have in this module 300 lines of code and hunderds of methods...","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                    if not iter_success:"},{"line_number":293,"context_line":"                        iter_report.update({\"error\": itr.get(\"error\", {})})"},{"line_number":294,"context_line":"                        self._mark_the_last_as_an_error(itr[\"atomic_actions\"])"},{"line_number":295,"context_line":"                    self._save_index("},{"line_number":296,"context_line":"                        INDEX_DICT[\"iteration\"], iter_report,"},{"line_number":297,"context_line":"                        doc_id\u003diter_id)"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_22a92c23","line":295,"in_reply_to":"7f515b1d_ddfa5341","updated":"2017-09-28 15:15:11.000000000","message":"(facepalm)\n\n\u003e I really do not understand why we have in this module 300 lines of code and hundreds of methods...\n\nMerging the code from separate methods to the one will reduce 5 lines (with docstrings)...optimization what is critical for performance, yes...\n\nThe splitting logic was done to reduce the length of the main method and to group comments. I prefer to leave that as is.\n\n\u003e Just prepare all records in array \n\u003e \n\u003e  {\"index\": \"right_index\" , \"type\":  \"right_type\"}\n\u003e  {data}\n\nsee L131-138. It is what is actually done for dumping. To support sending items by chunks to the remote host, I can modify the place of calling L120-129. and move it to the end.\n\n\u003e after that \n\u003e \n\u003e  if urlparse.urlparse(url).schema in [\"http\", \"https\"]: \n\u003e      index_items_by_chunks_of_10k elements (20k items of array) \n\u003e  else: \n\u003e      with open(file) as f: \n\u003e         json.dump(f, data, indent\u003d2)\n\nhm...see L301-310","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb00b9742174a8a190624b69e524beab2d7bcdb4","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            # a new line is required in the end of the file."},{"line_number":307,"context_line":"            report \u003d \"\\n\".join(self._report) + \"\\n\""},{"line_number":308,"context_line":"            return {\"files\": {self.output_destination: report},"},{"line_number":309,"context_line":"                    \"open\": \"file://\" + os.path.abspath("},{"line_number":310,"context_line":"                        self.output_destination)}"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_5dfd436c","line":308,"updated":"2017-09-27 22:15:54.000000000","message":"this interface is so messed up \u003d(\n\nso basically, we don\u0027t want to copy paste functionallity regarding to writing results to file, but instead of just returning the results we are retuning as well desitation of file. \n\nIt really makes sense to remove this option and just use \n\n  with open(file_path) as f:\n      f.write(results)","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            # a new line is required in the end of the file."},{"line_number":307,"context_line":"            report \u003d \"\\n\".join(self._report) + \"\\n\""},{"line_number":308,"context_line":"            return {\"files\": {self.output_destination: report},"},{"line_number":309,"context_line":"                    \"open\": \"file://\" + os.path.abspath("},{"line_number":310,"context_line":"                        self.output_destination)}"}],"source_content_type":"text/x-python","patch_set":29,"id":"7f515b1d_22c7ec66","line":308,"in_reply_to":"7f515b1d_5dfd436c","updated":"2017-09-28 15:15:11.000000000","message":"Why don\u0027t saving to file here?\nSaving file directly from the exporter module limits RaaS. I mean it would be nice to obtain different reports via http.\n\nWhy is a file name transmitted back?\nIt was while designing unified logic for exporters. Let\u0027s imagine the exporter which generates several output files (for example, it can be html exporter. Additional files will be used for storing results of tasks to make loading of the main report smooth) and in this case, the files will contain different paths.","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":46,"context_line":"            return"},{"line_number":47,"context_line":"        # it is an error. let\u0027s try to find the reason"},{"line_number":48,"context_line":"        reason \u003d None"},{"line_number":49,"context_line":"        try:"},{"line_number":50,"context_line":"            data \u003d resp.json()"},{"line_number":51,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_519ee707","line":48,"updated":"2017-10-10 08:21:56.000000000","message":"ElasticSearch has one of the best API that I have ever saw. There is no need actually to wrap his errors. I would rather prefer to see original response code and data from it.","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":46,"context_line":"            return"},{"line_number":47,"context_line":"        # it is an error. let\u0027s try to find the reason"},{"line_number":48,"context_line":"        reason \u003d None"},{"line_number":49,"context_line":"        try:"},{"line_number":50,"context_line":"            data \u003d resp.json()"},{"line_number":51,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_1d94fe43","line":48,"in_reply_to":"5f4e5783_519ee707","updated":"2017-10-10 10:03:16.000000000","message":"As you can see from the code below, I\u0027m not trying to transform the original message and I agree that ElastiSearch error messages are quite user-friendly. But in the same time:\n\n1) The ElasticSearch can be under some proxy, which can raise its own errors. Such errors cannot be wrapped in json-like format and in this case we will have `JSONDecodeError: Expecting value: line 1 column 1 (char 0)`. I think we should always use try...except in case of loading json data.\n\n2) The original message contains duplication. For example, in case of auth error:\n\n    {\u0027error\u0027: {\u0027header\u0027: {\u0027WWW-Authenticate\u0027: \u0027Basic realm\u003d\"security\" charset\u003d\"UTF-8\"\u0027},\n     \u0027reason\u0027: \u0027missing authentication token for REST request [/]\u0027,\n     \u0027root_cause\u0027: [{\u0027header\u0027: {\u0027WWW-Authenticate\u0027: \u0027Basic realm\u003d\"security\" charset\u003d\"UTF-8\"\u0027},\n        \u0027reason\u0027: \u0027missing authentication token for REST request [/]\u0027,\n        \u0027type\u0027: \u0027security_exception\u0027}],\n    \u0027type\u0027: \u0027security_exception\u0027},\n    \u0027status\u0027: 401}","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self._check_response(resp)"},{"line_number":73,"context_line":"        err_msg \u003d \"Failed to retrieve info about the ElasticSearch cluster: %s\""},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            data \u003d resp.json()"},{"line_number":76,"context_line":"        except ValueError:"},{"line_number":77,"context_line":"            LOG.debug(\"Return data from %s: %s\" % (self._url, resp.text))"},{"line_number":78,"context_line":"            raise exceptions.RallyException("}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_11762fda","line":75,"updated":"2017-10-10 08:21:56.000000000","message":"reply from Elasticsearch is always JSON even in case of failures. The only time when it\u0027s not JSON is when it doesn\u0027t work or is not accessible. \n\nSo instead of all messages that we have here in log you can just have two types of situations: \n\n1) Elastic is not OK \n2) Your request is not OK for some reason: \u003cdisplay orgianl reason\u003e","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self._check_response(resp)"},{"line_number":73,"context_line":"        err_msg \u003d \"Failed to retrieve info about the ElasticSearch cluster: %s\""},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            data \u003d resp.json()"},{"line_number":76,"context_line":"        except ValueError:"},{"line_number":77,"context_line":"            LOG.debug(\"Return data from %s: %s\" % (self._url, resp.text))"},{"line_number":78,"context_line":"            raise exceptions.RallyException("}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_bdef2aaf","line":75,"in_reply_to":"5f4e5783_11762fda","updated":"2017-10-10 10:03:16.000000000","message":"I disagree. There are a bunch of possible issues:\n\n1) port of elastic can be entered wrong or missed, so the L71 can be successful(request to 80 port can return a web page), but the response will be not what we expect to see\n2) error on the proxy side\n3) firewall\n\nwe cannot assume that we will connect to elasticsearch directly all the time.","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        :param documents: a list of documents to push"},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        LOG.debug(\"Pushing results by chunks (up to %s documents at once) \""},{"line_number":97,"context_line":"                  \"to ElasticSearch.\" % self.CHUNK_LENGTH)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_513a67e7","line":96,"updated":"2017-10-10 08:21:56.000000000","message":"This is valuable information, I would do LOG.info. \nAs well please put the amount of required chunks or total amount of documents. Otherwise it\u0027s not clear","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        :param documents: a list of documents to push"},{"line_number":95,"context_line":"        \"\"\""},{"line_number":96,"context_line":"        LOG.debug(\"Pushing results by chunks (up to %s documents at once) \""},{"line_number":97,"context_line":"                  \"to ElasticSearch.\" % self.CHUNK_LENGTH)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_dd4786bc","line":96,"in_reply_to":"5f4e5783_513a67e7","updated":"2017-10-10 10:03:16.000000000","message":"agree","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            resp \u003d requests.post(self._url + \"/_bulk\", data\u003ddata)"},{"line_number":103,"context_line":"            self._check_response(resp, action\u003d\"push documents\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def check_document(self, index, doc_id, doc_type\u003d\"data\"):"},{"line_number":106,"context_line":"        \"\"\"Check for the existence of a document."}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_110d0f3e","line":103,"updated":"2017-10-10 08:21:56.000000000","message":"It is very valuable to use information from resp to show how many documents were added and how many failed.","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            resp \u003d requests.post(self._url + \"/_bulk\", data\u003ddata)"},{"line_number":103,"context_line":"            self._check_response(resp, action\u003d\"push documents\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def check_document(self, index, doc_id, doc_type\u003d\"data\"):"},{"line_number":106,"context_line":"        \"\"\"Check for the existence of a document."}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_9d134eb9","line":103,"in_reply_to":"5f4e5783_110d0f3e","updated":"2017-10-10 10:03:16.000000000","message":"ok.","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if self._remote:"},{"line_number":200,"context_line":"            self._client \u003d ElasticSearchClient(self.output_destination)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _save_index(self, index, body, doc_id\u003dNone, doc_type\u003d\"data\"):"},{"line_number":203,"context_line":"        \"\"\"Create a document for the specified index with specified id."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        :param index: The name of the index"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_c46213d9","line":202,"updated":"2017-10-10 08:21:56.000000000","message":"let\u0027s rename this method to something else, _add_result for example","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if self._remote:"},{"line_number":200,"context_line":"            self._client \u003d ElasticSearchClient(self.output_destination)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _save_index(self, index, body, doc_id\u003dNone, doc_type\u003d\"data\"):"},{"line_number":203,"context_line":"        \"\"\"Create a document for the specified index with specified id."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        :param index: The name of the index"}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_3d121ab3","line":202,"in_reply_to":"5f4e5783_c46213d9","updated":"2017-10-10 10:03:16.000000000","message":"ok","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"e64ca9acd1f481295efaca54172df658c8aaaabf","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        for task in self.tasks_results:"},{"line_number":287,"context_line":"            if self._remote:"},{"line_number":288,"context_line":"                exist \u003d self._client.check_document("},{"line_number":289,"context_line":"                    self.INDEX_DICT[\"task\"], task[\"uuid\"])"},{"line_number":290,"context_line":"                if exist:"},{"line_number":291,"context_line":"                    # should we fail in such case?"},{"line_number":292,"context_line":"                    LOG.warning(\"The Task %s is already exist in the \""}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_245b272f","line":289,"updated":"2017-10-10 08:21:56.000000000","message":"yep it makes sense to fail here","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"e9f4c3b78638f6460e5f05c069429601f55c518e","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        for task in self.tasks_results:"},{"line_number":287,"context_line":"            if self._remote:"},{"line_number":288,"context_line":"                exist \u003d self._client.check_document("},{"line_number":289,"context_line":"                    self.INDEX_DICT[\"task\"], task[\"uuid\"])"},{"line_number":290,"context_line":"                if exist:"},{"line_number":291,"context_line":"                    # should we fail in such case?"},{"line_number":292,"context_line":"                    LOG.warning(\"The Task %s is already exist in the \""}],"source_content_type":"text/x-python","patch_set":34,"id":"5f4e5783_5d8276ca","line":289,"in_reply_to":"5f4e5783_245b272f","updated":"2017-10-10 10:03:16.000000000","message":"ok","commit_id":"ffc89c083be5ae7e9419a38d7950ecf67a1cb33d"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"e9b09918a71adccb3687e5a7327a67ace4986011","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \"\"\""},{"line_number":233,"context_line":"        if atomic_actions:"},{"line_number":234,"context_line":"            atomic_actions[-1][\"failed\"] \u003d True"},{"line_number":235,"context_line":"            if atomic_actions[-1][\"children\"]:"},{"line_number":236,"context_line":"                # NOTE(andreykurilin): not all of children of the last"},{"line_number":237,"context_line":"                #   top-level atomic should be marked as failed, only the last"},{"line_number":238,"context_line":"                #   one, so we need recursively call"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_e894a2ea","line":235,"updated":"2017-10-11 02:58:00.000000000","message":"looks this line is redundant, we just need 233 line.","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"f39b95f6083b90fd590bcf52a8c17b45e8a850f2","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \"\"\""},{"line_number":233,"context_line":"        if atomic_actions:"},{"line_number":234,"context_line":"            atomic_actions[-1][\"failed\"] \u003d True"},{"line_number":235,"context_line":"            if atomic_actions[-1][\"children\"]:"},{"line_number":236,"context_line":"                # NOTE(andreykurilin): not all of children of the last"},{"line_number":237,"context_line":"                #   top-level atomic should be marked as failed, only the last"},{"line_number":238,"context_line":"                #   one, so we need recursively call"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_0c5a65f2","line":235,"in_reply_to":"5f4e5783_e894a2ea","updated":"2017-10-11 12:16:18.000000000","message":"agree","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"e9b09918a71adccb3687e5a7327a67ace4986011","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            action_report \u003d {"},{"line_number":273,"context_line":"                \"action_name\": action[\"name\"],"},{"line_number":274,"context_line":"                \"workload_uuid\": workload_id,"},{"line_number":275,"context_line":"                \"success\": not action.get(\"failed\", False),"},{"line_number":276,"context_line":"                \"started_at\": started_at,"},{"line_number":277,"context_line":"                \"finished_at\": finished_at}"},{"line_number":278,"context_line":"            if _parent:"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_6bae6ce8","line":275,"updated":"2017-10-11 02:58:00.000000000","message":"do not remember that there is \"failed\" field in action, you sure?","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"f39b95f6083b90fd590bcf52a8c17b45e8a850f2","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            action_report \u003d {"},{"line_number":273,"context_line":"                \"action_name\": action[\"name\"],"},{"line_number":274,"context_line":"                \"workload_uuid\": workload_id,"},{"line_number":275,"context_line":"                \"success\": not action.get(\"failed\", False),"},{"line_number":276,"context_line":"                \"started_at\": started_at,"},{"line_number":277,"context_line":"                \"finished_at\": finished_at}"},{"line_number":278,"context_line":"            if _parent:"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_4c373db2","line":275,"in_reply_to":"5f4e5783_6bae6ce8","updated":"2017-10-11 12:16:18.000000000","message":"see L228 ;)","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"e9b09918a71adccb3687e5a7327a67ace4986011","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                        \"cluster. The document with such UUID already exists\" %"},{"line_number":299,"context_line":"                        task[\"uuid\"])"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"            task_report \u003d {"},{"line_number":302,"context_line":"                \"task_uuid\": task[\"uuid\"],"},{"line_number":303,"context_line":"                \"deployment_uuid\": task[\"deployment_uuid\"],"},{"line_number":304,"context_line":"                \"title\": task[\"title\"],"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_88af6e93","line":301,"updated":"2017-10-11 02:58:00.000000000","message":"why not save tags info?","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"f39b95f6083b90fd590bcf52a8c17b45e8a850f2","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                        \"cluster. The document with such UUID already exists\" %"},{"line_number":299,"context_line":"                        task[\"uuid\"])"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"            task_report \u003d {"},{"line_number":302,"context_line":"                \"task_uuid\": task[\"uuid\"],"},{"line_number":303,"context_line":"                \"deployment_uuid\": task[\"deployment_uuid\"],"},{"line_number":304,"context_line":"                \"title\": task[\"title\"],"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_4c605da6","line":301,"in_reply_to":"5f4e5783_88af6e93","updated":"2017-10-11 12:16:18.000000000","message":"ok, will add","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"e9b09918a71adccb3687e5a7327a67ace4986011","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                        \"uuid\": workload[\"uuid\"],"},{"line_number":353,"context_line":"                        \"num\": str(idx)}"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"                    iter_success \u003d bool(itr[\"error\"])"},{"line_number":356,"context_line":"                    started_at \u003d dt.datetime.utcfromtimestamp(itr[\"timestamp\"])"},{"line_number":357,"context_line":"                    started_at \u003d started_at.strftime(consts.TimeFormat.ISO8601)"},{"line_number":358,"context_line":"                    iter_report \u003d {"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_8b5be82c","line":355,"updated":"2017-10-11 02:58:00.000000000","message":"wrong line.  not bool(itr[\"error\"])","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"f39b95f6083b90fd590bcf52a8c17b45e8a850f2","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                        \"uuid\": workload[\"uuid\"],"},{"line_number":353,"context_line":"                        \"num\": str(idx)}"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"                    iter_success \u003d bool(itr[\"error\"])"},{"line_number":356,"context_line":"                    started_at \u003d dt.datetime.utcfromtimestamp(itr[\"timestamp\"])"},{"line_number":357,"context_line":"                    started_at \u003d started_at.strftime(consts.TimeFormat.ISO8601)"},{"line_number":358,"context_line":"                    iter_report \u003d {"}],"source_content_type":"text/x-python","patch_set":36,"id":"5f4e5783_2c3c0192","line":355,"in_reply_to":"5f4e5783_8b5be82c","updated":"2017-10-11 12:16:18.000000000","message":"good catch","commit_id":"691fd8a4fcd2574fd191f7c25840af63a96bc0f4"}],"rally/plugins/common/exporter/elastic/client.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def _check_response(resp, action\u003dNone):"},{"line_number":38,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":39,"context_line":"            return"},{"line_number":40,"context_line":"        # it is an error. let\u0027s try to find the reason"},{"line_number":41,"context_line":"        reason \u003d None"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_60d0ddf8","line":38,"updated":"2017-10-18 22:02:22.000000000","message":"if resp.status_code in [200, 201]: \n\n201 is going to be returned if you put document (not bulk ops)","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @staticmethod"},{"line_number":37,"context_line":"    def _check_response(resp, action\u003dNone):"},{"line_number":38,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":39,"context_line":"            return"},{"line_number":40,"context_line":"        # it is an error. let\u0027s try to find the reason"},{"line_number":41,"context_line":"        reason \u003d None"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_e81384b7","line":38,"in_reply_to":"3f4b6375_60d0ddf8","updated":"2017-10-19 12:36:17.000000000","message":"I checked this exporter with ElasticSearch 5.x and 2.x. I never got 201 status. But anyway, it will not make the things worse, so will add 201 as well.","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def version(self):"},{"line_number":60,"context_line":"        \"\"\"Get version of the ElasticSearch cluster.\"\"\""},{"line_number":61,"context_line":"        if self._version is None:"},{"line_number":62,"context_line":"            self.info()"},{"line_number":63,"context_line":"        return self._version"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def info(self):"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_c00af188","line":62,"updated":"2017-10-18 22:02:22.000000000","message":"Can we make info() more static (so it won\u0027t update self._version and other parts of fileds) field","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                  \" to ElasticSearch.\" %"},{"line_number":94,"context_line":"                  # dividing numbers by two, since each documents has 2 lines"},{"line_number":95,"context_line":"                  #     in `documents` (action and document itself)."},{"line_number":96,"context_line":"                  (len(documents) / 2, self.CHUNK_LENGTH / 2))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"},{"line_number":99,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_4024c10d","line":96,"updated":"2017-10-18 22:02:22.000000000","message":"You should not divide CHUNK_LENGTH by 2 we don\u0027t care about how many lines are in bulk operations, we care about amount of documents.","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                  \" to ElasticSearch.\" %"},{"line_number":94,"context_line":"                  # dividing numbers by two, since each documents has 2 lines"},{"line_number":95,"context_line":"                  #     in `documents` (action and document itself)."},{"line_number":96,"context_line":"                  (len(documents) / 2, self.CHUNK_LENGTH / 2))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"},{"line_number":99,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_a8d0ecca","line":96,"in_reply_to":"3f4b6375_4024c10d","updated":"2017-10-19 12:36:17.000000000","message":"\u003e we don\u0027t care about how many lines are in bulk operations, we care about amount of documents.\n\nIt is True. \"documents\" variable includes documents represented by 2 lines. The first line is a description of an action, the second is data itself. Since no one is interested in this information, the dividing is performed to represent number of documents, not number of lines.","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                  #     in `documents` (action and document itself)."},{"line_number":96,"context_line":"                  (len(documents) / 2, self.CHUNK_LENGTH / 2))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"},{"line_number":99,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            raw_resp \u003d requests.post(self._url + \"/_bulk\", data\u003ddata)"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_2021c5fc","line":98,"updated":"2017-10-18 22:02:22.000000000","message":"this is going to create potentially very large arrays, we should use six.range here","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                  #     in `documents` (action and document itself)."},{"line_number":96,"context_line":"                  (len(documents) / 2, self.CHUNK_LENGTH / 2))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        for pos in range(0, len(documents), self.CHUNK_LENGTH):"},{"line_number":99,"context_line":"            data \u003d \"\\n\".join(documents[pos:pos + self.CHUNK_LENGTH]) + \"\\n\""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            raw_resp \u003d requests.post(self._url + \"/_bulk\", data\u003ddata)"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_48005835","line":98,"in_reply_to":"3f4b6375_2021c5fc","updated":"2017-10-19 12:36:17.000000000","message":"Done","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"}],"rally/plugins/common/exporter/elastic/exporter.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            \"scenario_name\": {\"type\": \"keyword\"},"},{"line_number":100,"context_line":"            \"scenario_cfg\": {\"type\": \"keyword\"},"},{"line_number":101,"context_line":"            \"description\": {\"type\": \"text\"},"},{"line_number":102,"context_line":"            \"runner_type\": {\"type\": \"keyword\"},"},{"line_number":103,"context_line":"            \"runner_cfg\": {\"type\": \"keyword\"},"},{"line_number":104,"context_line":"            \"contexts\": {\"type\": \"keyword\"},"},{"line_number":105,"context_line":"            \"task_uuid\": {\"type\": \"keyword\"},"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_f3182576","line":102,"updated":"2017-10-18 22:02:22.000000000","message":"runner_name","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            \"scenario_name\": {\"type\": \"keyword\"},"},{"line_number":100,"context_line":"            \"scenario_cfg\": {\"type\": \"keyword\"},"},{"line_number":101,"context_line":"            \"description\": {\"type\": \"text\"},"},{"line_number":102,"context_line":"            \"runner_type\": {\"type\": \"keyword\"},"},{"line_number":103,"context_line":"            \"runner_cfg\": {\"type\": \"keyword\"},"},{"line_number":104,"context_line":"            \"contexts\": {\"type\": \"keyword\"},"},{"line_number":105,"context_line":"            \"task_uuid\": {\"type\": \"keyword\"},"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_28abdc1d","line":102,"in_reply_to":"3f4b6375_f3182576","updated":"2017-10-19 12:36:17.000000000","message":"Done","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            \"workload_uuid\": {\"type\": \"keyword\"},"},{"line_number":117,"context_line":"            \"scenario_cfg\": {\"type\": \"keyword\"},"},{"line_number":118,"context_line":"            \"contexts\": {\"type\": \"keyword\"},"},{"line_number":119,"context_line":"            \"runner_type\": {\"type\": \"keyword\"},"},{"line_number":120,"context_line":"            \"runner_cfg\": {\"type\": \"keyword\"},"},{"line_number":121,"context_line":"            \"success\": {\"type\": \"boolean\"},"},{"line_number":122,"context_line":"            \"duration\": {\"type\": \"float\"},"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_d32769b6","line":119,"updated":"2017-10-18 22:02:22.000000000","message":"runner_name","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            \"workload_uuid\": {\"type\": \"keyword\"},"},{"line_number":117,"context_line":"            \"scenario_cfg\": {\"type\": \"keyword\"},"},{"line_number":118,"context_line":"            \"contexts\": {\"type\": \"keyword\"},"},{"line_number":119,"context_line":"            \"runner_type\": {\"type\": \"keyword\"},"},{"line_number":120,"context_line":"            \"runner_cfg\": {\"type\": \"keyword\"},"},{"line_number":121,"context_line":"            \"success\": {\"type\": \"boolean\"},"},{"line_number":122,"context_line":"            \"duration\": {\"type\": \"float\"},"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_e8626416","line":119,"in_reply_to":"3f4b6375_d32769b6","updated":"2017-10-19 12:36:17.000000000","message":"Done","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"da4dc88a861cc95f58ce703b6ea2bd9cce4fb9f3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                sort_keys\u003dFalse))"},{"line_number":167,"context_line":"        self._report.append(json.dumps(body))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_indices(self):"},{"line_number":170,"context_line":"        \"\"\"Check available indices and create require ones if they missed.\"\"\""},{"line_number":171,"context_line":"        available_index \u003d set(self._client.list_indices())"},{"line_number":172,"context_line":"        missed_index \u003d {self.TASK_INDEX, self.WORKLOAD_INDEX,"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_7374359a","line":169,"updated":"2017-10-18 22:02:22.000000000","message":"Let\u0027s call this method: \n\n  _ensure_indices(self): \n    pass","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"41b2eb00488dca907de7c7aa06f65847b443c1a8","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                sort_keys\u003dFalse))"},{"line_number":167,"context_line":"        self._report.append(json.dumps(body))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_indices(self):"},{"line_number":170,"context_line":"        \"\"\"Check available indices and create require ones if they missed.\"\"\""},{"line_number":171,"context_line":"        available_index \u003d set(self._client.list_indices())"},{"line_number":172,"context_line":"        missed_index \u003d {self.TASK_INDEX, self.WORKLOAD_INDEX,"}],"source_content_type":"text/x-python","patch_set":42,"id":"3f4b6375_4873b8e8","line":169,"in_reply_to":"3f4b6375_7374359a","updated":"2017-10-19 12:36:17.000000000","message":"Done","commit_id":"c15be4d0dc0876768e8458f5af4edc00c388b826"}],"rally/ui/templates/ci/index.html":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"9946e1c29be35fde1b669703b756742c1685dcb4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/sla.txt\"\u003eSuccess criteria (SLA)\u003c/a\u003e \u003ccode\u003e$ rally task sla_check\u003c/code\u003e"},{"line_number":58,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/results.json.gz\"\u003eRaw results (JSON)\u003c/a\u003e \u003ccode\u003e$ rally task results\u003c/code\u003e"},{"line_number":59,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/junit.xml.gz\"\u003eJUNIT-XML report\u003c/a\u003e \u003ccode\u003e$ rally task export --type junit-xml\u003c/code\u003e"},{"line_number":60,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/junit.xml.gz\"\u003eElasticSearch x5 dump file\u003c/a\u003e \u003ccode\u003e$ rally task export --type elasticsearch\u003c/code\u003e"},{"line_number":61,"context_line":"    \u003c/ul\u003e"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    \u003ch2\u003eAbout Rally\u003c/h2\u003e"}],"source_content_type":"text/html","patch_set":29,"id":"7f515b1d_70eee7b4","line":60,"updated":"2017-09-27 20:31:07.000000000","message":"wrong URL it\u0027s not junit.xml.gz","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1d7ec14c1693494686116465519f43d4c8ae0132","unresolved":false,"context_lines":[{"line_number":57,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/sla.txt\"\u003eSuccess criteria (SLA)\u003c/a\u003e \u003ccode\u003e$ rally task sla_check\u003c/code\u003e"},{"line_number":58,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/results.json.gz\"\u003eRaw results (JSON)\u003c/a\u003e \u003ccode\u003e$ rally task results\u003c/code\u003e"},{"line_number":59,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/junit.xml.gz\"\u003eJUNIT-XML report\u003c/a\u003e \u003ccode\u003e$ rally task export --type junit-xml\u003c/code\u003e"},{"line_number":60,"context_line":"      \u003cli\u003e\u003ca href\u003d\"rally-plot/junit.xml.gz\"\u003eElasticSearch x5 dump file\u003c/a\u003e \u003ccode\u003e$ rally task export --type elasticsearch\u003c/code\u003e"},{"line_number":61,"context_line":"    \u003c/ul\u003e"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    \u003ch2\u003eAbout Rally\u003c/h2\u003e"}],"source_content_type":"text/html","patch_set":29,"id":"7f515b1d_627844c3","line":60,"in_reply_to":"7f515b1d_70eee7b4","updated":"2017-09-28 15:15:11.000000000","message":"nice catch","commit_id":"485560e2ee9057f0fc533e078a8267d680ca0515"}],"requirements.txt":[{"author":{"_account_id":22960,"name":"Hai Shi","email":"shihai1992@gmail.com","username":"haishi"},"change_message_id":"7302ca98e177ab68ed58fe8816abcb5a20d51c65","unresolved":false,"context_lines":[{"line_number":26,"context_line":"SQLAlchemy\u003e\u003d1.0.10,!\u003d1.1.5,!\u003d1.1.6,!\u003d1.1.7,!\u003d1.1.8,\u003c\u003d1.2.0b2  # MIT"},{"line_number":27,"context_line":"six\u003e\u003d1.9.0,\u003c\u003d1.10.0                                    # MIT"},{"line_number":28,"context_line":"virtualenv\u003e\u003d13.1.0,\u003c\u003d15.1.0                            # MIT"},{"line_number":29,"context_line":"elasticsearch"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# OpenStack related"},{"line_number":32,"context_line":"boto\u003e\u003d2.32.1,\u003c\u003d2.48.0                                  # MIT"}],"source_content_type":"text/plain","patch_set":22,"id":"7f515b1d_e5660952","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":13},"updated":"2017-09-23 09:23:18.000000000","message":"should we define the version?","commit_id":"02c342ce604e30c968c69fdaf0d2178a18124646"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"cedcab6330ffb5ec97bfb6372550989eda01747e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"SQLAlchemy\u003e\u003d1.0.10,!\u003d1.1.5,!\u003d1.1.6,!\u003d1.1.7,!\u003d1.1.8,\u003c\u003d1.2.0b2  # MIT"},{"line_number":27,"context_line":"six\u003e\u003d1.9.0,\u003c\u003d1.10.0                                    # MIT"},{"line_number":28,"context_line":"virtualenv\u003e\u003d13.1.0,\u003c\u003d15.1.0                            # MIT"},{"line_number":29,"context_line":"elasticsearch"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# OpenStack related"},{"line_number":32,"context_line":"boto\u003e\u003d2.32.1,\u003c\u003d2.48.0                                  # MIT"}],"source_content_type":"text/plain","patch_set":22,"id":"7f515b1d_ceaf9e92","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":13},"in_reply_to":"7f515b1d_e5660952","updated":"2017-09-25 12:28:53.000000000","message":"Ok, It looks like your question is valid. We cannot write the code compatible with all libraries, so let\u0027s use 5\u003c6 limits.","commit_id":"02c342ce604e30c968c69fdaf0d2178a18124646"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"f1a3869af9347c6ca8d87277c4b8e54cb1aec3b7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"SQLAlchemy\u003e\u003d1.0.10,!\u003d1.1.5,!\u003d1.1.6,!\u003d1.1.7,!\u003d1.1.8,\u003c\u003d1.2.0b2  # MIT"},{"line_number":27,"context_line":"six\u003e\u003d1.9.0,\u003c\u003d1.10.0                                    # MIT"},{"line_number":28,"context_line":"virtualenv\u003e\u003d13.1.0,\u003c\u003d15.1.0                            # MIT"},{"line_number":29,"context_line":"elasticsearch"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# OpenStack related"},{"line_number":32,"context_line":"boto\u003e\u003d2.32.1,\u003c\u003d2.48.0                                  # MIT"}],"source_content_type":"text/plain","patch_set":22,"id":"7f515b1d_e599691f","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":13},"in_reply_to":"7f515b1d_e5660952","updated":"2017-09-23 10:09:16.000000000","message":"actually, this library suc*s (as like docker python library). Use need to use different versions of python library based on the API you have.\n\nFrom the https://pypi.python.org/pypi/elasticsearch/5.0.0:\n\n  # Elasticsearch 5.x\n  elasticsearch\u003e\u003d5.0.0,\u003c6.0.0\n\n  # Elasticsearch 2.x\n  elasticsearch\u003e\u003d2.0.0,\u003c3.0.0\n\n  # Elasticsearch 1.x\n  elasticsearch\u003e\u003d1.0.0,\u003c2.0.0\n\n  # Elasticsearch 0.90.x\n  elasticsearch\u003c1.0.0\n\nBut yeah, at least we need to document it somewhere.","commit_id":"02c342ce604e30c968c69fdaf0d2178a18124646"}]}
