From 255e47e4a4b970896b8db2a2592e37be960cda6c Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Wed, 18 Dec 2019 10:31:56 +0000 Subject: [PATCH] Fix issue with apiVersion v1 lock digest When apiVersion v1 chart dependencies are built with Helm 2 and then built with Helm 3, the lock digests differ. To avoid this issue, a depdendency update is forced. Signed-off-by: Martin Hickey --- pkg/downloader/manager.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index e46af6944..525a41d5d 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -86,6 +86,11 @@ func (m *Manager) Build() error { } if sum, err := resolver.HashReq(req, lock.Dependencies); err != nil || sum != lock.Digest { + // If lock digest differs and chart is apiVersion v1, it maybe because the lock was built + // with Helm 2 and should therefore be regenerated + if c.Metadata.APIVersion == chart.APIVersionV1 { + return m.Update() + } return errors.New("Chart.lock is out of sync with Chart.yaml") }