Merge pull request #7580 from wy65701436/remove-workaround-500

Remove the workaround for checking chart existence
This commit is contained in:
Steven Zou 2019-04-28 21:09:59 +08:00 committed by GitHub
commit c9f2bf36eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {
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
}