@@ -35,7 +35,7 @@ import (
3535
3636 "github.com/google/go-containerregistry/pkg/authn"
3737 "github.com/google/go-containerregistry/pkg/name"
38- v1 "github.com/google/go-containerregistry/pkg/v1"
38+ "github.com/google/go-containerregistry/pkg/v1"
3939 "github.com/google/go-containerregistry/pkg/v1/empty"
4040 "github.com/google/go-containerregistry/pkg/v1/mutate"
4141 "github.com/google/go-containerregistry/pkg/v1/remote"
@@ -261,9 +261,6 @@ func (p DataProcessor) inspectAndStreamSourceImage(
261261 klog .Infoln ("Streaming from the source" )
262262 doneSize , err := io .Copy (streamWriter , io .TeeReader (sourceImageReader , imageInfoWriter ))
263263 if err != nil {
264- if importerrs .IsNoSpaceLeftError (err ) {
265- return importerrs .NewNoSpaceLeftError (err )
266- }
267264 return fmt .Errorf ("error copying from the source: %w" , err )
268265 }
269266
@@ -328,9 +325,6 @@ func (p DataProcessor) uploadLayersAndImage(
328325
329326 klog .Infoln ("Uploading layer to registry" )
330327 if err := remote .WriteLayer (repo , layer , remoteOpts ... ); err != nil {
331- if importerrs .IsNoSpaceLeftError (err ) {
332- return importerrs .NewNoSpaceLeftError (err )
333- }
334328 return fmt .Errorf ("error uploading layer: %w" , err )
335329 }
336330 klog .Infoln ("Layer uploaded" )
@@ -362,9 +356,6 @@ func (p DataProcessor) uploadLayersAndImage(
362356
363357 klog .Infof ("Uploading image %q to registry" , p .destImageName )
364358 if err = remote .Write (ref , image , remoteOpts ... ); err != nil {
365- if importerrs .IsNoSpaceLeftError (err ) {
366- return importerrs .NewNoSpaceLeftError (err )
367- }
368359 return fmt .Errorf ("error uploading image: %w" , err )
369360 }
370361
@@ -412,9 +403,6 @@ func getImageInfo(ctx context.Context, sourceReader io.ReadCloser) (ImageInfo, e
412403
413404 uncompressedN , err = io .CopyN (tempImageInfoFile , formatSourceReaders .TopReader (), imageInfoSize )
414405 if err != nil && ! errors .Is (err , io .EOF ) {
415- if importerrs .IsNoSpaceLeftError (err ) {
416- return ImageInfo {}, importerrs .NewNoSpaceLeftError (err )
417- }
418406 return ImageInfo {}, fmt .Errorf ("error writing to temp file: %w" , err )
419407 }
420408
@@ -442,9 +430,6 @@ func getImageInfo(ctx context.Context, sourceReader io.ReadCloser) (ImageInfo, e
442430 // It's necessary to read everything from the original image to avoid blocking.
443431 _ , err = io .Copy (& EmptyWriter {}, sourceReader )
444432 if err != nil {
445- if importerrs .IsNoSpaceLeftError (err ) {
446- return ImageInfo {}, importerrs .NewNoSpaceLeftError (err )
447- }
448433 return ImageInfo {}, fmt .Errorf ("error copying to nowhere: %w" , err )
449434 }
450435
@@ -473,9 +458,6 @@ func getImageInfo(ctx context.Context, sourceReader io.ReadCloser) (ImageInfo, e
473458 // Count uncompressed size of source image.
474459 n , err := io .Copy (& EmptyWriter {}, formatSourceReaders .TopReader ())
475460 if err != nil {
476- if importerrs .IsNoSpaceLeftError (err ) {
477- return ImageInfo {}, importerrs .NewNoSpaceLeftError (err )
478- }
479461 return ImageInfo {}, fmt .Errorf ("error copying to nowhere: %w" , err )
480462 }
481463
0 commit comments