fix: rebuild chart after dependency update on install (#7897)

* fix: rebuild chart after dependency update on install

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>

* add correct debug settings

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
pull/7758/head
Matt Butcher 5 years ago committed by GitHub
parent 4276acdf4b
commit fa5eb64f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -210,10 +210,15 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
Getters: p,
RepositoryConfig: settings.RepositoryConfig,
RepositoryCache: settings.RepositoryCache,
Debug: settings.Debug,
}
if err := man.Update(); err != nil {
return nil, err
}
// Reload the chart with the updated Chart.lock file.
if chartRequested, err = loader.Load(cp); err != nil {
return nil, errors.Wrap(err, "failed reloading chart after repo update")
}
} else {
return nil, err
}

@ -111,6 +111,12 @@ func TestInstall(t *testing.T) {
cmd: "install nodeps testdata/testcharts/chart-missing-deps",
wantError: true,
},
// Install chart with update-dependency
{
name: "install chart with missing dependencies",
cmd: "install --dependency-update updeps testdata/testcharts/chart-with-subchart-update",
golden: "output/chart-with-subchart-update.txt",
},
// Install, chart with bad dependencies in Chart.yaml in /charts
{
name: "install chart with bad dependencies in Chart.yaml",

@ -0,0 +1,8 @@
NAME: updeps
LAST DEPLOYED: Fri Sep 2 22:04:05 1977
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
PARENT NOTES

@ -0,0 +1,8 @@
apiVersion: v2
description: Chart with subchart that needs to be fetched
name: chart-with-subchart-update
version: 0.0.1
dependencies:
- name: subchart-with-notes
version: 0.0.1
repository: file://../chart-with-subchart-notes/charts

@ -0,0 +1,4 @@
apiVersion: v2
description: Subchart with notes
name: subchart-with-notes
version: 0.0.1
Loading…
Cancel
Save