diff --git a/internal/builder/image_fetcher_wrapper.go b/internal/builder/image_fetcher_wrapper.go index 71fbebf54..16bf39b2a 100644 --- a/internal/builder/image_fetcher_wrapper.go +++ b/internal/builder/image_fetcher_wrapper.go @@ -14,11 +14,11 @@ type ImageFetcher interface { // attempt to pull a remote image first. Fetch(ctx context.Context, name string, options image.FetchOptions) (imgutil.Image, error) - // CheckReadAccess verifies if an image accessible with read permissions + // CheckReadAccess verifies if an image is accessible with read permissions // When FetchOptions.Daemon is true and the image doesn't exist in the daemon, - // the behavior is dictated by the pullPolicy, which can have the following behavior + // the behavior is dictated by the pull policy, which can have the following behavior // - PullNever: returns false - // - PullAlways Or PullIfNotPResent: it will check read access for the remote image. + // - PullAlways Or PullIfNotPresent: it will check read access for the remote image. // When FetchOptions.Daemon is false it will check read access for the remote image. CheckReadAccess(repo string, options image.FetchOptions) bool } diff --git a/pkg/client/client.go b/pkg/client/client.go index fe8ebbd8a..7dd899b20 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -55,9 +55,9 @@ type ImageFetcher interface { // CheckReadAccess verifies if an image is accessible with read permissions // When FetchOptions.Daemon is true and the image doesn't exist in the daemon, - // the behavior is dictated by the pullPolicy, which can have the following behavior + // the behavior is dictated by the pull policy, which can have the following behavior // - PullNever: returns false - // - PullAlways Or PullIfNotPResent: it will check read access for the remote image. + // - PullAlways Or PullIfNotPresent: it will check read access for the remote image. // When FetchOptions.Daemon is false it will check read access for the remote image. CheckReadAccess(repo string, options image.FetchOptions) bool } diff --git a/pkg/image/fetcher.go b/pkg/image/fetcher.go index aa6a1b720..40c92b0f4 100644 --- a/pkg/image/fetcher.go +++ b/pkg/image/fetcher.go @@ -130,17 +130,16 @@ func (f *Fetcher) CheckReadAccess(repo string, options FetchOptions) bool { if _, err := f.fetchDaemonImage(repo); err != nil { if errors.Is(err, ErrNotFound) { // Image doesn't exist in the daemon - // Pull Never: should failed + // Pull Never: should fail // Pull If Not Present: need to check the registry if options.PullPolicy == PullNever { return false } return f.checkRemoteReadAccess(repo) } - f.logger.Debugf("failed reading image from the daemon %s, error: %s", repo, err.Error()) + f.logger.Debugf("failed reading image %s from the daemon, error: %s", repo, err.Error()) return false } - // no-op return true }