Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Workflow rollback support #52

Open
qiankunli opened this issue May 12, 2023 · 1 comment
Open

[Discussion] Workflow rollback support #52

qiankunli opened this issue May 12, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@qiankunli
Copy link

qiankunli commented May 12, 2023

in my case, i want to use goflow to create some resources on a public cloud. like creating a cloud vm with public ip.

  1. create a vm using cloud openapi
  2. wait the status of vm is running
  3. create a public ip using cloud openapi
  4. wait the status of public ip is available
  5. bind the public ip with vm
  6. other steps

i want

  1. if I cancel the workflow(like run flow.cancel()), workflow can free the created resources(vm,public ip etc)
  2. if one step failed, workflow can free the created resources(vm,public ip etc)
@qiankunli qiankunli changed the title is workflow support cancel? is workflow support rollback? May 12, 2023
@s8sg
Copy link
Owner

s8sg commented May 17, 2023

@qiankunli Not yet. There is a way it can be done - for example after each Node you can add a conditional branch where for success you continue with the flow else you fallback to a rollback flow. This will require you to manually create and handle the failure.

Cancel() is not supported yet. We only support Stop() atm. I think this is a good suggestion to have a rollback supported out of the box. In that case each node will have a rollback handler defined. On cancellation it will call all rollback handler.

Although its gets complicated for dynamic branching. We need to store exactly which node executed and how many times with what params

@s8sg s8sg added enhancement New feature or request good first issue Good for newcomers labels May 17, 2023
@s8sg s8sg changed the title is workflow support rollback? [Discussion] Workflow rollback support Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants