pull/10870/merge
brainfuxk 6 months ago committed by GitHub
commit 20c340d0ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -57,6 +57,7 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
// Now we clone the dependencies, locking as we go.
locked := make([]*chart.Dependency, len(reqs))
missing := []string{}
cachedRepoIndex := map[string]*repo.IndexFile{}
for i, d := range reqs {
constraint, err := semver.NewConstraint(d.Version)
if err != nil {
@ -122,11 +123,15 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
var ok bool
found := true
if !registry.IsOCI(d.Repository) {
repoIndex, err := repo.LoadIndexFile(filepath.Join(r.cachepath, helmpath.CacheIndexFile(repoName)))
repoIndex, existence := cachedRepoIndex[repoName]
if !existence {
var err error
repoIndex, err = repo.LoadIndexFile(filepath.Join(r.cachepath, helmpath.CacheIndexFile(repoName)))
if err != nil {
return nil, errors.Wrapf(err, "no cached repository for %s found. (try 'helm repo update')", repoName)
}
cachedRepoIndex[repoName] = repoIndex
}
vs, ok = repoIndex.Entries[d.Name]
if !ok {
return nil, errors.Errorf("%s chart not found in repo %s", d.Name, d.Repository)

Loading…
Cancel
Save