hatchet icon indicating copy to clipboard operation
hatchet copied to clipboard

feat: support parallel step execution

Open abelanger5 opened this issue 1 year ago • 1 comments

It's necessary to support steps which can:

  1. Execute the same step with different inputs in parallel.
  2. Execute different steps with the same input in parallel.

From a client perspective, the Go SDK should be able to detect parallel steps based on the output from a previous step and the input to the current step. For example, if one step has the following output:

func stepOne(ctx context.Context) ([]stepOneOutput, error)

And the second step has the following input:

func stepTwo(ctx context.Context, in *stepOneOutput) error

Then stepTwo should be run for each array element resulting from stepOne.

abelanger5 avatar Jan 02 '24 21:01 abelanger5

Partially fixed by #108, particularly:

Execute different steps with the same input in parallel.

For Execute the same step with different inputs in parallel, we are still working on scatter/gather workflows.

abelanger5 avatar Jan 28 '24 04:01 abelanger5