I have a workflow that fails sometimes because of bugs in a release.
Once I roll out the fixes, I’d like to manually retry the workflows from a later point in time since some activities should only be run once but I am having trouble starting them up again.
Tried workflow with this option first
private final WorkflowOptions options = WorkflowOptions
.newBuilder()
.setWorkflowExecutionTimeout(Duration.ofDays(3))
.setTaskQueue(TASK_QUEUE)
.setRetryOptions(RetryOptions.newBuilder().setMaximumAttempts(1).build())
.build();
when I try to reset the workflow in the UI, I choose the earliest event to reset to but the new run will fail immediately with RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED
Tried in CLI with this command
temporal workflow reset --workflow-id 02d959d5-aa87-45f0-9968-b8d0333bbd9b --reason "Retry with updated retry options" --type FirstWorkflowTask
and I get the same results.
Then I tried removing .setRetryOptions(RetryOptions.newBuilder().setMaximumAttempts(1).build())
and now it looks like this
private final WorkflowOptions options = WorkflowOptions
.newBuilder()
.setWorkflowExecutionTimeout(Duration.ofDays(3))
.setTaskQueue(TASK_QUEUE)
.build();
When I try to manually reset it now I get RETRY_STATE_RETRY_POLICY_NOT_SET
Is the issue with the activities? Some of them are payment related and I do not want them to retry indefinitely. Is the correct solution to make all the steps idempotent and retry the entire workflow?