build: add experimental support for print flag

Print flag can be used to make additional information
requests about the build and print their results.

Currently Dockerfile supports: outline, targets, subrequests.describe

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2022-05-04 18:48:50 -07:00
parent 17dc0e1108
commit eefa8188e1
98 changed files with 8536 additions and 3339 deletions

View File

@ -42,6 +42,14 @@ func ToGRPC(err error) error {
st = status.FromProto(pb)
}
// If the original error was wrapped with more context than the GRPCStatus error,
// copy the original message to the GRPCStatus error
if err.Error() != st.Message() {
pb := st.Proto()
pb.Message = err.Error()
st = status.FromProto(pb)
}
var details []proto.Message
for _, st := range stack.Traces(err) {