mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 03:35:21 +01:00
Update the log information in proxy cache (#17936)
fixes #17933 Signed-off-by: stonezdj <daojunz@vmware.com> Signed-off-by: stonezdj <daojunz@vmware.com>
This commit is contained in:
parent
e04c1fd6cb
commit
c4a58433cf
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user