)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"8a1d7ff7a85afe34e367e0c03c3774e1918a0db1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add REST API endpoint for the third page view"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds a rest api endpoint for the third page view. It takes"},{"line_number":10,"context_line":"in a key value pair from the url and returns a time series dict of all"},{"line_number":11,"context_line":"the test runs which ran as part of a run which match the metadata key"},{"line_number":12,"context_line":"value pair. The start date, stop date, and resolution of the time"},{"line_number":13,"context_line":"series is adjustable with url params."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a2ca52d_ed55491d","line":10,"updated":"2015-10-13 21:39:07.000000000","message":"Maybe the goal of the api being added changed during the submitted patches. The current endpoint do not get metadata key and value, but only the \u0027build_name\u0027 value. If this is the final patch intent, this description should be updated.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5ef90a1f7a29c84027a1a4cfec650eb173d88e83","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add REST API endpoint for the third page view"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds a rest api endpoint for the third page view. It takes"},{"line_number":10,"context_line":"in a key value pair from the url and returns a time series dict of all"},{"line_number":11,"context_line":"the test runs which ran as part of a run which match the metadata key"},{"line_number":12,"context_line":"value pair. The start date, stop date, and resolution of the time"},{"line_number":13,"context_line":"series is adjustable with url params."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a2ca52d_d7223c01","line":10,"in_reply_to":"5a2ca52d_ed55491d","updated":"2015-10-14 14:15:43.000000000","message":"Done","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"}],"openstack_health/api.py":[{"author":{"_account_id":17995,"name":"Glauco Oliveira","email":"gvinici@thoughtworks.com","username":"glauco"},"change_message_id":"eea8fb152b38c16b6e4e3d0343d08e076d99484f","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    return test_runs"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"@app.route(\u0027/tests/key/\u003cstring:key\u003e/value/\u003cstring:value\u003e\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":240,"context_line":"def get_tests_by_key_value(key, value):"},{"line_number":241,"context_line":"    global Session"},{"line_number":242,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_133f66d7","line":239,"updated":"2015-10-06 21:16:04.000000000","message":"A better way of handling the key and value in that case, following the REST way, would be changing both to be informed on querystring as /tests?key\u003d\u003cstring:key\u003e\u0026value\u003d\u003cstring:value\u003e","commit_id":"7f598ace9df45c79a121b3fd9a0855ab939827c3"},{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"cf321c3abda18d7677690fb4e3d97b08be676c9e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    return test_runs"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"@app.route(\u0027/tests/key/\u003cstring:key\u003e/value/\u003cstring:value\u003e\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":240,"context_line":"def get_tests_by_key_value(key, value):"},{"line_number":241,"context_line":"    global Session"},{"line_number":242,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_85ba4922","line":239,"in_reply_to":"7a2fa921_133f66d7","updated":"2015-10-06 21:23:09.000000000","message":"Since the resource we are trying to get is the \"test\", and metadata key and values are attributes which filter the resources being requested, I agree with that way passing key and value as get parameters. More meaninful.","commit_id":"7f598ace9df45c79a121b3fd9a0855ab939827c3"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"74d3c6d98da47f5102386678594b9bf117d46ad9","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    return test_runs"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"@app.route(\u0027/tests/key/\u003cstring:key\u003e/value/\u003cstring:value\u003e\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":240,"context_line":"def get_tests_by_key_value(key, value):"},{"line_number":241,"context_line":"    global Session"},{"line_number":242,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_704bfb87","line":239,"in_reply_to":"7a2fa921_85ba4922","updated":"2015-10-07 20:55:42.000000000","message":"Done","commit_id":"7f598ace9df45c79a121b3fd9a0855ab939827c3"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ae3e62c91bba754dc31ac277e9c0c5cfa426f1ca","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    return test_runs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"@app.route(\u0027/runs/test_runs\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":250,"context_line":"def get_tests_by_key_value():"},{"line_number":251,"context_line":"    global Session"},{"line_number":252,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_346bbe86","line":249,"updated":"2015-10-10 05:29:48.000000000","message":"I\u0027m wondering if the endpoint would be better as /build_name/\u003cstring:build_name\u003e/test_runs it seems to fit in a bit with the other routes we have. The tradeoff is that it\u0027s a bit less flexible because it\u0027ll only work with build name as the key. So if we ever want views with test lists on other key value pairs we\u0027ll have to add an additional, almost identical route.","commit_id":"9fa26388099ab4ea5cae34a37f901f7b411e7890"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"a9c7a72317fcaa76d9052528a5604e4afc5b32da","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    return test_runs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"@app.route(\u0027/runs/test_runs\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":250,"context_line":"def get_tests_by_key_value():"},{"line_number":251,"context_line":"    global Session"},{"line_number":252,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_aed42b47","line":249,"in_reply_to":"7a2fa921_346bbe86","updated":"2015-10-12 18:58:47.000000000","message":"That would be unfortunate, but it actually feels more \"RESTful\" to me","commit_id":"9fa26388099ab4ea5cae34a37f901f7b411e7890"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"fc54c705ef1327639185f0de0a490a463050069b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    return test_runs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"@app.route(\u0027/runs/test_runs\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":250,"context_line":"def get_tests_by_key_value():"},{"line_number":251,"context_line":"    global Session"},{"line_number":252,"context_line":"    session \u003d Session()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_71cb4873","line":249,"in_reply_to":"7a2fa921_aed42b47","updated":"2015-10-13 02:33:29.000000000","message":"Done","commit_id":"9fa26388099ab4ea5cae34a37f901f7b411e7890"},{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"5c85ddb1d1fed5b4ec0c57eb741a4f451b371eaa","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    return pass_count, fail_count, skip_count"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def _group_test_runs_by_date_res(res, tests):"},{"line_number":178,"context_line":"    test_runs \u003d {}"},{"line_number":179,"context_line":"    for test_run in tests:"},{"line_number":180,"context_line":"        # Correct resolution"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_841db011","line":177,"updated":"2015-10-13 11:11:28.000000000","message":"Don\u0027t you think we could keep in api module just the functions which handle the entry points? So, these aditional functions could be relocated to new modules.\n\nThis function specifically also have high complexity level, maybe there is a way to split some logical blocks with more clear responsibility each one.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"38fd82c455a895e0a74e57d82367c0886b0ddd02","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    return pass_count, fail_count, skip_count"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def _group_test_runs_by_date_res(res, tests):"},{"line_number":178,"context_line":"    test_runs \u003d {}"},{"line_number":179,"context_line":"    for test_run in tests:"},{"line_number":180,"context_line":"        # Correct resolution"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_a93af7cb","line":177,"in_reply_to":"5a2ca52d_841db011","updated":"2015-10-13 14:46:17.000000000","message":"While I suspect that a cyclomatic complexity examiner will complain about this method, it looks fairly straightforward to me.\n\nIf a new module were to hold common code, then it makes sense to me.  Otherwise, not","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5ef90a1f7a29c84027a1a4cfec650eb173d88e83","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    return pass_count, fail_count, skip_count"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def _group_test_runs_by_date_res(res, tests):"},{"line_number":178,"context_line":"    test_runs \u003d {}"},{"line_number":179,"context_line":"    for test_run in tests:"},{"line_number":180,"context_line":"        # Correct resolution"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_b1b1d091","line":177,"in_reply_to":"5a2ca52d_a93af7cb","updated":"2015-10-14 14:15:43.000000000","message":"I think that\u0027d be fine as a follow up cleanup, I don\u0027t think we need to block this over code organization.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"8a1d7ff7a85afe34e367e0c03c3774e1918a0db1","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"@app.route(\u0027/build_name/\u003cstring:build_name\u003e/test_runs\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":253,"context_line":"def get_tests_by_key_value(build_name):"},{"line_number":254,"context_line":"    global Session"},{"line_number":255,"context_line":"    session \u003d Session()"},{"line_number":256,"context_line":"    key \u003d \u0027build_name\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_cd496dd2","line":253,"updated":"2015-10-13 21:39:07.000000000","message":"The current function actually always get test_runs by \u0027build_name\u0027 and not by any metadata key and value. Maybe the function name could describe better this behaviour.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5ef90a1f7a29c84027a1a4cfec650eb173d88e83","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"@app.route(\u0027/build_name/\u003cstring:build_name\u003e/test_runs\u0027, methods\u003d[\u0027GET\u0027])"},{"line_number":253,"context_line":"def get_tests_by_key_value(build_name):"},{"line_number":254,"context_line":"    global Session"},{"line_number":255,"context_line":"    session \u003d Session()"},{"line_number":256,"context_line":"    key \u003d \u0027build_name\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_3164e020","line":253,"in_reply_to":"5a2ca52d_cd496dd2","updated":"2015-10-14 14:15:43.000000000","message":"Sure I can rename the function.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"5c85ddb1d1fed5b4ec0c57eb741a4f451b371eaa","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                                        stop_date, session)"},{"line_number":268,"context_line":"    tests \u003d _group_test_runs_by_date_res(date_range, tests)"},{"line_number":269,"context_line":"    out_tests \u003d {}"},{"line_number":270,"context_line":"    for test in tests:"},{"line_number":271,"context_line":"        out_tests[test.isoformat()] \u003d tests[test]"},{"line_number":272,"context_line":"    return jsonify({\u0027tests\u0027: out_tests})"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_843cd030","line":270,"updated":"2015-10-13 11:11:28.000000000","message":"Seems this iteration should be inside _group_test_runs_by_date_res function.","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"38fd82c455a895e0a74e57d82367c0886b0ddd02","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                                        stop_date, session)"},{"line_number":268,"context_line":"    tests \u003d _group_test_runs_by_date_res(date_range, tests)"},{"line_number":269,"context_line":"    out_tests \u003d {}"},{"line_number":270,"context_line":"    for test in tests:"},{"line_number":271,"context_line":"        out_tests[test.isoformat()] \u003d tests[test]"},{"line_number":272,"context_line":"    return jsonify({\u0027tests\u0027: out_tests})"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_a9af57e2","line":270,"in_reply_to":"5a2ca52d_843cd030","updated":"2015-10-13 14:46:17.000000000","message":"Yes, we could - Matt, what do you think?","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5ef90a1f7a29c84027a1a4cfec650eb173d88e83","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                                        stop_date, session)"},{"line_number":268,"context_line":"    tests \u003d _group_test_runs_by_date_res(date_range, tests)"},{"line_number":269,"context_line":"    out_tests \u003d {}"},{"line_number":270,"context_line":"    for test in tests:"},{"line_number":271,"context_line":"        out_tests[test.isoformat()] \u003d tests[test]"},{"line_number":272,"context_line":"    return jsonify({\u0027tests\u0027: out_tests})"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_f7573800","line":270,"in_reply_to":"5a2ca52d_a9af57e2","updated":"2015-10-14 14:15:43.000000000","message":"I guess it\u0027s 1 less loop which will be a bit more efficient, I\u0027ll respin it to change that","commit_id":"460c7b3c2748b3f0f723a409712769693677994a"}],"openstack_health/tests/test_api.py":[{"author":{"_account_id":18001,"name":"Caio Carrara","email":"ccarrara@thoughtworks.com","username":"caiocarrara"},"change_message_id":"571b72f5f87367baf2519fa7512103bd69cad933","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                     \u0027start_time\u0027: timestamp_a,"},{"line_number":67,"context_line":"                     \u0027stop_time\u0027: timestamp_b}"},{"line_number":68,"context_line":"                ])"},{"line_number":69,"context_line":"    def test_get_tests_by_key_value(self, api_mock):"},{"line_number":70,"context_line":"        res \u003d self.app.get(\u0027/build_name/fake_tests/test_runs\u0027)"},{"line_number":71,"context_line":"        self.assertEqual(200, res.status_code)"},{"line_number":72,"context_line":"        api_mock.assert_called_once_with(\u0027build_name\u0027, \u0027fake_tests\u0027, None,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a2ca52d_b5e1b39c","line":69,"updated":"2015-10-14 16:37:20.000000000","message":"Here the function name was not updated to reflect the behaviour of getting tests only by build_name.","commit_id":"067529d65a2b51522282459d4b7d4fab50e313ae"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"e2022ba790356ccf246efbafe5631e9f47e7bab4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                     \u0027start_time\u0027: timestamp_a,"},{"line_number":67,"context_line":"                     \u0027stop_time\u0027: timestamp_b}"},{"line_number":68,"context_line":"                ])"},{"line_number":69,"context_line":"    def test_get_tests_by_key_value(self, api_mock):"},{"line_number":70,"context_line":"        res \u003d self.app.get(\u0027/build_name/fake_tests/test_runs\u0027)"},{"line_number":71,"context_line":"        self.assertEqual(200, res.status_code)"},{"line_number":72,"context_line":"        api_mock.assert_called_once_with(\u0027build_name\u0027, \u0027fake_tests\u0027, None,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a2ca52d_0a907442","line":69,"in_reply_to":"5a2ca52d_b5e1b39c","updated":"2015-10-14 22:22:24.000000000","message":"Done","commit_id":"067529d65a2b51522282459d4b7d4fab50e313ae"}]}
