Remove the workaround for checking chart existence

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-04-28 15:24:13 +08:00
parent c26f655bce
commit b5cb984455

View File

@ -130,13 +130,6 @@ func (a *adapter) ChartExist(name, version string) (bool, error) {
if httpErr, ok := err.(*common_http.Error); ok && httpErr.Code == http.StatusNotFound { if httpErr, ok := err.(*common_http.Error); ok && httpErr.Code == http.StatusNotFound {
return false, nil return false, nil
} }
// TODO this is a workaround for https://github.com/goharbor/harbor/issues/7171
if httpErr, ok := err.(*common_http.Error); ok && httpErr.Code == http.StatusInternalServerError {
if strings.Contains(httpErr.Message, "no chart name found") ||
strings.Contains(httpErr.Message, "No chart version found") {
return false, nil
}
}
return false, err return false, err
} }