From dff71aa69ee1a2fc72a412699fb759822667a26b Mon Sep 17 00:00:00 2001 From: jonjohnsonjr Date: Wed, 28 Apr 2021 08:31:58 -0700 Subject: [PATCH] Don't warn about fallback unless we need to (#996) We were hitting this warning when listing an empty repository, which doesn't make sense. --- pkg/v1/google/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/v1/google/list.go b/pkg/v1/google/list.go index afac8533d..cf239cc5a 100644 --- a/pkg/v1/google/list.go +++ b/pkg/v1/google/list.go @@ -133,7 +133,6 @@ func (l *lister) list(repo name.Repository) (*Tags, error) { } // This isn't GCR, just append the tags and keep paginating. - logs.Warn.Printf("saw non-google tag listing response, falling back to pagination") tags.Tags = append(tags.Tags, parsed.Tags...) uri, err = getNextPageURL(resp) @@ -144,6 +143,7 @@ func (l *lister) list(repo name.Repository) (*Tags, error) { if uri == nil { break } + logs.Warn.Printf("saw non-google tag listing response, falling back to pagination") } return &tags, nil