temporal icon indicating copy to clipboard operation
temporal copied to clipboard

[GO SDK] Taint workflow ID/make it available for future use

Open wburnett opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. So I started using the Workflow ID reuse policy, ex: workflowOpts := client.StartWorkflowOptions{ ID: fmt.Sprintf("%s-%s-delete-network", opts.TenantID, opts.TenantName), WorkflowIDReusePolicy: enums.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY, } It works great for idempotence, but I think I've found an edge case where an addition would be helpful. I'm struggling to figure out a way to join the functionality of the idempotence that the ID duplicate failed only option presents, but not block my end users from performing workflows that create and destroy a related set of resources (say a VPN or VPC in a cloud provider).

Describe the solution you'd like

  • run a create workflow that creates some cloud infrastructure
  • decide later I want to delete it (taint the ID as part of this action)
  • go back and run the same create workflow w/ the same ID the next day, or some other time

Describe alternatives you've considered I'll need to provide this protection in other lays of my application - not the end of the world, but seems like a nice to have that fits with Temporal's other functions that handle retries.

Additional context Slack thread where Maxim asked me to open a feature request: https://temporalio.slack.com/archives/CTDTU3J4T/p1660935514293809

wburnett avatar Aug 19 '22 20:08 wburnett