mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
19
vendor/github.com/moby/buildkit/util/grpcerrors/grpcerrors.go
generated
vendored
19
vendor/github.com/moby/buildkit/util/grpcerrors/grpcerrors.go
generated
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user