)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":19457,"name":"aditi sharma","email":"adi.sky17@gmail.com","username":"aditi"},"change_message_id":"f5fca984af877032aa230100bdc8678210aaf052","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use jsonschema to validate efficacy indicators"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces voplutuous with JSON-schema to validate"},{"line_number":10,"context_line":"efficacy indicator.Since in watcher we want to remove voluptuous"},{"line_number":11,"context_line":"and use JSONSchema as our only JSON validation tool to keep consistency."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9f6a8fd7_198e23d0","line":9,"updated":"2018-04-18 05:20:57.000000000","message":"s/voplutuous/voluptuous","commit_id":"1c508da935df62c04b71b862b01785b172352bf4"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"0f4abbc79f48e2351e6bb268f88eb024a2aaa7b5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use jsonschema to validate efficacy indicators"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces voluptuous with JSON-schema to validate"},{"line_number":10,"context_line":"efficacy indicator.Since in watcher we want to remove voluptuous"},{"line_number":11,"context_line":"and use JSONSchema as our only JSON validation tool to keep consistency."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iaa77566f1cdfdac03ce8e7d5a75406274c7d5298"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_a5c18fe6","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":24},"updated":"2018-06-25 08:39:00.000000000","message":"IMHO it should be included into one sequence.","commit_id":"1833b288dd32402ffcd01409c7a15031247ee915"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"57e9254bcd17955b8b6fd3a28de3f15949b8486e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use jsonschema to validate efficacy indicators"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces voluptuous with JSON-schema to validate"},{"line_number":10,"context_line":"efficacy indicator.Since in watcher we want to remove voluptuous"},{"line_number":11,"context_line":"and use JSONSchema as our only JSON validation tool to keep consistency."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iaa77566f1cdfdac03ce8e7d5a75406274c7d5298"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_d4af0cde","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":24},"in_reply_to":"5f7c97a3_a5c18fe6","updated":"2018-07-02 05:43:45.000000000","message":"Done","commit_id":"1833b288dd32402ffcd01409c7a15031247ee915"}],"watcher/decision_engine/goal/efficacy/base.py":[{"author":{"_account_id":27947,"name":"Egor Panfilov","email":"edpanfilov@sbcloud.ru","username":"erakli"},"change_message_id":"c9294463ed8f7f6b0985f43894d3782bbf13c0f7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            \"required\": []"},{"line_number":72,"context_line":"        }"},{"line_number":73,"context_line":"        for indicator in self.indicators_specs:"},{"line_number":74,"context_line":"            schema[\"properties\"].update({indicator.name: indicator.schema})"},{"line_number":75,"context_line":"            schema[\"required\"].append(indicator.name)"},{"line_number":76,"context_line":"        return schema"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_63a6e411","line":74,"range":{"start_line":74,"start_character":12,"end_line":74,"end_character":75},"updated":"2018-04-25 19:13:56.000000000","message":"Why you used update() method here? It sufficient to update values in current dict with other dict. Here we have only one key-value pair, so it could be simplified to:\n\nschema[\"properties\"][indicator.name] \u003d indicator.schema","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"6ad14a519cdb0314194681cba8019f38b38f2540","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            \"required\": []"},{"line_number":72,"context_line":"        }"},{"line_number":73,"context_line":"        for indicator in self.indicators_specs:"},{"line_number":74,"context_line":"            schema[\"properties\"].update({indicator.name: indicator.schema})"},{"line_number":75,"context_line":"            schema[\"required\"].append(indicator.name)"},{"line_number":76,"context_line":"        return schema"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_6be12a2b","line":74,"range":{"start_line":74,"start_character":12,"end_line":74,"end_character":75},"in_reply_to":"9f6a8fd7_63a6e411","updated":"2018-06-22 02:00:04.000000000","message":"Done","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"},{"author":{"_account_id":27947,"name":"Egor Panfilov","email":"edpanfilov@sbcloud.ru","username":"erakli"},"change_message_id":"c9294463ed8f7f6b0985f43894d3782bbf13c0f7","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return schema"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def validate_efficacy_indicators(self, indicators_map):"},{"line_number":79,"context_line":"        return (jsonschema.validate(indicators_map, self.schema)"},{"line_number":80,"context_line":"                if indicators_map else True)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def get_indicators_specs_dicts(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_a3a63cc0","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":64},"updated":"2018-04-25 19:13:56.000000000","message":"jsonschema.validate returns nothing, it only throws ValidationError and SchemaError exceptions.\n\nPlease, see \nhttp://python-jsonschema.readthedocs.io/en/stable/validate/#the-basics\nand \nhttps://github.com/Julian/jsonschema/blob/c0cf51f4a1e1f1b8ef956febc95acaf97ddc2d21/jsonschema/validators.py#L584","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"6ad14a519cdb0314194681cba8019f38b38f2540","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return schema"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def validate_efficacy_indicators(self, indicators_map):"},{"line_number":79,"context_line":"        return (jsonschema.validate(indicators_map, self.schema)"},{"line_number":80,"context_line":"                if indicators_map else True)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def get_indicators_specs_dicts(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_2bd1f257","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":64},"in_reply_to":"9f6a8fd7_a3a63cc0","updated":"2018-06-22 02:00:04.000000000","message":"Done","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"}],"watcher/decision_engine/goal/efficacy/indicators.py":[{"author":{"_account_id":27947,"name":"Egor Panfilov","email":"edpanfilov@sbcloud.ru","username":"erakli"},"change_message_id":"c9294463ed8f7f6b0985f43894d3782bbf13c0f7","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            value \u003d getattr(solution, indicator.name)"},{"line_number":57,"context_line":"            jsonschema.validate(value, cls.schema)"},{"line_number":58,"context_line":"        except Exception as exc:"},{"line_number":59,"context_line":"            LOG.exception(exc)"},{"line_number":60,"context_line":"            raise exception.InvalidIndicatorValue("},{"line_number":61,"context_line":"                name\u003dindicator.name, value\u003dvalue, spec_type\u003dtype(indicator))"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_e3be74ac","line":58,"range":{"start_line":58,"start_character":8,"end_line":58,"end_character":32},"updated":"2018-04-25 19:13:56.000000000","message":"Maybe we should catch jsonschema\u0027s specific exception first? If we use bad schema somewhere we could catch it here with SchemaError exception and knew it in first place","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"6ad14a519cdb0314194681cba8019f38b38f2540","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            value \u003d getattr(solution, indicator.name)"},{"line_number":57,"context_line":"            jsonschema.validate(value, cls.schema)"},{"line_number":58,"context_line":"        except Exception as exc:"},{"line_number":59,"context_line":"            LOG.exception(exc)"},{"line_number":60,"context_line":"            raise exception.InvalidIndicatorValue("},{"line_number":61,"context_line":"                name\u003dindicator.name, value\u003dvalue, spec_type\u003dtype(indicator))"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_4bd6ae51","line":58,"range":{"start_line":58,"start_character":8,"end_line":58,"end_character":32},"in_reply_to":"9f6a8fd7_e3be74ac","updated":"2018-06-22 02:00:04.000000000","message":"Done","commit_id":"42b0ffbaf4f3b91dcc9387573501598c86ea6800"}]}
