)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f560bbd0811cd966eae3895074b5032b1196865e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Allow async action execution to be paused and resumed by"},{"line_number":10,"context_line":"updating the action execution via API. When an action"},{"line_number":11,"context_line":"execution is paused, the state transition will cascade up"},{"line_number":12,"context_line":"to the task execution."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint mistral-action-ex-pause-resume"},{"line_number":15,"context_line":"Change-Id: I87233d27c46cfe86a23beb8dfdc96f77e58d24c1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df3967d1_67d8a47e","line":12,"updated":"2017-08-02 12:25:35.000000000","message":"I\u0027m afraid I don\u0027t really understand this patch. The explains a bit about what it is, but not why. Why do we want this change? What is the use-case? Unfortunately the blueprint doesn\u0027t really give any more detail either.\n\nWas this discussed somewhere? If you can link me to that it would be fine too.","commit_id":"5cf4de06c24c0a9442f43738b88df4b28ecab733"}],"mistral/api/controllers/v2/action_execution.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"ACTION_EXECUTION_TRANSITION_STATES \u003d ["},{"line_number":38,"context_line":"    states.SUCCESS,"},{"line_number":39,"context_line":"    states.ERROR,"},{"line_number":40,"context_line":"    states.CANCELLED,"},{"line_number":41,"context_line":"    states.PAUSED,"},{"line_number":42,"context_line":"    states.RUNNING"},{"line_number":43,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_962bf8e9","line":40,"range":{"start_line":38,"start_character":4,"end_line":40,"end_character":20},"updated":"2017-07-14 04:56:46.000000000","message":"Semantically it\u0027s strange that these states are in transition states. What do you mean here by \"transition\"?","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"dd8eeb9074e82bcfa4d573edc39ad20aa0359639","unresolved":false,"context_lines":[{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"ACTION_EXECUTION_TRANSITION_STATES \u003d ["},{"line_number":38,"context_line":"    states.SUCCESS,"},{"line_number":39,"context_line":"    states.ERROR,"},{"line_number":40,"context_line":"    states.CANCELLED,"},{"line_number":41,"context_line":"    states.PAUSED,"},{"line_number":42,"context_line":"    states.RUNNING"},{"line_number":43,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_1b55dcc6","line":40,"range":{"start_line":38,"start_character":4,"end_line":40,"end_character":20},"in_reply_to":"1f1a1f67_5c4d6898","updated":"2017-07-25 09:44:14.000000000","message":"Done","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"ACTION_EXECUTION_TRANSITION_STATES \u003d ["},{"line_number":38,"context_line":"    states.SUCCESS,"},{"line_number":39,"context_line":"    states.ERROR,"},{"line_number":40,"context_line":"    states.CANCELLED,"},{"line_number":41,"context_line":"    states.PAUSED,"},{"line_number":42,"context_line":"    states.RUNNING"},{"line_number":43,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_5c4d6898","line":40,"range":{"start_line":38,"start_character":4,"end_line":40,"end_character":20},"in_reply_to":"1f1a1f67_962bf8e9","updated":"2017-07-14 19:26:05.000000000","message":"This means one of the supported states that this action execution can be transitioned into.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    states.RUNNING"},{"line_number":43,"context_line":"]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"ACTION_EXECUTION_COMPLETION_STATES \u003d ["},{"line_number":46,"context_line":"    states.SUCCESS,"},{"line_number":47,"context_line":"    states.ERROR,"},{"line_number":48,"context_line":"    states.CANCELLED"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_f6390c3f","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":34},"updated":"2017-07-14 04:56:46.000000000","message":"Do we need this structure at all? We name a number of methods in states.py such as is_completed().","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    states.RUNNING"},{"line_number":43,"context_line":"]"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"ACTION_EXECUTION_COMPLETION_STATES \u003d ["},{"line_number":46,"context_line":"    states.SUCCESS,"},{"line_number":47,"context_line":"    states.ERROR,"},{"line_number":48,"context_line":"    states.CANCELLED"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_3c350cf8","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":34},"in_reply_to":"1f1a1f67_f6390c3f","updated":"2017-07-14 19:26:05.000000000","message":"Yeah, I can revisit this.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"}],"mistral/engine/action_handler.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        action.fail(msg)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if task_ex:"},{"line_number":85,"context_line":"            task_handler.force_fail_task(task_ex, msg)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_c1bf6cf9","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":54},"updated":"2017-07-14 04:56:46.000000000","message":"I wonder if there could be other cases when we shouldn\u0027t force the task to fail besides invalid state transition?","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        action.fail(msg)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if task_ex:"},{"line_number":85,"context_line":"            task_handler.force_fail_task(task_ex, msg)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_f7256fac","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":54},"in_reply_to":"1f1a1f67_c1bf6cf9","updated":"2017-07-14 19:26:05.000000000","message":"We can try to not fail task.  Now that I rethink, maybe don\u0027t need to fail task (and consequently fail workflow).  Maybe it was programmatic error that can be fixed with a 2nd try.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"dd8eeb9074e82bcfa4d573edc39ad20aa0359639","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        action.fail(msg)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if task_ex:"},{"line_number":85,"context_line":"            task_handler.force_fail_task(task_ex, msg)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        return"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_3be2e002","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":54},"in_reply_to":"1f1a1f67_f7256fac","updated":"2017-07-25 09:44:14.000000000","message":"Yes, makes sense.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f560bbd0811cd966eae3895074b5032b1196865e","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        LOG.error(msg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        raise e"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    if task_ex:"},{"line_number":79,"context_line":"        task_handler.schedule_on_action_update(action_ex)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df3967d1_67c1c480","line":76,"updated":"2017-08-02 12:25:35.000000000","message":"This should just be \"raise\" to keep the original traceback intact.","commit_id":"5cf4de06c24c0a9442f43738b88df4b28ecab733"}],"mistral/engine/actions.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if state \u003d\u003d states.PAUSED and self.is_sync(self.action_ex.input):"},{"line_number":80,"context_line":"            raise exc.InvalidStateTransitionException("},{"line_number":81,"context_line":"                \u0027Transition to the paused state is only supported \u0027"},{"line_number":82,"context_line":"                \u0027for asynchronous action execution.\u0027"},{"line_number":83,"context_line":"            )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_816054a7","line":81,"range":{"start_line":81,"start_character":35,"end_line":81,"end_character":41},"updated":"2017-07-14 04:56:46.000000000","message":"Maybe make it PAUSED? Upper case.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if state \u003d\u003d states.PAUSED and self.is_sync(self.action_ex.input):"},{"line_number":80,"context_line":"            raise exc.InvalidStateTransitionException("},{"line_number":81,"context_line":"                \u0027Transition to the paused state is only supported \u0027"},{"line_number":82,"context_line":"                \u0027for asynchronous action execution.\u0027"},{"line_number":83,"context_line":"            )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_77315fec","line":81,"range":{"start_line":81,"start_character":35,"end_line":81,"end_character":41},"in_reply_to":"1f1a1f67_816054a7","updated":"2017-07-14 19:26:05.000000000","message":"Sure.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"}],"mistral/engine/task_handler.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    try:"},{"line_number":151,"context_line":"        task.on_action_update(action_ex)"},{"line_number":152,"context_line":"    except exc.MistralException as e:"},{"line_number":153,"context_line":"        wf_ex \u003d task_ex.workflow_execution"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        msg \u003d (\"Failed to handle action update [error\u003d%s, wf\u003d%s, task\u003d%s,\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_21874012","line":152,"range":{"start_line":152,"start_character":15,"end_line":152,"end_character":31},"updated":"2017-07-14 04:56:46.000000000","message":"InvalidStateTransitionException is a MistralException. It will be bubbled up from task handler (since it\u0027s handled separately) w/o forcing the task to fail. But here it will be caught and we\u0027ll force the entire workflow to fail. I guess we need to handle InvalidStateTransitionException here separately too but I already don\u0027t like this because we may potentially have other situations when we shouldn\u0027t force anything to fail. To me this situation falls into the category of the invalid user input actually. If the user provided something invalid we shouldn\u0027t change state of any persistent objects. May be InvalidStateTransitionException should be renamed correspondingly or subclassed from ValueError or something like this?\n\nPlease think about it.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    try:"},{"line_number":151,"context_line":"        task.on_action_update(action_ex)"},{"line_number":152,"context_line":"    except exc.MistralException as e:"},{"line_number":153,"context_line":"        wf_ex \u003d task_ex.workflow_execution"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        msg \u003d (\"Failed to handle action update [error\u003d%s, wf\u003d%s, task\u003d%s,\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_577783a1","line":152,"range":{"start_line":152,"start_character":15,"end_line":152,"end_character":31},"in_reply_to":"1f1a1f67_21874012","updated":"2017-07-14 19:26:05.000000000","message":"Will rethink whether we need to fail the task here.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"e05694acaf9e971072654a8940c91a909227b50e","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    try:"},{"line_number":151,"context_line":"        task.on_action_update(action_ex)"},{"line_number":152,"context_line":"    except exc.MistralException as e:"},{"line_number":153,"context_line":"        wf_ex \u003d task_ex.workflow_execution"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        msg \u003d (\"Failed to handle action update [error\u003d%s, wf\u003d%s, task\u003d%s,\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_d7814e4c","line":152,"range":{"start_line":152,"start_character":15,"end_line":152,"end_character":31},"in_reply_to":"1f1a1f67_577783a1","updated":"2017-07-14 23:00:30.000000000","message":"Actually, we should fail the task execution here. The reason is that by the time this code is reached, the corresponding action execution has already been updated successfully. And so if we cannot successfully update the task execution here, then something is wrong and there\u0027s actually no way for the user to update the task state anymore. I changed the action handler to not fail task though so if there\u0027s something wrong w/ action execution update, the user can still retry.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"f560bbd0811cd966eae3895074b5032b1196865e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        wf_handler.force_fail_workflow(wf_ex, msg)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"@profiler.trace(\u0027task-handler-on-action-update\u0027, hide_args\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df3967d1_676f8492","line":123,"updated":"2017-08-02 12:25:35.000000000","message":"The return isn\u0027t needed.","commit_id":"5cf4de06c24c0a9442f43738b88df4b28ecab733"}],"mistral/tests/unit/engine/test_default_engine.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"edc9003c4d3c0c18d5dbae5ead196bd78a77af14","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"\"\"\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"WORKBOOK_ASYNC \u003d \"\"\""},{"line_number":66,"context_line":"---"},{"line_number":67,"context_line":"version: \u00272.0\u0027"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_41991c6c","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":14},"updated":"2017-07-14 04:56:46.000000000","message":"Not a critical comment but I\u0027d prefer to use workflows where possible, not workbooks. Because workbooks are not the first-class citizens but only a convenience thing.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1304ee306f8589533573b80800b6bef60bb806bb","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"\"\"\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"WORKBOOK_ASYNC \u003d \"\"\""},{"line_number":66,"context_line":"---"},{"line_number":67,"context_line":"version: \u00272.0\u0027"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_579c23bf","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":14},"in_reply_to":"1f1a1f67_41991c6c","updated":"2017-07-14 19:26:05.000000000","message":"Sure. I\u0027m just trying to be consistent with the rest of the unit tests here.","commit_id":"4709849852c9081da2a65d042883cca9a13523e1"}]}
