Merge pull request #3442 from jsternberg/buildkit-vendor
vendor: update buildkit to v0.25.0
This commit is contained in:
@@ -29,7 +29,7 @@ require (
|
||||
github.com/hashicorp/hcl/v2 v2.24.0
|
||||
github.com/in-toto/in-toto-golang v0.9.0
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||
github.com/moby/buildkit v0.25.0-rc1
|
||||
github.com/moby/buildkit v0.25.0
|
||||
github.com/moby/go-archive v0.1.0
|
||||
github.com/moby/sys/atomicwriter v0.1.0
|
||||
github.com/moby/sys/mountinfo v0.7.2
|
||||
|
||||
@@ -255,8 +255,8 @@ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTS
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/moby/buildkit v0.25.0-rc1 h1:BX93yFRfF1LzD12wCOhjncbpL3RvkPa1+fF7xmsdr28=
|
||||
github.com/moby/buildkit v0.25.0-rc1/go.mod h1:phM8sdqnvgK2y1dPDnbwI6veUCXHOZ6KFSl6E164tkc=
|
||||
github.com/moby/buildkit v0.25.0 h1:cRgh74ymzyHxS5a/lsYT4OCyVU8iC3UgkwasIEUi0og=
|
||||
github.com/moby/buildkit v0.25.0/go.mod h1:phM8sdqnvgK2y1dPDnbwI6veUCXHOZ6KFSl6E164tkc=
|
||||
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||
github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
|
||||
|
||||
+23
-4
@@ -142,10 +142,20 @@ func Code(err error) codes.Code {
|
||||
}
|
||||
|
||||
if wrapped, ok := err.(multiUnwrapper); ok {
|
||||
var hasUnknown bool
|
||||
|
||||
for _, err := range wrapped.Unwrap() {
|
||||
if c := Code(err); c != codes.OK && c != codes.Unknown {
|
||||
c := Code(err)
|
||||
if c != codes.OK && c != codes.Unknown {
|
||||
return c
|
||||
}
|
||||
if c == codes.Unknown {
|
||||
hasUnknown = true
|
||||
}
|
||||
}
|
||||
|
||||
if hasUnknown {
|
||||
return codes.Unknown
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +169,7 @@ func WrapCode(err error, code codes.Code) error {
|
||||
// AsGRPCStatus tries to extract a gRPC status from the error.
|
||||
// Supports `Unwrap() error` and `Unwrap() []error` for wrapped errors.
|
||||
// When the `Unwrap() []error` returns multiple errors, the first one that
|
||||
// contains a gRPC status is returned.
|
||||
// contains a gRPC status that is not OK is returned with the full error message.
|
||||
func AsGRPCStatus(err error) (*status.Status, bool) {
|
||||
if err == nil {
|
||||
return nil, true
|
||||
@@ -178,8 +188,17 @@ func AsGRPCStatus(err error) (*status.Status, bool) {
|
||||
|
||||
if wrapped, ok := err.(multiUnwrapper); ok {
|
||||
for _, err := range wrapped.Unwrap() {
|
||||
if st, ok := AsGRPCStatus(err); ok && st != nil {
|
||||
return st, true
|
||||
st, ok := AsGRPCStatus(err)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
if st != nil && st.Code() != codes.OK {
|
||||
// Copy the full status so we can set the full error message
|
||||
// Does the proto conversion so can keep any extra details.
|
||||
proto := st.Proto()
|
||||
proto.Message = err.Error()
|
||||
return status.FromProto(proto), true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -448,7 +448,7 @@ github.com/mitchellh/go-wordwrap
|
||||
# github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||
## explicit; go 1.14
|
||||
github.com/mitchellh/hashstructure/v2
|
||||
# github.com/moby/buildkit v0.25.0-rc1
|
||||
# github.com/moby/buildkit v0.25.0
|
||||
## explicit; go 1.24.0
|
||||
github.com/moby/buildkit/api/services/control
|
||||
github.com/moby/buildkit/api/types
|
||||
|
||||
Reference in New Issue
Block a user