Skip to content

WorkflowChecker should flag anonymous functions in local activities as non deterministic #1341

Open
@Quinn-With-Two-Ns

Description

@Quinn-With-Two-Ns

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions