)]}'
{"workbooks/deployment.yaml":[{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"264489ce36244de8215f47c3e53b1a4e9ac010bd","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_a0c6b399","line":560,"updated":"2018-05-09 11:09:37.000000000","message":"I\u0027d recommend calling this workflow recover_deployment_status.\n\nIt should check if heat stack with \u0027container\u0027 name exists using heat.stacks_get action, if so, determine deployment_status based on stack_status.\n\nno stack -\u003e UNDEPLOYED\nCREATE_IN_PROGRESS -\u003e DEPLOYING\nCREATE_COMPLETE -\u003e DEPLOY_SUCCESS\nCREATE_FAILED -\u003e DEPLOY_FAILED\nDELETE_COMPLETE -\u003e UNDEPLOYED\nDELETE_IN_PROGRESS -\u003e UNDEPLOYING\nDELETE_FAILED -\u003e UNDEPLOY_FAILED\nUPDATE_IN_PROGRESS -\u003e DEPLOYING\nUPDATE_FAILED -\u003e DEPLOY_FAILED\nUPDATE_COMPLETE -\u003e DEPLOY_SUCCESS","commit_id":"f9ad0ca9e7bb43a061ce2ed2a4326d4cac5b0eec"},{"author":{"_account_id":20970,"name":"Honza Pokorny","email":"honza@redhat.com","username":"hpokorny"},"change_message_id":"5db3f94eed2902a20aa8e22699e922d3cb064730","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_b8c23133","line":560,"in_reply_to":"5f7c97a3_2032a311","updated":"2018-05-11 16:38:01.000000000","message":"Done","commit_id":"f9ad0ca9e7bb43a061ce2ed2a4326d4cac5b0eec"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"03fbf967111c5b7e68089c78c4153778c04c3f26","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_2032a311","line":560,"in_reply_to":"5f7c97a3_60497bce","updated":"2018-05-09 11:30:39.000000000","message":"Every workflow needs to send a message to notify client that it finished so it is fine IMHO.","commit_id":"f9ad0ca9e7bb43a061ce2ed2a4326d4cac5b0eec"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"44c6445c8c5a934bd9359896ef1c71a79984ef99","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_60497bce","line":560,"in_reply_to":"5f7c97a3_a0c6b399","updated":"2018-05-09 11:22:00.000000000","message":"This is an example of when sending a message and setting the deployment status in one operation is confusing. We really don\u0027t want to send a message here, do we?","commit_id":"f9ad0ca9e7bb43a061ce2ed2a4326d4cac5b0eec"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"dfcbd69f6bef83983d750de6b533489ed3adc835","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        input:"},{"line_number":572,"context_line":"          stack_id: \u003c% $.container %\u003e"},{"line_number":573,"context_line":"        publish:"},{"line_number":574,"context_line":"          stack_status: \u003c% task().result.stack_status %\u003e"},{"line_number":575,"context_line":"        publish-on-error:"},{"line_number":576,"context_line":"          stack_status: NO_STACK"},{"line_number":577,"context_line":"        on-complete: convert_deployment_status"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_ae5870f9","line":574,"updated":"2018-05-15 12:14:59.000000000","message":"We may want to set stack_status_reason as a message\n\nmessage: \u003c% task().result.stack_status_reason %\u003e","commit_id":"06152c0abbcf161e5f808b9b46b9dbd29bc01e2f"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"dfcbd69f6bef83983d750de6b533489ed3adc835","unresolved":false,"context_lines":[{"line_number":591,"context_line":"          queue_name: \u003c% $.queue_name %\u003e"},{"line_number":592,"context_line":"          type: \u003c% execution().name %\u003e"},{"line_number":593,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":594,"context_line":"          deployment_status: \u003c% $.new_deployment_status %\u003e"},{"line_number":595,"context_line":"          plan_name: \u003c% $.container %\u003e"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_2e6c609a","line":594,"updated":"2018-05-15 12:14:59.000000000","message":"message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e","commit_id":"06152c0abbcf161e5f808b9b46b9dbd29bc01e2f"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"02131018e213c001d06c0691d190cd0e2a078f60","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment_status:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_0e74edcd","line":560,"updated":"2018-05-16 10:14:17.000000000","message":"I\u0027ve tested this with UI and the workflow updates the status correctly, but the updated deployment status should be also provided via the output of the workflow, so client does not need to fetch the updated status separately.\n\nAlso, should this workflow be automatically part of https://review.openstack.org/#/c/564315/3/workbooks/plan_management.yaml?","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"5154fbeffbc268fc525635bd862b394ed585ba63","unresolved":false,"context_lines":[{"line_number":557,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":558,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  recover_deployment_status:"},{"line_number":561,"context_line":"    description: \u003e"},{"line_number":562,"context_line":"      Convert an existing deployment into one that supports config-download"},{"line_number":563,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_cd058416","line":560,"in_reply_to":"5f7c97a3_0e74edcd","updated":"2018-05-17 09:17:29.000000000","message":"Done","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"5154fbeffbc268fc525635bd862b394ed585ba63","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        publish-on-error:"},{"line_number":577,"context_line":"          stack_status: NO_STACK"},{"line_number":578,"context_line":"        on-complete: convert_deployment_status"},{"line_number":579,"context_line":"        on-error: convert_deployment_status"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"      convert_deployment_status:"},{"line_number":582,"context_line":"        action: tripleo.deployment.convert_status"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_68253eab","line":579,"range":{"start_line":579,"start_character":8,"end_line":579,"end_character":43},"updated":"2018-05-17 09:17:29.000000000","message":"this is not needed as it is covered by on-complete, actually including it makes convert_deployment_status task to be run twice in case when stack does not exist","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"0c84eb25361102fb3220599e98a61b83cff6eeb4","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        publish-on-error:"},{"line_number":577,"context_line":"          stack_status: NO_STACK"},{"line_number":578,"context_line":"        on-complete: convert_deployment_status"},{"line_number":579,"context_line":"        on-error: convert_deployment_status"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"      convert_deployment_status:"},{"line_number":582,"context_line":"        action: tripleo.deployment.convert_status"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_68877e11","line":579,"range":{"start_line":579,"start_character":8,"end_line":579,"end_character":43},"in_reply_to":"5f7c97a3_68253eab","updated":"2018-05-17 09:37:48.000000000","message":"actually, using on-complete makes the workflow continue correctly, but resulting state of execution is \u0027ERROR\u0027. when using\n\non-success: convert_deployment_status\non-error: convert_deployment_status\n\nexecution state is correctly \u0027SUCCESS\u0027\n\n(TIL)","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"5154fbeffbc268fc525635bd862b394ed585ba63","unresolved":false,"context_lines":[{"line_number":583,"context_line":"        input:"},{"line_number":584,"context_line":"          status: \u003c% $.stack_status %\u003e"},{"line_number":585,"context_line":"        publish:"},{"line_number":586,"context_line":"          new_deployment_status: \u003c% task().result %\u003e"},{"line_number":587,"context_line":"        on-complete: recover"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"      recover:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_283746e6","line":586,"range":{"start_line":586,"start_character":10,"end_line":586,"end_character":31},"updated":"2018-05-17 09:17:29.000000000","message":"nit: could you name this deployment_status please?","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":20970,"name":"Honza Pokorny","email":"honza@redhat.com","username":"hpokorny"},"change_message_id":"bef73976b0156006578fa93cb8c51adf61e00b0e","unresolved":false,"context_lines":[{"line_number":583,"context_line":"        input:"},{"line_number":584,"context_line":"          status: \u003c% $.stack_status %\u003e"},{"line_number":585,"context_line":"        publish:"},{"line_number":586,"context_line":"          new_deployment_status: \u003c% task().result %\u003e"},{"line_number":587,"context_line":"        on-complete: recover"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"      recover:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5f7c97a3_63448075","line":586,"range":{"start_line":586,"start_character":10,"end_line":586,"end_character":31},"in_reply_to":"5f7c97a3_283746e6","updated":"2018-05-17 11:55:10.000000000","message":"Done","commit_id":"d49ccf1ab4f3125bdb5f116d080014aa5145cca0"},{"author":{"_account_id":7509,"name":"Jiri Tomasek","email":"jtomasek@redhat.com","username":"jtomasek"},"change_message_id":"c8406054c02b48c83032611100e486be6b471fa3","unresolved":false,"context_lines":[{"line_number":592,"context_line":"          queue_name: \u003c% $.queue_name %\u003e"},{"line_number":593,"context_line":"          type: \u003c% execution().name %\u003e"},{"line_number":594,"context_line":"          execution: \u003c% execution() %\u003e"},{"line_number":595,"context_line":"          deployment_status: \u003c% $.new_deployment_status %\u003e"},{"line_number":596,"context_line":"          plan_name: \u003c% $.container %\u003e"},{"line_number":597,"context_line":"          message: \u003c% $.get(\u0027message\u0027, \u0027\u0027) %\u003e"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"5f7c97a3_fe0df13d","line":595,"range":{"start_line":595,"start_character":34,"end_line":595,"end_character":54},"updated":"2018-05-29 11:26:36.000000000","message":"deployment_status","commit_id":"e5ed5341df6b50a75a3b122c374e7c48abfd48f9"}]}
