From 183f01b32c9bcf520ca17128309347753bae2d6f Mon Sep 17 00:00:00 2001 From: Jeff van Dam Date: Fri, 1 Sep 2023 15:28:48 +0100 Subject: [PATCH] Made urls key more specific Signed-off-by: Jeff van Dam --- internal/resolver/resolver.go | 2 +- pkg/downloader/manager.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/resolver/resolver.go b/internal/resolver/resolver.go index 4c70f8c43..ea97742a5 100644 --- a/internal/resolver/resolver.go +++ b/internal/resolver/resolver.go @@ -199,7 +199,7 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string if constraint.Check(v) { found = true if len(ver.URLs) > 0 { - urls[ver.Name] = ver.URLs[0] + urls[d.Repository+ver.Name+ver.Version] = ver.URLs[0] } locked[i].Version = v.Original() break diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 131cc9759..0176b9c17 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -745,8 +745,9 @@ func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]* } } - if _, ok := urls[name]; ok { - url = urls[name] + urlsKey := repoURL + name + version + if _, ok := urls[urlsKey]; ok { + url = urls[urlsKey] } else { url, err = repo.FindChartInRepoURL(repoURL, name, version, certFile, keyFile, caFile, m.Getters) }