Skip to content

Commit

Permalink
Update the log information in proxy cache
Browse files Browse the repository at this point in the history
  fixes #17933

Signed-off-by: stonezdj <[email protected]>
  • Loading branch information
stonezdj committed Dec 7, 2022
1 parent e04c1fd commit 488766e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pkg/p2p/preheat/provider/dragonfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions src/server/middleware/repoproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 488766e

Please sign in to comment.