#Parallel builds across chained actions

1 messages · Page 1 of 1 (latest)

stone rune
#

Hello

I noticed that Dagger is building things sequentially when I'm chaining Dagger Functions.

I'm running "dagger call job-group out".
The first function (job-group) returns multiple objects. A second chained function (out) wants to evaluate everything. And the build process will not build the objects in parallel.

Is this expected?

I added an optional sync to the first function ("dagger call job-group --sync out") to work around this issue.

Is there a better way to fix this?

zealous spindle
#

This is interesting! I don't think this is expected behavior. Let me play around with a repro locally
cc @hazy yarrow @cobalt agate @odd harbor

stone rune
zealous spindle
#

Thanks! Yeah I'm seeing the same thing on latest

#

just to confirm the behavior is specific to chaining, I created this function:

func (r *MyModule) Hack(ctx context.Context) *Directory {
    jobs := r.JobGroup(ctx, false)
    return jobs.Out()
}

and indeed it runs the jobs concurrently. So things aren't working as expected with cli chaining

stone rune
#

Thank you!