)]}'
{"mistral/expressions/jinja_expression.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"46b8b047290f27f758ae0d9739eed1497577487b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            # the value is accessed, not when it gets created. The simplest way"},{"line_number":78,"context_line":"            # to access it is to try and cast it to string."},{"line_number":79,"context_line":"            str(result)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            # NOTE(rakhmerov): if we hit a database error then we need to"},{"line_number":82,"context_line":"            # re-raise the initial exception so that upper layers had a"},{"line_number":83,"context_line":"            # chance to handle it properly (e.g. in case of DB deadlock"},{"line_number":84,"context_line":"            # the operations needs to retry. Essentially, such situation"},{"line_number":85,"context_line":"            # indicates a problem with DB rather than with the expression"},{"line_number":86,"context_line":"            # syntax or values."},{"line_number":87,"context_line":"            if isinstance(e, db_exc.DBError):"},{"line_number":88,"context_line":"                LOG.error("},{"line_number":89,"context_line":"                    \"Failed to evaluate Jinja expression due to a database\""},{"line_number":90,"context_line":"                    \" error, re-raising initial exception [expression\u003d%s,\""},{"line_number":91,"context_line":"                    \" error\u003d%s, data\u003d%s]\","},{"line_number":92,"context_line":"                    expression,"},{"line_number":93,"context_line":"                    str(e),"},{"line_number":94,"context_line":"                    data_context"},{"line_number":95,"context_line":"                )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"                raise e"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            raise exc.JinjaEvaluationException("},{"line_number":100,"context_line":"                \"Can not evaluate Jinja expression [expression\u003d%s, error\u003d%s\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_a2a51f49","side":"PARENT","line":97,"range":{"start_line":80,"start_character":8,"end_line":97,"end_character":23},"updated":"2018-04-23 07:48:21.000000000","message":"I don\u0027t understand why you got rid of this part. It was here to handle DB specific errors with retry decorators. W/o this code if we once hit a DB deadlock (very likely on MySQL) the workflow will just fail (I think actually stuck in RUNNING).","commit_id":"48e17b34228b0d8ea0df7f8f2a85111a5e4d2845"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"51a21d26a6fe200ee20ae464be36b3b23e799938","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            # the value is accessed, not when it gets created. The simplest way"},{"line_number":78,"context_line":"            # to access it is to try and cast it to string."},{"line_number":79,"context_line":"            str(result)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            # NOTE(rakhmerov): if we hit a database error then we need to"},{"line_number":82,"context_line":"            # re-raise the initial exception so that upper layers had a"},{"line_number":83,"context_line":"            # chance to handle it properly (e.g. in case of DB deadlock"},{"line_number":84,"context_line":"            # the operations needs to retry. Essentially, such situation"},{"line_number":85,"context_line":"            # indicates a problem with DB rather than with the expression"},{"line_number":86,"context_line":"            # syntax or values."},{"line_number":87,"context_line":"            if isinstance(e, db_exc.DBError):"},{"line_number":88,"context_line":"                LOG.error("},{"line_number":89,"context_line":"                    \"Failed to evaluate Jinja expression due to a database\""},{"line_number":90,"context_line":"                    \" error, re-raising initial exception [expression\u003d%s,\""},{"line_number":91,"context_line":"                    \" error\u003d%s, data\u003d%s]\","},{"line_number":92,"context_line":"                    expression,"},{"line_number":93,"context_line":"                    str(e),"},{"line_number":94,"context_line":"                    data_context"},{"line_number":95,"context_line":"                )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"                raise e"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            raise exc.JinjaEvaluationException("},{"line_number":100,"context_line":"                \"Can not evaluate Jinja expression [expression\u003d%s, error\u003d%s\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_fb7bbe24","side":"PARENT","line":97,"range":{"start_line":80,"start_character":8,"end_line":97,"end_character":23},"in_reply_to":"9f6a8fd7_1b6d52cb","updated":"2018-04-23 09:43:36.000000000","message":"Aah, yes, sorry. Missed it.. Ignore my previous comment.","commit_id":"48e17b34228b0d8ea0df7f8f2a85111a5e4d2845"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"b5bbd1b909b6a5a5f72cd33f7e131b6c78c2f5ac","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            # the value is accessed, not when it gets created. The simplest way"},{"line_number":78,"context_line":"            # to access it is to try and cast it to string."},{"line_number":79,"context_line":"            str(result)"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            # NOTE(rakhmerov): if we hit a database error then we need to"},{"line_number":82,"context_line":"            # re-raise the initial exception so that upper layers had a"},{"line_number":83,"context_line":"            # chance to handle it properly (e.g. in case of DB deadlock"},{"line_number":84,"context_line":"            # the operations needs to retry. Essentially, such situation"},{"line_number":85,"context_line":"            # indicates a problem with DB rather than with the expression"},{"line_number":86,"context_line":"            # syntax or values."},{"line_number":87,"context_line":"            if isinstance(e, db_exc.DBError):"},{"line_number":88,"context_line":"                LOG.error("},{"line_number":89,"context_line":"                    \"Failed to evaluate Jinja expression due to a database\""},{"line_number":90,"context_line":"                    \" error, re-raising initial exception [expression\u003d%s,\""},{"line_number":91,"context_line":"                    \" error\u003d%s, data\u003d%s]\","},{"line_number":92,"context_line":"                    expression,"},{"line_number":93,"context_line":"                    str(e),"},{"line_number":94,"context_line":"                    data_context"},{"line_number":95,"context_line":"                )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"                raise e"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            raise exc.JinjaEvaluationException("},{"line_number":100,"context_line":"                \"Can not evaluate Jinja expression [expression\u003d%s, error\u003d%s\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_1b6d52cb","side":"PARENT","line":97,"range":{"start_line":80,"start_character":8,"end_line":97,"end_character":23},"in_reply_to":"9f6a8fd7_a2a51f49","updated":"2018-04-23 09:25:55.000000000","message":"It wasn\u0027t removed, rather it was moved to the function that calls this one. `str(result)` raises an exception now if the result is undefined.","commit_id":"48e17b34228b0d8ea0df7f8f2a85111a5e4d2845"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"46b8b047290f27f758ae0d9739eed1497577487b","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"                raise e"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            raise exc.JinjaEvaluationException("},{"line_number":100,"context_line":"                \"Can not evaluate Jinja expression [expression\u003d%s, error\u003d%s\""},{"line_number":101,"context_line":"                \", data\u003d%s]\" % (expression, str(e), data_context)"},{"line_number":102,"context_line":"            )"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        return result"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_e22237b9","side":"PARENT","line":102,"range":{"start_line":99,"start_character":12,"end_line":102,"end_character":13},"updated":"2018-04-23 07:48:21.000000000","message":"The idea of this part was that we need to raise an instance of MistralException which is not considered a critical error that should lead to a DB transaction rollback but signals about a problem in the WF language itself. So that if it\u0027s raised Mistral will just set a workflow (or task) execution state to ERROR and save the corresponding exception message to state_info.\n\nOther arbitrary errors may not be handled properly in the engine layer.","commit_id":"48e17b34228b0d8ea0df7f8f2a85111a5e4d2845"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"51a21d26a6fe200ee20ae464be36b3b23e799938","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"                raise e"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            raise exc.JinjaEvaluationException("},{"line_number":100,"context_line":"                \"Can not evaluate Jinja expression [expression\u003d%s, error\u003d%s\""},{"line_number":101,"context_line":"                \", data\u003d%s]\" % (expression, str(e), data_context)"},{"line_number":102,"context_line":"            )"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        return result"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_1b96b23f","side":"PARENT","line":102,"range":{"start_line":99,"start_character":12,"end_line":102,"end_character":13},"in_reply_to":"9f6a8fd7_e22237b9","updated":"2018-04-23 09:43:36.000000000","message":"Ignore my previous comment.","commit_id":"48e17b34228b0d8ea0df7f8f2a85111a5e4d2845"}],"mistral/tests/unit/engine/test_direct_workflow.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"46b8b047290f27f758ae0d9739eed1497577487b","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        wf:"},{"line_number":436,"context_line":"          tasks:"},{"line_number":437,"context_line":"            task_1_1:"},{"line_number":438,"context_line":"              action: std.sleep seconds\u003d\u00271\u0027"},{"line_number":439,"context_line":"              on-success:"},{"line_number":440,"context_line":"                - task_2"},{"line_number":441,"context_line":"            task_1_2:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_a2f75f59","line":438,"range":{"start_line":438,"start_character":40,"end_line":438,"end_character":41},"updated":"2018-04-23 07:48:21.000000000","message":"Quotes are not necessary.","commit_id":"1bd4b5832a9ee0018dc02a5b334a5710f79895da"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"93d286e779517dcabe93b674dd13aa9a8ba640fb","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        wf:"},{"line_number":436,"context_line":"          tasks:"},{"line_number":437,"context_line":"            task_1_1:"},{"line_number":438,"context_line":"              action: std.sleep seconds\u003d\u00271\u0027"},{"line_number":439,"context_line":"              on-success:"},{"line_number":440,"context_line":"                - task_2"},{"line_number":441,"context_line":"            task_1_2:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_f66755e8","line":438,"range":{"start_line":438,"start_character":40,"end_line":438,"end_character":41},"in_reply_to":"9f6a8fd7_a2f75f59","updated":"2018-04-23 10:06:25.000000000","message":"Fixed","commit_id":"1bd4b5832a9ee0018dc02a5b334a5710f79895da"}]}
