)]}'
{"rally/api.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ee76976aa8db698193fb22f5668e379ef3402768","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        from six.moves import builtins"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        env \u003d jinja2.Environment("},{"line_number":155,"context_line":"            loader\u003djinja2.FileSystemLoader(\"/\", encoding\u003d\"utf8\"))"},{"line_number":156,"context_line":"        ast \u003d env.parse(task_template)"},{"line_number":157,"context_line":"        required_kwargs \u003d jinja2.meta.find_undeclared_variables(ast)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_a4c9c05c","line":155,"updated":"2015-09-20 22:02:12.000000000","message":"Path looks to wide \"/\"... It is all file system. \nI believe there could be issues relaed to performance with such path. \n\nWhy not just path of the main task file dir(main_task_file) ?","commit_id":"b4299734d5bd9db38e77987fb8543aa5525794f6"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"96d87e3a917aec2afd5b76e135b0cca6ba9958fb","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        from six.moves import builtins"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        env \u003d jinja2.Environment("},{"line_number":155,"context_line":"            loader\u003djinja2.FileSystemLoader(\"/\", encoding\u003d\"utf8\"))"},{"line_number":156,"context_line":"        ast \u003d env.parse(task_template)"},{"line_number":157,"context_line":"        required_kwargs \u003d jinja2.meta.find_undeclared_variables(ast)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_272a8f2d","line":155,"in_reply_to":"ba15a1d1_54788ff8","updated":"2015-09-21 05:26:05.000000000","message":"Yuki could you join IRC please and ping me boris-42","commit_id":"b4299734d5bd9db38e77987fb8543aa5525794f6"},{"author":{"_account_id":14764,"name":"Yuki Nishiwaki","email":"uckey.1067@gmail.com","username":"ukinau"},"change_message_id":"f64d59d54ff9e5133bace428df7c2439c5083372","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        from six.moves import builtins"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        env \u003d jinja2.Environment("},{"line_number":155,"context_line":"            loader\u003djinja2.FileSystemLoader(\"/\", encoding\u003d\"utf8\"))"},{"line_number":156,"context_line":"        ast \u003d env.parse(task_template)"},{"line_number":157,"context_line":"        required_kwargs \u003d jinja2.meta.find_undeclared_variables(ast)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_54788ff8","line":155,"in_reply_to":"ba15a1d1_a4c9c05c","updated":"2015-09-21 05:24:27.000000000","message":"If you call method to try search all file like template_list method, It is issues for performance. But in here, these method have never called. So I think it isn\u0027t much matter.\n\nYour advice(dir(main_task_file)) is sounds good.\nBut we need to change interface of render_template method in order to achieve it. I thought I don\u0027t impact much other code.\n\nappendix.\n\nThe loader of jinja2 is awkward tool. \nWe have to consider the path fully we define here.\n\ne.g. \n\nIf you specify \"./\" as path like following\n\njinja2.FileSystemLoader(\"./\", encoding\u003d\"utf8\"))\n\nyou can\u0027t specify following pattern as path\n\n - /var/lib/rally/hogehoge.json  \u003c- full path\n\n - ../hogehoge.json    \u003c- relative path\n\nyou can specify only pattern\n\n - hogehoge.json\n\n - hogedir/hogehoge.json","commit_id":"b4299734d5bd9db38e77987fb8543aa5525794f6"}],"tests/unit/cli/commands/test_task.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"367636ef7c46d7cb11aeaf13e0b4c197f98480f7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                mock.mock_open(read_data\u003dinput_task).return_value"},{"line_number":113,"context_line":"            ]"},{"line_number":114,"context_line":"            with mock.patch(\"os.path.dirname\","},{"line_number":115,"context_line":"                            return_value\u003dos.path.dirname(other_template_path)):"},{"line_number":116,"context_line":"                actual \u003d self.task._load_task(\"in_task\")"},{"line_number":117,"context_line":"        self.assertEqual(expect, actual)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_6bb1b000","line":115,"updated":"2015-09-23 15:21:43.000000000","message":"Why do you patch dirname to call dirname? Seems like it doesn\u0027t need to be patched at all.","commit_id":"b1c93cb7ba9024a6fa389beddad74969f1eb9693"},{"author":{"_account_id":14764,"name":"Yuki Nishiwaki","email":"uckey.1067@gmail.com","username":"ukinau"},"change_message_id":"cb66e08df84264917e5eecf4d83b400eda5a1ff7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                mock.mock_open(read_data\u003dinput_task).return_value"},{"line_number":113,"context_line":"            ]"},{"line_number":114,"context_line":"            with mock.patch(\"os.path.dirname\","},{"line_number":115,"context_line":"                            return_value\u003dos.path.dirname(other_template_path)):"},{"line_number":116,"context_line":"                actual \u003d self.task._load_task(\"in_task\")"},{"line_number":117,"context_line":"        self.assertEqual(expect, actual)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_40ef84b0","line":115,"in_reply_to":"9a1a9d01_3d2cf7aa","updated":"2015-09-24 14:40:30.000000000","message":"Done","commit_id":"b1c93cb7ba9024a6fa389beddad74969f1eb9693"},{"author":{"_account_id":14764,"name":"Yuki Nishiwaki","email":"uckey.1067@gmail.com","username":"ukinau"},"change_message_id":"27ee3496afe1e44da472ee54323b35169482c9d9","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                mock.mock_open(read_data\u003dinput_task).return_value"},{"line_number":113,"context_line":"            ]"},{"line_number":114,"context_line":"            with mock.patch(\"os.path.dirname\","},{"line_number":115,"context_line":"                            return_value\u003dos.path.dirname(other_template_path)):"},{"line_number":116,"context_line":"                actual \u003d self.task._load_task(\"in_task\")"},{"line_number":117,"context_line":"        self.assertEqual(expect, actual)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_cb2303bc","line":115,"in_reply_to":"ba15a1d1_6bb1b000","updated":"2015-09-24 04:04:18.000000000","message":"os.path.dirname is called  in TaskCommands._load_task in order to detect directory which contain benchmark tasks.\n\nSo if I don\u0027t patch to it,  the directory is \"./\" (because of os.path.dirname(\"in_task\")) and Failed to load \"samples/tasks/scenarios/nova/boot.json\"","commit_id":"b1c93cb7ba9024a6fa389beddad74969f1eb9693"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"c86061759a140180e48e7615385c09f315550512","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                mock.mock_open(read_data\u003dinput_task).return_value"},{"line_number":113,"context_line":"            ]"},{"line_number":114,"context_line":"            with mock.patch(\"os.path.dirname\","},{"line_number":115,"context_line":"                            return_value\u003dos.path.dirname(other_template_path)):"},{"line_number":116,"context_line":"                actual \u003d self.task._load_task(\"in_task\")"},{"line_number":117,"context_line":"        self.assertEqual(expect, actual)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_3d2cf7aa","line":115,"in_reply_to":"ba15a1d1_cb2303bc","updated":"2015-09-24 14:30:13.000000000","message":"That makes sense, but I think it\u0027d be better to do something like:\n\n    input_task_file \u003d os.path.join(os.path.dirname(other_template_path), \"input_task.json\")\n    ...\n    actual \u003d self.task._load_task(input_task_file)\n\nThen people won\u0027t wonder why you\u0027re mocking os.path.dirname out to os.path.dirname. :)","commit_id":"b1c93cb7ba9024a6fa389beddad74969f1eb9693"}]}
