I have a child workflow running an activity. Inside the activity, it throws non-retryable application error. The child workflow fails only for that execution run. Its retry state is still Retry State In Progress. And it spins up a new execution run immediately.
Is this expected? How to stop the child workflow from retrying in such case?
This is that failed child workflow result. The activity is RETRY_STATE_NON_RETRYABLE_FAILURE, while the child workflow is still RETRY_STATE_IN_PROGRESS
The nonretryable failure is thrown from the activity, and the activity is not retried. The workflow receives it wrapped in an ActivityFailure, which is retryable. If you want to the workflow to retry you should throw an NonRetryable failure from the workflow directly.
@maxim Thanks for checking! I think I kind of realized the issue. In my code, it didn’t even get to this err = temporal.NewNonRetryableApplicationError("activity failed", "NonRetryableFailure", err) line of code. I’m getting below from the child workflow result in temporal UI. So looks like errors.As(err, &applicationErr) returns false?