diff --git a/src/pkg/p2p/preheat/provider/dragonfly.go b/src/pkg/p2p/preheat/provider/dragonfly.go index c0b873733519..9df951730b26 100644 --- a/src/pkg/p2p/preheat/provider/dragonfly.go +++ b/src/pkg/p2p/preheat/provider/dragonfly.go @@ -117,7 +117,7 @@ func (dd *DragonflyDriver) CheckProgress(taskID string) (*PreheatingStatus, erro } // If preheat job already exists - if strings.Index(status.ErrorMsg, "preheat task already exists, id:") >= 0 { + if strings.Contains(status.ErrorMsg, "preheat task already exists, id:") { if taskID, err = getTaskExistedFromErrMsg(status.ErrorMsg); err != nil { return nil, err } diff --git a/src/server/middleware/repoproxy/proxy.go b/src/server/middleware/repoproxy/proxy.go index 8b94f2ba285f..1263ddaee5cb 100644 --- a/src/server/middleware/repoproxy/proxy.go +++ b/src/server/middleware/repoproxy/proxy.go @@ -194,12 +194,11 @@ func handleManifest(w http.ResponseWriter, r *http.Request, next http.Handler) e return nil } - log.Warningf("Artifact: %v:%v, digest:%v is not found in proxy cache, fetch it from remote repo", art.Repository, art.Tag, art.Digest) - log.Debugf("the tag is %v, digest is %v", art.Tag, art.Digest) if r.Method == http.MethodHead { err = proxyManifestHead(ctx, w, proxyCtl, p, art, remote) } else if r.Method == http.MethodGet { + log.Warningf("Artifact: %v:%v, digest:%v is not found in proxy cache, fetch it from remote repo", art.Repository, art.Tag, art.Digest) err = proxyManifestGet(ctx, w, proxyCtl, p, art, remote) } if err != nil {