)]}'
{"monasca_events_api/app/common/events_publisher.py":[{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            self._check_if_all_messages_was_publish(sent_counter, num_of_msgs)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _transform_message(self, message):"},{"line_number":104,"context_line":"        \"\"\"Transforms message into JSON."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        Method transforms message to JSON and"},{"line_number":107,"context_line":"        encode to utf8"},{"line_number":108,"context_line":"        :param str message: instance of message"},{"line_number":109,"context_line":"        :return: serialized message"},{"line_number":110,"context_line":"        :rtype: str"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_4108812b","line":107,"range":{"start_line":104,"start_character":0,"end_line":107,"end_character":22},"updated":"2018-09-21 09:28:24.000000000","message":"Wrong documentation.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        proper \u003d self._ensure_type_bytes(truncated)"},{"line_number":117,"context_line":"        return proper"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _truncate(self, envelope):"},{"line_number":120,"context_line":"        \"\"\"Truncates message."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        :param Envelope envelope: original envelope"},{"line_number":123,"context_line":"        :return: serialized message"},{"line_number":124,"context_line":"        :rtype: str"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        msg_str \u003d ev_envelope.serialize_envelope(envelope)"},{"line_number":127,"context_line":"        return msg_str"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _ensure_type_bytes(self, message):"},{"line_number":130,"context_line":"        \"\"\"Ensures that message will have proper type."}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_7c5522f8","line":127,"range":{"start_line":119,"start_character":0,"end_line":127,"end_character":22},"updated":"2018-09-21 09:28:24.000000000","message":"Do we really need separate function for one line?\nYou should also do here `return ev_envelope.serialize_envelope(envelope)` instead of creating temporary variable.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        keys are found and they will have their values."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        return message and isinstance(message, ev_envelope.Envelope)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _check_if_all_messages_was_publish(self, send_count, to_send_count):"},{"line_number":186,"context_line":"        \"\"\"Executed after publishing to sent metrics."}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_fc593228","line":183,"range":{"start_line":183,"start_character":15,"end_line":183,"end_character":27},"updated":"2018-09-21 09:28:24.000000000","message":"Is this part needed? If message is empty `isinstance` should probably return false.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1963d7901f7206ef3d3e9a79815505de960c83f6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if not self._is_message_valid(message):"},{"line_number":111,"context_line":"            raise InvalidMessageException()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        truncated \u003d ev_envelope.serialize_envelope(message)"},{"line_number":114,"context_line":"        proper \u003d self._ensure_type_bytes(truncated)"},{"line_number":115,"context_line":"        return proper"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_944bd25c","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":17},"updated":"2018-10-09 10:12:26.000000000","message":"We\u0027re not truncating anything here.","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"fac5c1eeb2c91ee3150d92c326423c54e50fd699","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if not self._is_message_valid(message):"},{"line_number":111,"context_line":"            raise InvalidMessageException()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        truncated \u003d ev_envelope.serialize_envelope(message)"},{"line_number":114,"context_line":"        proper \u003d self._ensure_type_bytes(truncated)"},{"line_number":115,"context_line":"        return proper"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_7b4b6527","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":17},"in_reply_to":"3f79a3b5_944bd25c","updated":"2018-10-10 12:57:42.000000000","message":"Changed variable name","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"1963d7901f7206ef3d3e9a79815505de960c83f6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise InvalidMessageException()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        truncated \u003d ev_envelope.serialize_envelope(message)"},{"line_number":114,"context_line":"        proper \u003d self._ensure_type_bytes(truncated)"},{"line_number":115,"context_line":"        return proper"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _ensure_type_bytes(self, message):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_b4b36e4e","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":51},"updated":"2018-10-09 10:12:26.000000000","message":"It would be better to use `encodeutils.safe_encode()` here.","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"fac5c1eeb2c91ee3150d92c326423c54e50fd699","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise InvalidMessageException()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        truncated \u003d ev_envelope.serialize_envelope(message)"},{"line_number":114,"context_line":"        proper \u003d self._ensure_type_bytes(truncated)"},{"line_number":115,"context_line":"        return proper"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _ensure_type_bytes(self, message):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_bb41fd0a","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":51},"in_reply_to":"3f79a3b5_b4b36e4e","updated":"2018-10-10 12:57:42.000000000","message":"Done","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"}],"monasca_events_api/app/controller/v1/bulk_processor.py":[{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def send_message(self, events, event_tenant_id\u003dNone):"},{"line_number":36,"context_line":"        \"\"\"Sends bulk package to kafka"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        :param list events: received events"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_42d88050","line":35,"range":{"start_line":35,"start_character":41,"end_line":35,"end_character":47},"updated":"2018-09-21 09:28:24.000000000","message":"use `project` instead of `tenant`","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        finally:"},{"line_number":66,"context_line":"            self._check_if_all_messages_was_publish(num_of_msgs, sent_count)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def _transform_message(self, event_element, event_tenant_id):"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            msg_json \u003d rest_utils.as_json(event_element)"},{"line_number":71,"context_line":"            msg_json \u003d msg_json.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_423c0091","line":68,"range":{"start_line":68,"start_character":3,"end_line":68,"end_character":65},"updated":"2018-09-21 09:28:24.000000000","message":"Add documentation.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        finally:"},{"line_number":66,"context_line":"            self._check_if_all_messages_was_publish(num_of_msgs, sent_count)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def _transform_message(self, event_element, event_tenant_id):"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            msg_json \u003d rest_utils.as_json(event_element)"},{"line_number":71,"context_line":"            msg_json \u003d msg_json.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_22ca246d","line":68,"range":{"start_line":68,"start_character":54,"end_line":68,"end_character":60},"updated":"2018-09-21 09:28:24.000000000","message":"Use `project` instead of `tenant`","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"0dc8a73ea50821ef45921256b089fb5d9801c71e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            msg_json \u003d rest_utils.as_json(event_element)"},{"line_number":77,"context_line":"            msg_json \u003d msg_json.encode(\u0027utf-8\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            event_envelope \u003d envelope.Envelope.new_envelope("},{"line_number":80,"context_line":"                event\u003dmsg_json,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_14d34265","line":77,"range":{"start_line":77,"start_character":23,"end_line":77,"end_character":47},"updated":"2018-10-09 10:15:13.000000000","message":"encodeutils.safe_encode","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"fac5c1eeb2c91ee3150d92c326423c54e50fd699","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\""},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            msg_json \u003d rest_utils.as_json(event_element)"},{"line_number":77,"context_line":"            msg_json \u003d msg_json.encode(\u0027utf-8\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            event_envelope \u003d envelope.Envelope.new_envelope("},{"line_number":80,"context_line":"                event\u003dmsg_json,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_db55d9c3","line":77,"range":{"start_line":77,"start_character":23,"end_line":77,"end_character":47},"in_reply_to":"3f79a3b5_14d34265","updated":"2018-10-10 12:57:42.000000000","message":"Done","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"}],"monasca_events_api/app/controller/v1/events.py":[{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            request_body \u003d helpers.read_json_msg_body(req)"},{"line_number":55,"context_line":"            req.can(policy_action)"},{"line_number":56,"context_line":"            tenant_id \u003d req.project_id"},{"line_number":57,"context_line":"            body_validation.validate_body(request_body)"},{"line_number":58,"context_line":"            messages \u003d prepare_message_to_sent(request_body)"},{"line_number":59,"context_line":"            self._processor.send_message(messages, event_tenant_id\u003dtenant_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_42a640c2","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":18},"updated":"2018-09-21 09:28:24.000000000","message":"Use `project` instead of `tenant`","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"0105ff1718b203f4a15da60cc99b8065ff5bd8fb","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            messages \u003d prepare_message_to_sent(request_body)"},{"line_number":59,"context_line":"            self._processor.send_message(messages, event_project_id\u003dproject_id)"},{"line_number":60,"context_line":"            res.status \u003d falcon.HTTP_200"},{"line_number":61,"context_line":"        except MultipleInvalid as ex:"},{"line_number":62,"context_line":"            LOG.error(\u0027Entire bulk package was rejected, unsupported body\u0027)"},{"line_number":63,"context_line":"            LOG.exception(ex)"},{"line_number":64,"context_line":"            res.status \u003d falcon.HTTP_422"},{"line_number":65,"context_line":"        except Exception as ex:"},{"line_number":66,"context_line":"            LOG.error(\u0027Entire bulk package was rejected\u0027)"},{"line_number":67,"context_line":"            LOG.exception(ex)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_8cff2934","line":64,"range":{"start_line":61,"start_character":8,"end_line":64,"end_character":40},"updated":"2018-10-10 14:44:19.000000000","message":"Should this one be reraised as well or is it intended to catch it here?","commit_id":"1a1c40f37671432439fe1fde69cb566b59def8bc"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"ddabc4fe5eb8f40f14e51ea0e0cd1f316f69d084","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            messages \u003d prepare_message_to_sent(request_body)"},{"line_number":59,"context_line":"            self._processor.send_message(messages, event_project_id\u003dproject_id)"},{"line_number":60,"context_line":"            res.status \u003d falcon.HTTP_200"},{"line_number":61,"context_line":"        except MultipleInvalid as ex:"},{"line_number":62,"context_line":"            LOG.error(\u0027Entire bulk package was rejected, unsupported body\u0027)"},{"line_number":63,"context_line":"            LOG.exception(ex)"},{"line_number":64,"context_line":"            res.status \u003d falcon.HTTP_422"},{"line_number":65,"context_line":"        except Exception as ex:"},{"line_number":66,"context_line":"            LOG.error(\u0027Entire bulk package was rejected\u0027)"},{"line_number":67,"context_line":"            LOG.exception(ex)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_39e963aa","line":64,"range":{"start_line":61,"start_character":8,"end_line":64,"end_character":40},"in_reply_to":"3f79a3b5_8cff2934","updated":"2018-10-11 06:28:53.000000000","message":"Both can be caught here. But only for the case of Exception I reraise it in order to have the description in the exception, for MultipleInvalid it isn\u0027t needed.","commit_id":"1a1c40f37671432439fe1fde69cb566b59def8bc"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"8f3784c4a5c1764ebdb7944fdc47b5935a335c19","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            LOG.error(\u0027Entire bulk package was rejected\u0027)"},{"line_number":67,"context_line":"            LOG.exception(ex)"},{"line_number":68,"context_line":"            res.status \u003d falcon.HTTP_400"},{"line_number":69,"context_line":"            raise ex"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @property"},{"line_number":72,"context_line":"    def version(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_e1fb3112","line":69,"range":{"start_line":69,"start_character":12,"end_line":69,"end_character":20},"updated":"2018-10-11 08:42:14.000000000","message":"The exception handling is outside the scope of this change.\nThe request validations and exception handling will be treated in [1].\n[1] https://review.openstack.org/#/c/609335/","commit_id":"1a1c40f37671432439fe1fde69cb566b59def8bc"}],"monasca_events_api/app/model/envelope.py":[{"author":{"_account_id":26141,"name":"Adrian Czarnecki","email":"adrian.czarnecki@ts.fujitsu.com","username":"czarneckia"},"change_message_id":"23df2b1f4b24b17246b1282a8f7104208132dbfb","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from monasca_common.rest import utils as rest_utils"},{"line_number":16,"context_line":"from oslo_utils import timeutils"},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def serialize_envelope(envelope):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_69e543a4","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":10},"updated":"2018-09-25 07:44:57.000000000","message":"Pleas import only six.PY3 or six.PY2 not six.Whole six liberty is not necessary in this file.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    if six.PY2:"},{"line_number":30,"context_line":"        raw \u003d unicode(json, encoding\u003d\u0027utf-8\u0027,"},{"line_number":31,"context_line":"                      errors\u003d\u0027replace\u0027)"},{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        raw \u003d json"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_62e57cda","line":31,"range":{"start_line":30,"start_character":8,"end_line":31,"end_character":39},"updated":"2018-09-21 09:28:24.000000000","message":"Instead of saving it to temporary variable you can simply return here.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    if six.PY2:"},{"line_number":30,"context_line":"        raw \u003d unicode(json, encoding\u003d\u0027utf-8\u0027,"},{"line_number":31,"context_line":"                      errors\u003d\u0027replace\u0027)"},{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        raw \u003d json"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    return raw"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_a2915448","line":33,"range":{"start_line":29,"start_character":0,"end_line":33,"end_character":18},"updated":"2018-09-21 09:28:24.000000000","message":"Check for PY3 first, not python 2.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        raw \u003d unicode(json, encoding\u003d\u0027utf-8\u0027,"},{"line_number":31,"context_line":"                      errors\u003d\u0027replace\u0027)"},{"line_number":32,"context_line":"    else:"},{"line_number":33,"context_line":"        raw \u003d json"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    return raw"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_22cb044a","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":18},"updated":"2018-09-21 09:28:24.000000000","message":"Instead of saving it to temporary variable you can simply return here.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    pass"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class Envelope(dict):"},{"line_number":43,"context_line":"    def __init__(self, event, meta):"},{"line_number":44,"context_line":"        if not event:"},{"line_number":45,"context_line":"            error_msg \u003d \u0027Envelope cannot be created without event\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_62fedc6a","line":42,"range":{"start_line":42,"start_character":6,"end_line":42,"end_character":14},"updated":"2018-09-21 09:28:24.000000000","message":"Add docs what is Envelope.","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        if not event:"},{"line_number":45,"context_line":"            error_msg \u003d \u0027Envelope cannot be created without event\u0027"},{"line_number":46,"context_line":"            raise EventEnvelopeException(error_msg)"},{"line_number":47,"context_line":"        if \u0027tenantId\u0027 not in meta or not meta.get(\u0027tenantId\u0027):"},{"line_number":48,"context_line":"            error_msg \u003d \u0027Envelope cannot be created without tenant\u0027"},{"line_number":49,"context_line":"            raise EventEnvelopeException(error_msg)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        creation_time \u003d self._get_creation_time()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_42ade081","line":48,"range":{"start_line":47,"start_character":0,"end_line":48,"end_character":67},"updated":"2018-09-21 09:28:24.000000000","message":"Use `project` instead of `tenant`","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":21922,"name":"Dobroslaw Zybort","email":"dobroslaw.zybort@ts.fujitsu.com","username":"dobrolaw.zybort"},"change_message_id":"5364656d1de5f439b23bc8d020a872cfe4ad243c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return timeutils.utcnow_ts()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @classmethod"},{"line_number":63,"context_line":"    def new_envelope(cls, event, tenant_id, region\u003dNone):"},{"line_number":64,"context_line":"        \"\"\"Creates new event envelope"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        Event envelope is combined of of following properties"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_027da81a","line":63,"range":{"start_line":63,"start_character":33,"end_line":63,"end_character":39},"updated":"2018-09-21 09:28:24.000000000","message":"Use `project` instead of `tenant`","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":26141,"name":"Adrian Czarnecki","email":"adrian.czarnecki@ts.fujitsu.com","username":"czarneckia"},"change_message_id":"23df2b1f4b24b17246b1282a8f7104208132dbfb","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                },"},{"line_number":83,"context_line":"                \"creation_time\": 1447834886,"},{"line_number":84,"context_line":"                \"meta\": {"},{"line_number":85,"context_line":"                  \"tenantId\": \"e4bd29509eda473092d32aadfee3e7b1\","},{"line_number":86,"context_line":"                }"},{"line_number":87,"context_line":"            }"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_4965e748","line":85,"range":{"start_line":85,"start_character":19,"end_line":85,"end_character":27},"updated":"2018-09-25 07:44:57.000000000","message":"project","commit_id":"6f57ca5724b0fb6cccf64ac5f349bdd61c136e35"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"86b6989895c5b452ef2ab484a2e73faad9057a0a","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":28,"context_line":"    return json if PY3 else unicode(json, encoding\u003d\u0027utf-8\u0027,"},{"line_number":29,"context_line":"                                    errors\u003d\u0027replace\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EventEnvelopeException(Exception):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_2e57115d","line":29,"range":{"start_line":28,"start_character":11,"end_line":29,"end_character":53},"updated":"2018-10-09 09:17:52.000000000","message":"Better use `encodeutils.safe_decode(json, \u0027utf-8\u0027)` from oslo_utils as recommended in https://wiki.openstack.org/wiki/Python3#safe_decode","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"fac5c1eeb2c91ee3150d92c326423c54e50fd699","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":28,"context_line":"    return json if PY3 else unicode(json, encoding\u003d\u0027utf-8\u0027,"},{"line_number":29,"context_line":"                                    errors\u003d\u0027replace\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EventEnvelopeException(Exception):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_fb58d5f9","line":29,"range":{"start_line":28,"start_character":11,"end_line":29,"end_character":53},"in_reply_to":"3f79a3b5_2e57115d","updated":"2018-10-10 12:57:42.000000000","message":"Done","commit_id":"969449aea89e208b4a94874c6c34f527ceb8ff92"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"11ca7ea18b964736631a1afd45434142c837852c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":29,"context_line":"    return encodeutils.safe_encode(json, \u0027utf-8\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EventEnvelopeException(Exception):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_c1308a58","line":29,"range":{"start_line":29,"start_character":23,"end_line":29,"end_character":34},"updated":"2018-10-10 14:07:03.000000000","message":"safe_decode","commit_id":"1a1c40f37671432439fe1fde69cb566b59def8bc"},{"author":{"_account_id":28062,"name":"Martin Chacon Piza","email":"martin@chaconpiza.com","username":"martinchacon"},"change_message_id":"ddabc4fe5eb8f40f14e51ea0e0cd1f316f69d084","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":"    json \u003d rest_utils.as_json(envelope, ensure_ascii\u003dFalse)"},{"line_number":29,"context_line":"    return encodeutils.safe_encode(json, \u0027utf-8\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EventEnvelopeException(Exception):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_39a2c398","line":29,"range":{"start_line":29,"start_character":23,"end_line":29,"end_character":34},"in_reply_to":"3f79a3b5_c1308a58","updated":"2018-10-11 06:28:53.000000000","message":"Done","commit_id":"1a1c40f37671432439fe1fde69cb566b59def8bc"}]}
