)]}'
{"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"ef89879ec5c4445740d16521303803487d419357","unresolved":false,"context_lines":[{"line_number":736,"context_line":""},{"line_number":737,"context_line":"@b.session_aware()"},{"line_number":738,"context_line":"def update_workflow_execution_env(id, values, session\u003dNone):"},{"line_number":739,"context_line":"    wf_ex \u003d _get_workflow_execution(id)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    if not wf_ex:"},{"line_number":742,"context_line":"        raise exc.NotFoundException(\"WorkflowExecution not found [id\u003d%s]\" % id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_891aaac4","line":739,"updated":"2015-12-22 07:10:59.000000000","message":"why not use \u0027get_workflow_execution\u0027 directly?","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"939462f899b18abf2d75d47fa53017bb3220ae71","unresolved":false,"context_lines":[{"line_number":736,"context_line":""},{"line_number":737,"context_line":"@b.session_aware()"},{"line_number":738,"context_line":"def update_workflow_execution_env(id, values, session\u003dNone):"},{"line_number":739,"context_line":"    wf_ex \u003d _get_workflow_execution(id)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    if not wf_ex:"},{"line_number":742,"context_line":"        raise exc.NotFoundException(\"WorkflowExecution not found [id\u003d%s]\" % id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_c8f2ce06","line":739,"in_reply_to":"3a7e1126_891aaac4","updated":"2015-12-22 20:29:53.000000000","message":"i copied this from update_workflow_execution? i\u0027ll use get_workflow_execution and change that too.","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"ef89879ec5c4445740d16521303803487d419357","unresolved":false,"context_lines":[{"line_number":744,"context_line":"    if not values:"},{"line_number":745,"context_line":"        return wf_ex"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    if wf_ex.state in [states.SUCCESS, states.RUNNING, states.RUNNING_DELAYED]:"},{"line_number":748,"context_line":"        raise exc.NotAllowedException("},{"line_number":749,"context_line":"            \u0027Updating env to workflow execution that succeeded \u0027"},{"line_number":750,"context_line":"            \u0027or currently running is not allowed.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_e41ef35d","line":747,"updated":"2015-12-22 07:10:59.000000000","message":"Do you really want to support changing env when execution state is \u0027waiting\u0027?  In my understanding, \u0027waiting\u0027 is a transient status, things will be unpredictable if the something in runtime is changed during the execution is waiting.\n\nand a soft suggestion: we can use \u0027if ... not in ...\u0027 here to make it more clear for other mistral developers to understand in which state the env can be updated for executions.","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"939462f899b18abf2d75d47fa53017bb3220ae71","unresolved":false,"context_lines":[{"line_number":744,"context_line":"    if not values:"},{"line_number":745,"context_line":"        return wf_ex"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    if wf_ex.state in [states.SUCCESS, states.RUNNING, states.RUNNING_DELAYED]:"},{"line_number":748,"context_line":"        raise exc.NotAllowedException("},{"line_number":749,"context_line":"            \u0027Updating env to workflow execution that succeeded \u0027"},{"line_number":750,"context_line":"            \u0027or currently running is not allowed.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_2304d513","line":747,"in_reply_to":"3a7e1126_e41ef35d","updated":"2015-12-22 20:29:53.000000000","message":"Done","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"883bab4871b9862d2bd3d6212901fa24924db15f","unresolved":false,"context_lines":[{"line_number":744,"context_line":"    if not values:"},{"line_number":745,"context_line":"        return wf_ex"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    if wf_ex.state in [states.SUCCESS, states.RUNNING, states.RUNNING_DELAYED]:"},{"line_number":748,"context_line":"        raise exc.NotAllowedException("},{"line_number":749,"context_line":"            \u0027Updating env to workflow execution that succeeded \u0027"},{"line_number":750,"context_line":"            \u0027or currently running is not allowed.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_d0e60eaf","line":747,"in_reply_to":"3a7e1126_e41ef35d","updated":"2015-12-22 08:26:41.000000000","message":"I suggest not checking this in DB layer. Need to check it at REST API level, in your previous change.","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"883bab4871b9862d2bd3d6212901fa24924db15f","unresolved":false,"context_lines":[{"line_number":753,"context_line":"    # Delay import of the data_flow module to avoid cyclic dependencies."},{"line_number":754,"context_line":"    from mistral.workflow import data_flow"},{"line_number":755,"context_line":"    wf_ex.params[\u0027env\u0027] \u003d utils.merge_dicts(wf_ex.params[\u0027env\u0027], values)"},{"line_number":756,"context_line":"    data_flow.add_environment_to_context(wf_ex)"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"    return wf_ex"},{"line_number":759,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_d0428e67","line":756,"range":{"start_line":756,"start_character":14,"end_line":756,"end_character":40},"updated":"2015-12-22 08:26:41.000000000","message":"These operations also shouldn\u0027t be here. They should be rather in services/workflows.py. My suggestion is to move the whole function logic to services/workflows.py and there to invoke the original update_wf_ex().","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"939462f899b18abf2d75d47fa53017bb3220ae71","unresolved":false,"context_lines":[{"line_number":753,"context_line":"    # Delay import of the data_flow module to avoid cyclic dependencies."},{"line_number":754,"context_line":"    from mistral.workflow import data_flow"},{"line_number":755,"context_line":"    wf_ex.params[\u0027env\u0027] \u003d utils.merge_dicts(wf_ex.params[\u0027env\u0027], values)"},{"line_number":756,"context_line":"    data_flow.add_environment_to_context(wf_ex)"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"    return wf_ex"},{"line_number":759,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_191d8673","line":756,"range":{"start_line":756,"start_character":14,"end_line":756,"end_character":40},"in_reply_to":"3a7e1126_d0428e67","updated":"2015-12-22 20:29:53.000000000","message":"Done","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"}],"mistral/tests/unit/db/v2/test_sqlalchemy_db_api.py":[{"author":{"_account_id":9432,"name":"Dmitri Zimine","email":"dz@stackstorm.com","username":"dzimine"},"change_message_id":"b6132d0973cae1dd1c6bf064fe2a289f425f7d61","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        \u0027spec\u0027: {},"},{"line_number":704,"context_line":"        \u0027start_params\u0027: {\u0027task\u0027: \u0027my_task1\u0027},"},{"line_number":705,"context_line":"        \u0027state\u0027: \u0027PAUSED\u0027,"},{"line_number":706,"context_line":"        \u0027state_info\u0027: \"Running...\","},{"line_number":707,"context_line":"        \u0027params\u0027: {\u0027env\u0027: {\u0027k1\u0027: \u0027abc\u0027}},"},{"line_number":708,"context_line":"        \u0027created_at\u0027: None,"},{"line_number":709,"context_line":"        \u0027updated_at\u0027: None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_034fc46b","line":706,"range":{"start_line":706,"start_character":23,"end_line":706,"end_character":30},"updated":"2015-12-19 02:59:39.000000000","message":"nit: should not be Running...","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"1d51f0ea1e881e32e6433b4b53576009587b028c","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        \u0027spec\u0027: {},"},{"line_number":704,"context_line":"        \u0027start_params\u0027: {\u0027task\u0027: \u0027my_task1\u0027},"},{"line_number":705,"context_line":"        \u0027state\u0027: \u0027PAUSED\u0027,"},{"line_number":706,"context_line":"        \u0027state_info\u0027: \"Running...\","},{"line_number":707,"context_line":"        \u0027params\u0027: {\u0027env\u0027: {\u0027k1\u0027: \u0027abc\u0027}},"},{"line_number":708,"context_line":"        \u0027created_at\u0027: None,"},{"line_number":709,"context_line":"        \u0027updated_at\u0027: None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_3b02e70a","line":706,"range":{"start_line":706,"start_character":23,"end_line":706,"end_character":30},"in_reply_to":"3a7e1126_034fc46b","updated":"2015-12-21 20:44:55.000000000","message":"This is state_info. It can be any free form text. For testing purposes, what\u0027s wrong with this?","commit_id":"7841015ad27cd167924fe2717704959b1ba4d457"}],"mistral/workflow/base.py":[{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3a9f7352cf4d327561fd39e5f79fccf04b77cb6d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        commands needed to continue the workflow."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param: task_ex: Task execution to rerun."},{"line_number":70,"context_line":"        :param: reset: If true, then purge action executions for the tasks."},{"line_number":71,"context_line":"        :return: List of workflow commands (instances of"},{"line_number":72,"context_line":"            mistral.workflow.commands.WorkflowCommand)."},{"line_number":73,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_a7ce6081","line":70,"updated":"2016-01-08 07:21:49.000000000","message":"Please add param description for \u0027env\u0027.","commit_id":"80dd2450ea34a1f404ec4e2201f0fafb34a1ad42"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3a9f7352cf4d327561fd39e5f79fccf04b77cb6d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        \"\"\"Finds commands that should run next."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        A concrete algorithm of finding such tasks depends on a concrete"},{"line_number":140,"context_line":"        workflow controller."},{"line_number":141,"context_line":"        :return: List of workflow commands."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":"        # Add all tasks in IDLE state."}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_e7aa1885","line":140,"updated":"2016-01-08 07:21:49.000000000","message":"Please add param description for \u0027env\u0027.","commit_id":"80dd2450ea34a1f404ec4e2201f0fafb34a1ad42"}]}
