mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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: -65b8bcc321/builder/builder-next/worker/worker.go (L452-L455)
-65b8bcc321/builder/builder-next/adapters/containerimage/pull.go (L648-L651)
-65b8bcc321/distribution/pull_v2.go (L318-L321)
-65b8bcc321/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>
This commit is contained in:
parent
3309ea9419
commit
69b0913e1f
1 changed files with 5 additions and 0 deletions
|
@ -94,6 +94,11 @@ type DownloadDescriptor interface {
|
|||
// DownloadDescriptorWithRegistered is successful.
|
||||
type DownloadDescriptorWithRegistered interface {
|
||||
DownloadDescriptor
|
||||
|
||||
// TODO existing implementations in distribution and builder-next swallow errors
|
||||
// when registering the diffID. Consider changing the Registered signature
|
||||
// to return the error.
|
||||
|
||||
Registered(diffID layer.DiffID)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue