)]}'
{"monasca_api/tests/test_query_helpers.py":[{"author":{"_account_id":26702,"name":"Nicolas Seyvet","email":"nseyvet@op5.com","username":"nseyvet"},"change_message_id":"54e2d3341ecf59b272ef7d474410fb50b38e684a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        self.assertEqual(result, [\"foo\u003dspam%3Dham\"])"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class TestValidateTimestampRange(base.BaseTestCase):"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def test_validate_timestamp_range(self):"},{"line_number":155,"context_line":"        timestamp \u003d time.time() * 1000"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_3dab3675","line":152,"range":{"start_line":152,"start_character":5,"end_line":152,"end_character":51},"updated":"2018-02-13 08:48:44.000000000","message":"Not sure about general guidelines, should not this be its own file?","commit_id":"e05d93fa493ee2b3d75f3aff417cb64af578c960"},{"author":{"_account_id":22157,"name":"Andrea Adams","email":"aadams@hpe.com","username":"andrea.adams"},"change_message_id":"08f97b1e5986bb3d0f8abf8f9cf0006c73a847f8","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        self.assertEqual(result, [\"foo\u003dspam%3Dham\"])"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"class TestValidateTimestampRange(base.BaseTestCase):"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def test_validate_timestamp_range(self):"},{"line_number":155,"context_line":"        timestamp \u003d time.time() * 1000"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_28920458","line":152,"range":{"start_line":152,"start_character":5,"end_line":152,"end_character":51},"in_reply_to":"3fa0c359_3dab3675","updated":"2018-02-13 20:44:01.000000000","message":"Done","commit_id":"e05d93fa493ee2b3d75f3aff417cb64af578c960"}],"monasca_api/tests/test_validation.py":[{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"7eb60d9d6b31672c07573046714099eb7d8ab17b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"# Copyright 2015 Cray Inc. All Rights Reserved."},{"line_number":3,"context_line":"# Copyright 2017 Fujitsu LIMITED"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_8d74669e","line":1,"range":{"start_line":1,"start_character":25,"end_line":1,"end_character":26},"updated":"2018-02-14 23:07:07.000000000","message":"copyright :-)","commit_id":"0e2207e571540d5ab2889b7976902accf2d613d4"},{"author":{"_account_id":22157,"name":"Andrea Adams","email":"aadams@hpe.com","username":"andrea.adams"},"change_message_id":"28b79e9ec55fc4148f856b5f22837bcdafcc7eb6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"# Copyright 2015 Cray Inc. All Rights Reserved."},{"line_number":3,"context_line":"# Copyright 2017 Fujitsu LIMITED"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_8dd1c632","line":1,"range":{"start_line":1,"start_character":25,"end_line":1,"end_character":26},"in_reply_to":"3fa0c359_8d74669e","updated":"2018-02-14 23:25:45.000000000","message":"Done","commit_id":"0e2207e571540d5ab2889b7976902accf2d613d4"}],"monasca_api/tests/test_validation_helpers.py":[{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"118d2dd73dc4f3fec28f3b7c421d88f5cb27904d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_940a46cf","line":1,"updated":"2018-02-14 09:20:09.000000000","message":"All helpers validation test cases are implemented in test_validation.py.\nIt is better not to have a separate file for each helper validation.\nIn my opinion, it is better to move whole TestValidateTimestampRange into test_validation.py","commit_id":"44d549aa3442dcf892f98e86cab06857d2394795"},{"author":{"_account_id":22157,"name":"Andrea Adams","email":"aadams@hpe.com","username":"andrea.adams"},"change_message_id":"5a6222d23688a29016eccbce69bbf5a6cfa762a3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_b2f3bd73","line":1,"in_reply_to":"3fa0c359_75bd31b5","updated":"2018-02-14 22:50:15.000000000","message":"Done","commit_id":"44d549aa3442dcf892f98e86cab06857d2394795"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"424aabbcbf3add4c19ffb77a093ce7dfa303cd1b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_75bd31b5","line":1,"in_reply_to":"3fa0c359_940a46cf","updated":"2018-02-14 13:51:14.000000000","message":"+1","commit_id":"44d549aa3442dcf892f98e86cab06857d2394795"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"118d2dd73dc4f3fec28f3b7c421d88f5cb27904d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def test_validate_timestamp_range_invalid_future(self):"},{"line_number":38,"context_line":"        timestamp \u003d time.time() * 1000 + ONE_MINUTE * 2"},{"line_number":39,"context_line":"        metric \u003d {\u0027timestamp\u0027: timestamp}"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            helpers.validate_timestamp_range(metric, should_validate\u003dTrue,"},{"line_number":42,"context_line":"                                             future_seconds\u003dONE_MINUTE,"},{"line_number":43,"context_line":"                                             past_seconds\u003dONE_WEEK)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_d48a0e62","line":40,"updated":"2018-02-14 09:20:09.000000000","message":"using assertRaise makes it more clear and no need for exception handler in the test:\nself.assertRaises(HTTPUnprocessableEntityError,\n                             helpers.validate_timestamp_range,\n                             metric,\n                             should_validate\u003dTrue,\n                             future_seconds\u003dONE_MINUTE,\n                             past_seconds\u003dONE_WEEK)","commit_id":"44d549aa3442dcf892f98e86cab06857d2394795"},{"author":{"_account_id":22157,"name":"Andrea Adams","email":"aadams@hpe.com","username":"andrea.adams"},"change_message_id":"5a6222d23688a29016eccbce69bbf5a6cfa762a3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def test_validate_timestamp_range_invalid_future(self):"},{"line_number":38,"context_line":"        timestamp \u003d time.time() * 1000 + ONE_MINUTE * 2"},{"line_number":39,"context_line":"        metric \u003d {\u0027timestamp\u0027: timestamp}"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            helpers.validate_timestamp_range(metric, should_validate\u003dTrue,"},{"line_number":42,"context_line":"                                             future_seconds\u003dONE_MINUTE,"},{"line_number":43,"context_line":"                                             past_seconds\u003dONE_WEEK)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_92eec189","line":40,"in_reply_to":"3fa0c359_d48a0e62","updated":"2018-02-14 22:50:15.000000000","message":"Nice suggestion. Done","commit_id":"44d549aa3442dcf892f98e86cab06857d2394795"}],"monasca_api/v2/reference/helpers.py":[{"author":{"_account_id":26702,"name":"Nicolas Seyvet","email":"nseyvet@op5.com","username":"nseyvet"},"change_message_id":"54e2d3341ecf59b272ef7d474410fb50b38e684a","unresolved":false,"context_lines":[{"line_number":782,"context_line":"    if time_diff \u003e future_seconds or time_diff \u003c -1 * past_seconds:"},{"line_number":783,"context_line":"        msg \u003d \"timestamp {} is out of legal range\".format(timestamp)"},{"line_number":784,"context_line":"        LOG.exception(msg)"},{"line_number":785,"context_line":"        raise HTTPUnprocessableEntityError(\"Unprocessable Entity\", str(msg))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_bd97463a","line":785,"range":{"start_line":785,"start_character":14,"end_line":785,"end_character":42},"updated":"2018-02-13 08:48:44.000000000","message":"The API is rejecting a valid entity but the current exception indicates the opposite. Could it make sense to define a specific exception for this kind of handling where the incoming entity is valid but gets rejected because of a specific filter?","commit_id":"e05d93fa493ee2b3d75f3aff417cb64af578c960"},{"author":{"_account_id":22157,"name":"Andrea Adams","email":"aadams@hpe.com","username":"andrea.adams"},"change_message_id":"08f97b1e5986bb3d0f8abf8f9cf0006c73a847f8","unresolved":false,"context_lines":[{"line_number":782,"context_line":"    if time_diff \u003e future_seconds or time_diff \u003c -1 * past_seconds:"},{"line_number":783,"context_line":"        msg \u003d \"timestamp {} is out of legal range\".format(timestamp)"},{"line_number":784,"context_line":"        LOG.exception(msg)"},{"line_number":785,"context_line":"        raise HTTPUnprocessableEntityError(\"Unprocessable Entity\", str(msg))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_480d10e6","line":785,"range":{"start_line":785,"start_character":14,"end_line":785,"end_character":42},"in_reply_to":"3fa0c359_bd97463a","updated":"2018-02-13 20:44:01.000000000","message":"I understand your worry but I am unable to find another HTTP error code that would better fit this situation. HTTPUnprocessableEntityError (422) is for a request that is essentially correct, but has a syntax error. Do you have any specific ideas of a better error code to throw?","commit_id":"e05d93fa493ee2b3d75f3aff417cb64af578c960"}]}
