distribution/xfer: add TODO for return error on Registered()
There's currently four implementations in our code: one in distribution, two in
BuildKit-related code, and one "mock" for testing:
- https://github.com/moby/moby/blob/65b8bcc3216ec64c8f761f35c6caba109b788254/builder/builder-next/worker/worker.go#L452-L455
- https://github.com/moby/moby/blob/65b8bcc3216ec64c8f761f35c6caba109b788254/builder/builder-next/adapters/containerimage/pull.go#L648-L651
- https://github.com/moby/moby/blob/65b8bcc3216ec64c8f761f35c6caba109b788254/distribution/pull_v2.go#L318-L321
- https://github.com/moby/moby/blob/65b8bcc3216ec64c8f761f35c6caba109b788254/distribution/xfer/download_test.go#L186-L188
All of these call a metadata-service to register the DiffID, and all of those
may return an error, which currently gets ignored.
We should consider changing the signature to return possible errors, so that
the callsite can decide how to handle them (which could be just "log" the error
or handle them in other ways).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>