Vadim
April 5, 2023, 8:49am
1
Hi all. I have the following activity options in my workflow:
activityCtx := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
StartToCloseTimeout: time.Hour,
HeartbeatTimeout: 2 * time.Second,
RetryPolicy: &temporal.RetryPolicy{
InitialInterval: time.Second,
BackoffCoefficient: 2.0,
MaximumInterval: time.Minute,
MaximumAttempts: 20,
},
})
When the workflow fails, temporal created a new one with the same identifier and kept trying in it. Why does this happen?
taonic
April 5, 2023, 12:13pm
2
Can you check if you have retry policy configured for your workflow too? If so, after the activity exhaust it’s retries, the workflow itself will be retried with a continue-as-new execution, hence the same workflow ID.
Reference: Retry Policies | Temporal Documentation
Vadim
April 5, 2023, 12:21pm
3
Yes, workflow also has retry options. Its MaximumAttempts option are higher than the activity MaximumAttempts. Thank you!
It’s typically not recommended to explicitly set workflow retry policy. Do you have specific use case for it?
Vadim
April 10, 2023, 6:16am
5
No, there are no special use cases.
Ok, in that case I don’t think you should specify it.