buildx icon indicating copy to clipboard operation
buildx copied to clipboard

Add a flag to defer errors occurring in matrix build targets

Open korbin opened this issue 7 months ago • 3 comments

Description

I have a large matrix build emitting a number of products from multiple sequential 5+ hour build stages.

If one of these matrix targets fails for whatever reason, I'd like the others to run to completion or failure.

Currently, the entire build process dies upon the first error encountered in any individual matrix target, throwing away a bunch of valuable work for other running matrix targets.

I'd like a flag, docker buildx bake --defer-exit (or whatever) that enables this behavior.

korbin avatar Jul 05 '25 01:07 korbin

We should somehow combine this with functionality of https://github.com/docker/buildx/pull/1197 . Smth. like --strategy=parallel|sync-output|defer-error maybe

tonistiigi avatar Jul 07 '25 21:07 tonistiigi

Generally, this kind of feature has been accepted, but the exact UX should be confirmed before anyone starts to work on it.

tonistiigi avatar Sep 19 '25 21:09 tonistiigi

Smth. like --strategy=parallel|sync-output|defer-error maybe

Possibly --strategy=parallel[=N]|sync-output|defer-error

Or --strategy=(fail-fast|sync-output|defer-error),parallel=[N]

tonistiigi avatar Sep 19 '25 21:09 tonistiigi