Add debug log when transfer returns not implemented

Currently the error details are not included in the output error and
there is no log. One of the reasons a the transferer was skipped could
be do to a specific component which is not implemented (such as trying
to use erofs differ) or unsupported image (pulling schema1). This
information is useful to find a bad configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2025-05-29 15:34:06 -07:00
committed by k8s-infra-cherrypick-robot
parent 820e567650
commit 0c3cd8a995

View File

@@ -138,6 +138,7 @@ func (s *service) Transfer(ctx context.Context, req *transferapi.TransferRequest
} else if !errdefs.IsNotImplemented(err) {
return nil, errgrpc.ToGRPC(err)
}
log.G(ctx).WithError(err).Debugf("transfer not implemented for %T to %T", src, dst)
}
return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented for %s to %s", req.Source.GetTypeUrl(), req.Destination.GetTypeUrl())
}