Update typeurl to v2.2.2
Fixes panic when typeurl is not found Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
14
vendor/github.com/containerd/typeurl/v2/types.go
generated
vendored
14
vendor/github.com/containerd/typeurl/v2/types.go
generated
vendored
@@ -284,16 +284,14 @@ func getTypeByUrl(url string) (reflect.Type, error) {
|
||||
mu.RUnlock()
|
||||
mt, err := protoregistry.GlobalTypes.FindMessageByURL(url)
|
||||
if err != nil {
|
||||
e := protoregistry.NotFound
|
||||
if !errors.Is(err, e) {
|
||||
return nil, fmt.Errorf("type with url %s: %w", url, ErrNotFound)
|
||||
}
|
||||
|
||||
for _, h := range handlers {
|
||||
if t := h.GetType(url); t != nil {
|
||||
return t, nil
|
||||
if errors.Is(err, protoregistry.NotFound) {
|
||||
for _, h := range handlers {
|
||||
if t := h.GetType(url); t != nil {
|
||||
return t, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("type with url %s: %w", url, ErrNotFound)
|
||||
}
|
||||
empty := mt.New().Interface()
|
||||
return reflect.TypeOf(empty).Elem(), nil
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -194,7 +194,7 @@ github.com/containerd/plugin/registry
|
||||
# github.com/containerd/ttrpc v1.2.6
|
||||
## explicit; go 1.19
|
||||
github.com/containerd/ttrpc
|
||||
# github.com/containerd/typeurl/v2 v2.2.1
|
||||
# github.com/containerd/typeurl/v2 v2.2.2
|
||||
## explicit; go 1.21
|
||||
github.com/containerd/typeurl/v2
|
||||
# github.com/containerd/zfs/v2 v2.0.0-rc.0
|
||||
|
||||
Reference in New Issue
Block a user