Skip to content

Commit

Permalink
Special-case an error message to make it clearer
Browse files Browse the repository at this point in the history
... and, also, indirectly, confirm the hypothesis in
containers/podman#24308 .

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Oct 17, 2024
1 parent a66152c commit 5fd9d1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/storage_dest.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ func (s *storageImageDestination) PutBlobPartial(ctx context.Context, chunkAcces

out, err := s.imageRef.transport.store.PrepareStagedLayer(nil, differ)
if err != nil {
// Special-case the error message
var perr chunked.ErrFallbackToOrdinaryLayerDownload
if errors.Is(err, storage.ErrNotSupported) && !errors.As(err, &perr) {
err = fmt.Errorf("partial layer pull is not supported by the graph driver, and fallback is not allowed: %w", err)
}
return private.UploadedBlob{}, err
}
succeeded := false
Expand Down

0 comments on commit 5fd9d1b

Please sign in to comment.