Bake: Add summary of why build failure happened
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
RUNfailure)
Importantly, it would be great to have this at the very end of the output just before buildx exits
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
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