)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ca99691552ec9c07f08a878792a5a4f7467e0c1e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change would allow an operator to start a new workflow execution"},{"line_number":10,"context_line":"based on an existing one, it would also recall all parameters needed"},{"line_number":11,"context_line":"to start the workflow."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iec3d9f3a71a98952860b972acd09ce80e0a849ff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9f91af0f_a343d412","line":12,"updated":"2018-01-09 10:58:51.000000000","message":"Please also add:\n\nImplements blueprint: mistral-run-workflow-from-execution\n\nThis will create a convenient link to the blueprint (https://blueprints.launchpad.net/mistral/+spec/mistral-run-workflow-from-execution) and status of the BP will be automatically updating based on the patch status.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"55e6c9aa1ec3cd107872bdfcc106affc088f4460","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change would allow an operator to start a new workflow execution"},{"line_number":10,"context_line":"based on an existing one, it would also recall all parameters needed"},{"line_number":11,"context_line":"to start the workflow."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iec3d9f3a71a98952860b972acd09ce80e0a849ff"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9f91af0f_0a2ba382","line":12,"in_reply_to":"9f91af0f_a343d412","updated":"2018-01-09 19:35:04.000000000","message":"ack.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"}],"mistral/api/controllers/v2/execution.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"c584aeefd81bce1c7c667540b813788568f4006a","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        if rexec:"},{"line_number":220,"context_line":"            with db_api.transaction():"},{"line_number":221,"context_line":"                wf_rexec \u003d db_api.get_workflow_execution(rexec)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if not (exec_dict.get(\u0027workflow_id\u0027) or"},{"line_number":224,"context_line":"                exec_dict.get(\u0027workflow_name\u0027)):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_95eebdea","line":221,"range":{"start_line":221,"start_character":16,"end_line":221,"end_character":24},"updated":"2017-12-12 15:49:27.000000000","message":"this object should have all the information we need to create a new execution.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"4d1a172da727d83b18a996f68008d03d24f88677","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        if rexec:"},{"line_number":220,"context_line":"            with db_api.transaction():"},{"line_number":221,"context_line":"                wf_rexec \u003d db_api.get_workflow_execution(rexec)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if not (exec_dict.get(\u0027workflow_id\u0027) or"},{"line_number":224,"context_line":"                exec_dict.get(\u0027workflow_name\u0027)):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_359a5161","line":221,"range":{"start_line":221,"start_character":16,"end_line":221,"end_character":24},"in_reply_to":"df87a7cf_95eebdea","updated":"2017-12-12 15:51:52.000000000","message":"wf_rexec.workflow_name","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6e2c604e2b0b05283074af98f5cbc019942dd81f","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            exec_dict.get(\u0027workflow_namespace\u0027, \u0027\u0027),"},{"line_number":235,"context_line":"            input,"},{"line_number":236,"context_line":"            exec_dict.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":237,"context_line":"            **exec_dict.get(\u0027params\u0027) or {}"},{"line_number":238,"context_line":"        )"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        return resources.Execution.from_dict(result)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_fc4cdb42","line":237,"updated":"2017-12-12 10:09:16.000000000","message":"I want to pass an execution ID and have Mistral copy everything from it. Not just the input.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"61f0a98c403c71305ff3f835f9af3bcbb6ddd197","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            exec_dict.get(\u0027workflow_namespace\u0027, \u0027\u0027),"},{"line_number":235,"context_line":"            input,"},{"line_number":236,"context_line":"            exec_dict.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":237,"context_line":"            **exec_dict.get(\u0027params\u0027) or {}"},{"line_number":238,"context_line":"        )"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        return resources.Execution.from_dict(result)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_ffd92882","line":237,"in_reply_to":"df87a7cf_fc4cdb42","updated":"2017-12-12 14:43:12.000000000","message":"ack, I will rework this.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"e0fc37eeb3f2bac27d56bcd82374151f601700d7","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        if rexec:"},{"line_number":220,"context_line":"            with db_api.transaction():"},{"line_number":221,"context_line":"                rexec_dict \u003d db_api.get_workflow_execution(rexec)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        if not (exec_dict.get(\u0027workflow_id\u0027) or"},{"line_number":224,"context_line":"                exec_dict.get(\u0027workflow_name\u0027)):"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_a75ff370","line":221,"updated":"2017-12-13 17:12:50.000000000","message":"What happens if the ID is passed but is invalid?","commit_id":"b35319963bc1b4b93293cf42f9109db96387cf5d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ca99691552ec9c07f08a878792a5a4f7467e0c1e","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        rexec_dict \u003d {}"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        if rexec:"},{"line_number":220,"context_line":"            with db_api.transaction():"},{"line_number":221,"context_line":"                rexec_dict \u003d db_api.get_workflow_execution(rexec)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        wf_exec_dict \u003d rexec_dict or exec_dict"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_63206c49","line":220,"range":{"start_line":220,"start_character":12,"end_line":220,"end_character":38},"updated":"2018-01-09 10:58:51.000000000","message":"If if we do a single DB operation then explicit transaction management is not necessary, we can just call db_api to get what\u0027s needed.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"55e6c9aa1ec3cd107872bdfcc106affc088f4460","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        rexec_dict \u003d {}"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        if rexec:"},{"line_number":220,"context_line":"            with db_api.transaction():"},{"line_number":221,"context_line":"                rexec_dict \u003d db_api.get_workflow_execution(rexec)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        wf_exec_dict \u003d rexec_dict or exec_dict"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_a70bd227","line":220,"range":{"start_line":220,"start_character":12,"end_line":220,"end_character":38},"in_reply_to":"9f91af0f_63206c49","updated":"2018-01-09 19:35:04.000000000","message":"I thought this transaction call would provide safeguard against contentions. But I guess it should return pretty quickly.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"243f77a1dd14496ef69bbcdba3e5ab7231f8103d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            # If source execution is present we will perform a lookup for"},{"line_number":227,"context_line":"            # previous workflow execution model and the information to start"},{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_503455fb","line":229,"updated":"2018-01-23 20:43:25.000000000","message":"Does we want to override some parameters? Merge this exec_dict with passed by user.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"aba77c3340450bb14ccaec40fbd48aca21dbc94c","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            # If source execution is present we will perform a lookup for"},{"line_number":227,"context_line":"            # previous workflow execution model and the information to start"},{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_4baca38b","line":229,"in_reply_to":"7f96bb07_503455fb","updated":"2018-01-23 23:15:04.000000000","message":"The only we care about in the dictionary before this point is the id, so overriding it should not be an issue. The other approach I had was a \"or\" statement to toggle between two dictionaries.\n\nwf_exec_dict \u003d source_exec_dict or exec_dict\n\nThe above felt like we are carrying to much data just to discard it if the first object contains data.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"243f77a1dd14496ef69bbcdba3e5ab7231f8103d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."},{"line_number":233,"context_line":"            # If yes, the method just returns the object. If not, the ID"},{"line_number":234,"context_line":"            # will be used to create a new execution."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_501775a4","line":231,"updated":"2018-01-23 20:43:25.000000000","message":"First we must check that execution exist and return it if there is it.\nAnd only after that check source_execution_id and create execution.\nIt would be nice to write test for this case.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"14e69e39182e5a868ef2acbf2542580cf5cc5b14","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."},{"line_number":233,"context_line":"            # If yes, the method just returns the object. If not, the ID"},{"line_number":234,"context_line":"            # will be used to create a new execution."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_5976b2da","line":231,"in_reply_to":"7f96bb07_2bbb57c4","updated":"2018-01-24 07:26:21.000000000","message":"Answering both comments in this module. I think we should do as follows:\n\n1. Check if \"exec_id\" is present then check if such an execution exists. If yes, we just return it. If no, we keep \"exec_id\" to set it to a newly created execution.\n\n2. If source_execution_id is present we need to fetch it from DB, store as some dict variable, say result_exec_dict, otherwise it\u0027s just empty ({}).\n\n3. Set \"exec_id\" (if not empty) to result_exec_dict.\n\n4. If the user passed some exec_dict parameters we should merge it into result_exec_dict. This covers the case when, for example, I want to start a new execution based on some existing one but override some of the parameters (e.g. some of the input variables)\n\n\nIMO, these steps should combine all of the use cases we\u0027re trying to pursue here.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"aba77c3340450bb14ccaec40fbd48aca21dbc94c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."},{"line_number":233,"context_line":"            # If yes, the method just returns the object. If not, the ID"},{"line_number":234,"context_line":"            # will be used to create a new execution."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_2bbb57c4","line":231,"in_reply_to":"7f96bb07_501775a4","updated":"2018-01-23 23:15:04.000000000","message":"I don\u0027t quite follow.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"a4fff1609e7610df1f329d0216a4b4c4db47f5aa","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # a new workflow based on that information."},{"line_number":229,"context_line":"            exec_dict \u003d db_api.get_workflow_execution(source_execution_id)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        elif exec_id:"},{"line_number":232,"context_line":"            # If ID is present we need to check if such execution exists."},{"line_number":233,"context_line":"            # If yes, the method just returns the object. If not, the ID"},{"line_number":234,"context_line":"            # will be used to create a new execution."}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_f84c4e9f","line":231,"in_reply_to":"7f96bb07_5976b2da","updated":"2018-01-24 14:19:10.000000000","message":"Sounds good to me.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd1dedaac153c0379c1472dad11d180f7a7965df","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            source_exec_dict \u003d db_api.get_workflow_execution("},{"line_number":241,"context_line":"                source_execution_id)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        result_exec_dict \u003d source_exec_dict or exec_dict"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        if not (result_exec_dict.get(\u0027workflow_id\u0027)"},{"line_number":246,"context_line":"                or result_exec_dict.get(\u0027workflow_name\u0027)):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_faf9174d","line":243,"range":{"start_line":243,"start_character":27,"end_line":243,"end_character":56},"updated":"2018-01-25 05:19:34.000000000","message":"Let\u0027s fix two things here:\n\n1. It should be rather a merge operation than a mutual exclusion. We can do utils.merge(source_exect_dict, exect_dict). This call will override all keys in the left dict operand with the values from the right one.\n2. db_api.get_workflow_execution(source_execution_id) doesn\u0027t return a dict. It returns an instance of the class WorkflowExecution that has a method to_dict(). So I guess on/after the line 241 you need to add \".to_dict()\" in case it\u0027s not empty.","commit_id":"f6a2ceb5a42fc4b7a37cb9c2e9a9263d71b10c4b"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"2e18bc3de231ff03e3e0419954b0a81473fe3fde","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            source_exec_dict \u003d db_api.get_workflow_execution("},{"line_number":241,"context_line":"                source_execution_id)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        result_exec_dict \u003d source_exec_dict or exec_dict"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        if not (result_exec_dict.get(\u0027workflow_id\u0027)"},{"line_number":246,"context_line":"                or result_exec_dict.get(\u0027workflow_name\u0027)):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f93b717_90e6a616","line":243,"range":{"start_line":243,"start_character":27,"end_line":243,"end_character":56},"in_reply_to":"5f93b717_faf9174d","updated":"2018-01-25 14:56:02.000000000","message":"Done","commit_id":"f6a2ceb5a42fc4b7a37cb9c2e9a9263d71b10c4b"}],"mistral/api/controllers/v2/resources.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ca99691552ec9c07f08a878792a5a4f7467e0c1e","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_e331dc5b","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"updated":"2018-01-09 10:58:51.000000000","message":"Hm.. I\u0027m slightly concerned with this naming. Maybe we need to be more verbose here? For example, look at the property \"task_execution_id\" and \"root_execution_id\". We don\u0027t shorten \"execution\" in them. If it\u0027s a ID then how about \"based_on_execution_id\"? Btw, in this case we would always keep track of how this execution was created. Based on what.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"caef9fc53645556902a0c1d1091120759e560bc6","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_8799ac20","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"7f96bb07_7ed67152","updated":"2018-01-10 17:46:19.000000000","message":"I think I like this name, anyone else?","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"86530974d36ea16024324682eb4fa6713866eb8c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_e1abaa72","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"7f96bb07_8799ac20","updated":"2018-01-11 10:13:39.000000000","message":"source_execution_id sounds awesome to me! Precise and clear. I\u0027m for it.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"aba77c3340450bb14ccaec40fbd48aca21dbc94c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_b9ecd329","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"7f96bb07_e1abaa72","updated":"2018-01-23 23:15:04.000000000","message":"that works for me...","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"4cd5dd4c264f1c93aef2e71a6201fe29bc80c038","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_ed0be78a","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"9f91af0f_ca07fb17","updated":"2018-01-10 14:35:35.000000000","message":"Just to help with more ideas - I had thought of clone_execution_id, which I don\u0027t completely like - but I think \"clone\" or maybe \"copy\" described what we are doing well.\n\nbased_on_execution_id works, but it is super long and I think not as clear.\n\nI\u0027ll think about this more.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"55e6c9aa1ec3cd107872bdfcc106affc088f4460","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_ca07fb17","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"9f91af0f_e331dc5b","updated":"2018-01-09 19:35:04.000000000","message":"yeah, I am not the best at naming variables.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":16511,"name":"Bob Haddleton","email":"bob.haddleton@nokia.com","username":"bobh"},"change_message_id":"d65997d27c1b2ae859d63a09503416d2171490a8","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_7ed67152","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":9},"in_reply_to":"9f91af0f_ed0be78a","updated":"2018-01-10 15:19:20.000000000","message":"source_execution_id?","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ca99691552ec9c07f08a878792a5a4f7467e0c1e","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"},{"line_number":263,"context_line":"    updated_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_23c4a45e","line":260,"range":{"start_line":260,"start_character":5,"end_line":260,"end_character":65},"updated":"2018-01-09 10:58:51.000000000","message":"From this description it\u0027s not clear what we deal with? Is it an ID of an execution or a dict with its properties?","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"55e6c9aa1ec3cd107872bdfcc106affc088f4460","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    rexec \u003d wtypes.text"},{"line_number":260,"context_line":"    \"allow for re-execution based on existing workflow execution.\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"},{"line_number":263,"context_line":"    updated_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_6a16ef4b","line":260,"range":{"start_line":260,"start_character":5,"end_line":260,"end_character":65},"in_reply_to":"9f91af0f_23c4a45e","updated":"2018-01-09 19:35:04.000000000","message":"ID of execution. will update.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"65371abdac68fedaf8922ab7ab08beeffe93a3b9","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    replicate_workflow_id \u003d wtypes.text"},{"line_number":260,"context_line":"    \"\"\"reference to a workflow_id in which to replicate.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f96bb07_a1dcc218","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":25},"updated":"2018-01-11 10:16:36.000000000","message":"Let\u0027s call it \"source_execution_id\" as Bob proposed. Also rename it across the code and fix the docstring. Don\u0027t hesitate to put more info in the docstring, btw.","commit_id":"d3d7e1b2cac24032f627a61153f4aa68e308288f"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"aba77c3340450bb14ccaec40fbd48aca21dbc94c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    output \u003d types.jsontype"},{"line_number":257,"context_line":"    \"output is a workflow output.\""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    replicate_workflow_id \u003d wtypes.text"},{"line_number":260,"context_line":"    \"\"\"reference to a workflow_id in which to replicate.\"\"\""},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f96bb07_d9919f9b","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":25},"in_reply_to":"7f96bb07_a1dcc218","updated":"2018-01-23 23:15:04.000000000","message":"ack.","commit_id":"d3d7e1b2cac24032f627a61153f4aa68e308288f"},{"author":{"_account_id":27008,"name":"Vitalii Solodilov","email":"Mcdkr@yandex.ru","username":"mcdoker18"},"change_message_id":"243f77a1dd14496ef69bbcdba3e5ab7231f8103d","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    output \u003d types.jsontype"},{"line_number":267,"context_line":"    \"output is a workflow output\""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    replicate_workflow_id \u003d wtypes.text"},{"line_number":270,"context_line":"    \"\"\"reference to a workflow_id in which to replicate.\"\"\""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_b0035942","line":269,"updated":"2018-01-23 20:43:25.000000000","message":"I guess that it should be removed.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"aba77c3340450bb14ccaec40fbd48aca21dbc94c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    output \u003d types.jsontype"},{"line_number":267,"context_line":"    \"output is a workflow output\""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    replicate_workflow_id \u003d wtypes.text"},{"line_number":270,"context_line":"    \"\"\"reference to a workflow_id in which to replicate.\"\"\""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    created_at \u003d wtypes.text"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f96bb07_2bd6f728","line":269,"in_reply_to":"7f96bb07_b0035942","updated":"2018-01-23 23:15:04.000000000","message":"Thanks for catching this.","commit_id":"8664d2c89320be7d56a5132a1f0849c6797a76fd"}],"mistral/tests/unit/api/v2/test_executions.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6e2c604e2b0b05283074af98f5cbc019942dd81f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"WF_EX_WITH_PROJECT_ID.project_id \u003d \u0027\u003cdefault-project\u003e\u0027"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"WF_EX_JSON_WITH_REXEC \u003d copy.deepcopy(WF_EX_JSON_WITH_DESC)"},{"line_number":129,"context_line":"WF_EX_JSON_WITH_REXEC[\u0027rexec\u0027] \u003d WF_EX.id"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"MOCK_WF_EX \u003d mock.MagicMock(return_value\u003dWF_EX)"},{"line_number":132,"context_line":"MOCK_SUB_WF_EX \u003d mock.MagicMock(return_value\u003dSUB_WF_EX)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_7c868b68","line":129,"updated":"2017-12-12 10:09:16.000000000","message":"As a user, when I want to re-execute a Workflow execution I just want to pass in the original workflow execution ID. From my reading of this, it looks like you are passing in a copy of the original workflow execution.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"61f0a98c403c71305ff3f835f9af3bcbb6ddd197","unresolved":false,"context_lines":[{"line_number":126,"context_line":"WF_EX_WITH_PROJECT_ID.project_id \u003d \u0027\u003cdefault-project\u003e\u0027"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"WF_EX_JSON_WITH_REXEC \u003d copy.deepcopy(WF_EX_JSON_WITH_DESC)"},{"line_number":129,"context_line":"WF_EX_JSON_WITH_REXEC[\u0027rexec\u0027] \u003d WF_EX.id"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"MOCK_WF_EX \u003d mock.MagicMock(return_value\u003dWF_EX)"},{"line_number":132,"context_line":"MOCK_SUB_WF_EX \u003d mock.MagicMock(return_value\u003dSUB_WF_EX)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_3f423010","line":129,"in_reply_to":"df87a7cf_7c868b68","updated":"2017-12-12 14:43:12.000000000","message":"I thought that was the key to the workflow execution id.?","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"6e2c604e2b0b05283074af98f5cbc019942dd81f","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        \u0027get_workflow_execution\u0027,"},{"line_number":501,"context_line":"        mock.MagicMock(return_value\u003dcopy.deepcopy(WF_EX_JSON_WITH_REXEC)))"},{"line_number":502,"context_line":"    @mock.patch.object(rpc_clients.EngineClient, \u0027start_workflow\u0027)"},{"line_number":503,"context_line":"    def test_post_rexec(self, f):"},{"line_number":504,"context_line":"        wf_rexec_dict \u003d WF_EX.to_dict()"},{"line_number":505,"context_line":"        wf_rexec_dict[\u0027rexec\u0027] \u003d WF_EX.id"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_7c9d2bba","line":503,"range":{"start_line":503,"start_character":30,"end_line":503,"end_character":31},"updated":"2017-12-12 10:09:16.000000000","message":"Can we change this to a more meaningful variable name?","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"61f0a98c403c71305ff3f835f9af3bcbb6ddd197","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        \u0027get_workflow_execution\u0027,"},{"line_number":501,"context_line":"        mock.MagicMock(return_value\u003dcopy.deepcopy(WF_EX_JSON_WITH_REXEC)))"},{"line_number":502,"context_line":"    @mock.patch.object(rpc_clients.EngineClient, \u0027start_workflow\u0027)"},{"line_number":503,"context_line":"    def test_post_rexec(self, f):"},{"line_number":504,"context_line":"        wf_rexec_dict \u003d WF_EX.to_dict()"},{"line_number":505,"context_line":"        wf_rexec_dict[\u0027rexec\u0027] \u003d WF_EX.id"},{"line_number":506,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_1fcacc9f","line":503,"range":{"start_line":503,"start_character":30,"end_line":503,"end_character":31},"in_reply_to":"df87a7cf_7c9d2bba","updated":"2017-12-12 14:43:12.000000000","message":"sure.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"c0b606f2f76a0861aee2e78550d5bab520605109","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        f.return_value \u003d wf_rexec_dict"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        resp \u003d self.app.post_json(\u0027/v2/executions/\u0027, WF_EX_JSON_WITH_REXEC)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        self.assertEqual(201, resp.status_int)"},{"line_number":512,"context_line":"        self.assertDictEqual(WF_EX_JSON_WITH_REXEC, resp.json)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_75ee9922","line":509,"range":{"start_line":509,"start_character":53,"end_line":509,"end_character":74},"updated":"2017-12-12 15:48:46.000000000","message":"here you are passing a full execution object to the API. Can we just pass only what is needed for rexec? ideally that would just be the original execution id.","commit_id":"38006dd5098856f83399a720f91277b8d8de9e8f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"e0fc37eeb3f2bac27d56bcd82374151f601700d7","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        wf_exec_mock.return_value \u003d wf_rexec_dict"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"        resp \u003d self.app.post_json(\u0027/v2/executions/\u0027, WF_EX_JSON_WITH_REXEC)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        self.assertEqual(201, resp.status_int)"},{"line_number":512,"context_line":"        self.assertDictEqual(WF_EX_JSON_WITH_REXEC, resp.json)"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_67d6cbc6","line":509,"range":{"start_line":509,"start_character":53,"end_line":509,"end_character":74},"updated":"2017-12-13 17:12:50.000000000","message":"Are we not posting too much data here? Don\u0027t we just want to post the previous execution ID only?","commit_id":"b35319963bc1b4b93293cf42f9109db96387cf5d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ca99691552ec9c07f08a878792a5a4f7467e0c1e","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            **json.loads(exec_dict[\u0027params\u0027])"},{"line_number":498,"context_line":"        )"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    @mock.patch.object(db_api, \u0027transaction\u0027, \u0027get_worklfow_execution\u0027)"},{"line_number":501,"context_line":"    @mock.patch.object(rpc_clients.EngineClient, \u0027start_workflow\u0027)"},{"line_number":502,"context_line":"    def test_post_rexec(self, wf_exec_mock):"},{"line_number":503,"context_line":"        rexec_wf_ex \u003d REXEC_WF_EX.to_dict()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_a3867412","line":500,"range":{"start_line":500,"start_character":32,"end_line":500,"end_character":43},"updated":"2018-01-09 10:58:51.000000000","message":"No need to mock this method. Look at my comment in the controller file.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"},{"author":{"_account_id":11085,"name":"Toure Dunnon","email":"toure@redhat.com","username":"Toure"},"change_message_id":"55e6c9aa1ec3cd107872bdfcc106affc088f4460","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            **json.loads(exec_dict[\u0027params\u0027])"},{"line_number":498,"context_line":"        )"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    @mock.patch.object(db_api, \u0027transaction\u0027, \u0027get_worklfow_execution\u0027)"},{"line_number":501,"context_line":"    @mock.patch.object(rpc_clients.EngineClient, \u0027start_workflow\u0027)"},{"line_number":502,"context_line":"    def test_post_rexec(self, wf_exec_mock):"},{"line_number":503,"context_line":"        rexec_wf_ex \u003d REXEC_WF_EX.to_dict()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_ca205b9e","line":500,"range":{"start_line":500,"start_character":32,"end_line":500,"end_character":43},"in_reply_to":"9f91af0f_a3867412","updated":"2018-01-09 19:35:04.000000000","message":"ack.","commit_id":"44763b88504ee48395a687a9d0471cd327b0c473"}]}
