From 00d4d726511f42e6f56e184fe9c52927cd9c4a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Tue, 9 Feb 2021 22:11:26 +0100 Subject: [PATCH] Move Comments --- cmd/helm/install.go | 9 ++++----- cmd/helm/install_test.go | 4 ++-- cmd/helm/upgrade.go | 5 ++++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 1358a01c9..0c350744e 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -211,10 +211,6 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options // Only check dependencies if there are any if req := chartRequested.Metadata.Dependencies; req != nil { - // If CheckDependencies returns an error, we have unfulfilled dependencies. - // As of Helm 2.4.0, this is treated as a stopping condition: - // https://github.com/helm/helm/issues/2209 - // Update all dependencies if DependencyUpdate is true if client.DependencyUpdate { man := &downloader.Manager{ Out: out, @@ -239,7 +235,10 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options } - // If not all dependencies are locally fail + // If CheckDependencies returns an error, we have unfulfilled dependencies. + // As of Helm 2.4.0, this is treated as a stopping condition: + // https://github.com/helm/helm/issues/2209 + // Update all dependencies if DependencyUpdate is true if err := action.CheckDependencies(chartRequested, req); err != nil { return nil, err } diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 0fae79534..c48ac5d9a 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -111,7 +111,7 @@ func TestInstall(t *testing.T) { { name: "install with verification, valid", cmd: "install signtest testdata/testcharts/signtest-0.1.0.tgz --verify --keyring testdata/helm-test-key.pub", - }, + }, // Install, chart with missing dependencies in /charts { name: "install chart with missing dependencies", @@ -120,7 +120,7 @@ func TestInstall(t *testing.T) { }, // Install chart with update-dependency { - name: "install chart with missing dependencies", + name: "install chart with missing dependencies with update", cmd: "install --dependency-update updeps testdata/testcharts/chart-with-subchart-update", golden: "output/chart-with-subchart-update.txt", }, diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index ecbfadaa2..b7ba23f39 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -171,7 +171,10 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } } - // If not all dependencies are locally fail + // If CheckDependencies returns an error, we have unfulfilled dependencies. + // As of Helm 2.4.0, this is treated as a stopping condition: + // https://github.com/helm/helm/issues/2209 + // Update all dependencies if DependencyUpdate is true if err := action.CheckDependencies(ch, req); err != nil { return err }