vendor: update buildkit to opentelemetry support

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2021-06-15 21:02:39 -07:00
parent 6ba080d337
commit 334c93fbbe
829 changed files with 89541 additions and 24438 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/containerd/typeurl"
gogotypes "github.com/gogo/protobuf/types"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" // nolint:staticcheck
"github.com/golang/protobuf/ptypes/any"
"github.com/moby/buildkit/util/stack"
"github.com/sirupsen/logrus"
@ -169,7 +169,7 @@ func FromGRPC(err error) error {
}
}
err = status.FromProto(n).Err()
err = &grpcStatusErr{st: status.FromProto(n)}
for _, s := range stacks {
if s != nil {
@ -188,6 +188,21 @@ func FromGRPC(err error) error {
return stack.Enable(err)
}
type grpcStatusErr struct {
st *status.Status
}
func (e *grpcStatusErr) Error() string {
if e.st.Code() == codes.OK || e.st.Code() == codes.Unknown {
return e.st.Message()
}
return e.st.Code().String() + ": " + e.st.Message()
}
func (e *grpcStatusErr) GRPCStatus() *status.Status {
return e.st
}
type withCode struct {
code codes.Code
error