#matrix runs

1 messages · Page 1 of 1 (latest)

thorny laurel
#

When porting a github actions matrix run over to dagger.

What's the recommended approach here?

Specifically for python.

Should I invoke a parallel executor for this so they all happen at once?

Thanks 🙏

orchid timber
#

You could do it by running multiple dagger calls, each of the matrix jobs will be on their own runner. You could also fan out inside the dagger code, and this will be limited by the host cpu/memory mostly since all of your tasks are fighting for the same VM resources.

lime wasp
thorny laurel
thorny laurel
#

What's your opinion on Helder's example? is there another example or different way to solve it

lime wasp
thorny laurel
#

@lime wasp can you invoke a "dagger call" via code? Rather than CLI.

The idea is to migrate away from github actions YML completely and let dagger take over

Such as "dagger call test_matrix"

lime wasp
thorny laurel
#

@lime wasp not entirely. You still gotta invoke dagger engine from the YML.

But after that it's dagger o'clock

Are you suggesting to leave all the matrix stuff inside the YML file. And do dagger call inside the github matrix

lime wasp
# thorny laurel <@336241811179962368> not entirely. You still gotta invoke dagger engine from th...

no and yes. It's what I suggested above about having the ability to still use the matrix if needed. There are pros/cons about keep using the matrix.

What I'd initially do is to remove it and see how acceptable the performance is. Keep in mind that when removing the matrix, all your pipeline will run within the same VM which in some cases, might yield to slower executions depending on the resource consumption of the pipeline.

thorny laurel
#

@lime wasp yea, I got it.

leaden cipher
fickle sage
leaden cipher
# fickle sage <@768585883120173076> <@336241811179962368> do you think we should update our co...

Depends on the use case. For that cookbook, it's actually the better approach. Since it's building multiple files, just add them lazily to a directory and export the directory in the end. But I think it's good to create a new cookbook entry that uses concurrency, for example to test multiple versions. The build matrix example is building a go app in all SDKs, the new test matrix could test multiple Python versions in all SDKs 🙂

fickle sage
#

Great thanks!

I am thinking more of a brand new person coming to dagger and searching for matrix builds in our docs

I think the most common use case for matrix builds in traditional CI is multiple versions of a language/service

leaden cipher