buildx icon indicating copy to clipboard operation
buildx copied to clipboard

Bake: Add summary of why build failure happened

Open ciaranmcnulty opened this issue 3 years ago • 2 comments

Currently when baking lots of targets it's common for the logs to contain:

  • Lots of successful build lines
  • Some error
  • Lots of other lines from the parallel jobs being cancelled

When looking at something like CI output (probably with --progress=plain) it can be hard to locate the source of the error

It would be great to have a summary that explained clearly:

  • Which target failed
  • Which stage failed
  • What line failed
  • What the error output was (in the case of a RUN failure)

Importantly, it would be great to have this at the very end of the output just before buildx exits

ciaranmcnulty avatar Sep 16 '22 09:09 ciaranmcnulty

I'm not sure if there's a case where two failures could happen at the same time? If so we should just summarise both

ciaranmcnulty avatar Sep 16 '22 09:09 ciaranmcnulty

Would be good to have the STDERR/STDOUT of the failed step highlighted, ideally with some sort of delimiter before/after.

Looking into build failures is indeed not really fun, when it becomes an exercise in squinting :D

Ocramius avatar Sep 16 '22 09:09 Ocramius