mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-18 04:41:26 +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 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 {
|
if taskID, err = getTaskExistedFromErrMsg(status.ErrorMsg); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -194,12 +194,11 @@ func handleManifest(w http.ResponseWriter, r *http.Request, next http.Handler) e
|
|||||||
return nil
|
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)
|
log.Debugf("the tag is %v, digest is %v", art.Tag, art.Digest)
|
||||||
if r.Method == http.MethodHead {
|
if r.Method == http.MethodHead {
|
||||||
err = proxyManifestHead(ctx, w, proxyCtl, p, art, remote)
|
err = proxyManifestHead(ctx, w, proxyCtl, p, art, remote)
|
||||||
} else if r.Method == http.MethodGet {
|
} 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)
|
err = proxyManifestGet(ctx, w, proxyCtl, p, art, remote)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user