Closed apostasie closed 1 month ago
cc @AkihiroSuda
lima
Is this issue really specific to Lima?
lima
Is this issue really specific to Lima?
I do not think so.
The issue seems to be related to Go's nil
keyword working very weirdly with interfaces. One method passes a (*reference)(nil)
to a method that takes client.Reference
and client.Reference(nil) != (*reference)(nil)
so the nil check fails.
The linked PR above should fix it. Thanks for finding this. I think this likely affected multi-platform because the following code path was wrong:
for k, v := range pbRes.Refs.Refs {
var ref *reference
if v.Id != "" {
ref, err = newReference(c, v)
if err != nil {
return nil, err
}
}
res.AddRef(k, ref) // incorrect usage of ref when v.Id is blank
}
I also cleaned it up a bit while I was in there since newReference
never returned an error and the function signature didn't benefit from returning an error due to function chaining anywhere.
@jsternberg really appreciate the fast fix. Thanks a lot!
First seen as part of nerdctl https://github.com/containerd/nerdctl/issues/3481
Reproducer:
Dockerfile:
Results in:
System:
This is also true for 1.15.3