sdk-go
sdk-go copied to clipboard
WorkflowChecker should consider anonymous functions in local activities deterministic, but maybe warn about them anyway
Expected Behavior
WorkflowChecker should consider anonymous functions in local activities deterministic.
Actual Behavior
WorkflowChecker does not consider anonymous functions in local activities deterministic.
Steps to Reproduce the Problem
func GreetingSample(ctx workflow.Context) error {
fut := workflow.ExecuteLocalActivity(ctx, func(ctx context.Context) time.Time { return time.Now() })
}
Note
Anonymous functions as local activities are ripe for data races because they can run in parallel with the workflow function, so maybe we should warn about their use from that perspective.