diff --git a/cmd/root.go b/cmd/root.go index 2ed0c5ad..cd333dd4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -150,7 +150,10 @@ The name of a release can be used as a label: "--selector name=myrelease"`) fs.BoolVar(&globalOptions.EnableLiveOutput, "enable-live-output", globalOptions.EnableLiveOutput, `Show live output from the Helm binary Stdout/Stderr into Helmfile own Stdout/Stderr. It only applies for the Helm CLI commands, Stdout/Stderr for Hooks are still displayed only when it's execution finishes.`) fs.BoolVarP(&globalOptions.Interactive, "interactive", "i", false, "Request confirmation before attempting to modify clusters") - fs.BoolVar(&globalOptions.SequentialHelmfiles, "sequential-helmfiles", false, "Process helmfile.d files sequentially in alphabetical order instead of in parallel. Useful when file order matters for dependencies.") + fs.BoolVar(&globalOptions.SequentialHelmfiles, "sequential-helmfiles", false, `Process helmfile.d files sequentially in alphabetical order instead of in parallel. +Useful when file order matters for dependencies (e.g., databases before applications). +When processing multiple files, paths are resolved without changing the process working directory, +so relative environment variables like KUBECONFIG work correctly.`) // avoid 'pflag: help requested' error (#251) fs.BoolP("help", "h", false, "help for helmfile") } diff --git a/docs/index.md b/docs/index.md index bfd34447..d152f96d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -655,6 +655,7 @@ Flags: --state-values-file stringArray specify state values in a YAML file. Used to override .Values within the helmfile template (not values template). --state-values-set stringArray set state values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template). --state-values-set-string stringArray set state STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2). Used to override .Values within the helmfile template (not values template). + --sequential-helmfiles Process helmfile.d files sequentially in alphabetical order instead of in parallel --strip-args-values-on-exit-error Strip the potential secret values of the helm command args contained in a helmfile error message (default true) -v, --version version for helmfile @@ -1443,6 +1444,8 @@ For example, you can use a `-.yaml` naming conve helmfile --sequential-helmfiles sync ``` +> **Note:** When processing multiple helmfile.d files, both parallel and sequential modes resolve paths without changing the process working directory, so relative environment variables like `KUBECONFIG` work correctly. + ### Glob patterns In case you want more control over how multiple `helmfile.yaml` files are organized, use `helmfiles:` configuration key in the `helmfile.yaml`: diff --git a/pkg/app/app.go b/pkg/app/app.go index 0bc85958..bd1e2fc0 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -756,6 +756,11 @@ func (a *App) within(dir string, do func() error) error { return err } + // Skip chdir if we're already in the target directory + if absDir == prev { + return do() + } + a.Logger.Debugf("changing working directory to \"%s\"", absDir) if err := a.fs.Chdir(absDir); err != nil { @@ -776,40 +781,6 @@ func (a *App) within(dir string, do func() error) error { return appErr } -func (a *App) visitStateFiles(fileOrDir string, opts LoadOpts, do func(string, string) error) error { - desiredStateFiles, err := a.findDesiredStateFiles(fileOrDir, opts) - if err != nil { - return appError("", err) - } - - for _, relPath := range desiredStateFiles { - var file string - var dir string - if a.fs.DirectoryExistsAt(relPath) { - file = relPath - dir = relPath - } else { - file = filepath.Base(relPath) - dir = filepath.Dir(relPath) - } - - a.Logger.Debugf("processing file \"%s\" in directory \"%s\"", file, dir) - - absd, errAbsDir := a.fs.Abs(dir) - if errAbsDir != nil { - return errAbsDir - } - err := a.within(absd, func() error { - return do(file, absd) - }) - if err != nil { - return appError(fmt.Sprintf("in %s/%s", dir, file), err) - } - } - - return nil -} - func (a *App) loadDesiredStateFromYaml(file string, opts ...LoadOpts) (*state.HelmState, error) { return a.loadDesiredStateFromYamlWithBaseDir(file, "", opts...) } @@ -894,10 +865,6 @@ func (a *App) getHelm(st *state.HelmState) (helmexec.Interface, error) { return a.helms[key], nil } -func (a *App) visitStates(fileOrDir string, defOpts LoadOpts, converge func(*state.HelmState) (bool, []error)) error { - return a.visitStatesWithContext(fileOrDir, defOpts, converge, nil) -} - // processStateFileParallel processes a single helmfile state file in a goroutine. // It is used for parallel processing of multiple helmfile.d files. // Results are communicated via errChan (errors) and matchChan (whether file had matching releases). @@ -946,11 +913,20 @@ func (a *App) processStateFileParallel(relPath string, defOpts LoadOpts, converg st.Selectors = opts.Selectors + // Track whether any releases matched across nested helmfiles and converge. + // Aggregate into a single send to matchChan to avoid overfilling the buffer + // (which is sized to len(desiredStateFiles), i.e. one send per goroutine). + anyMatched := false + if len(st.Helmfiles) > 0 && !opts.Reverse { - if err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx); err != nil { + matched, err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx) + if err != nil { errChan <- err return } + if matched { + anyMatched = true + } } templated, err := st.ExecuteTemplates() @@ -978,19 +954,31 @@ func (a *App) processStateFileParallel(relPath string, defOpts LoadOpts, converg return } - // Report if this file had matching releases if processed { - matchChan <- true + anyMatched = true } if opts.Reverse && len(st.Helmfiles) > 0 { - if err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx); err != nil { + matched, err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx) + if err != nil { errChan <- err + return } + if matched { + anyMatched = true + } + } + + if anyMatched { + matchChan <- true } } -func (a *App) processNestedHelmfiles(st *state.HelmState, absd, file string, defOpts, opts LoadOpts, converge func(*state.HelmState) (bool, []error), sharedCtx *Context) error { +// processNestedHelmfiles processes sub-helmfiles referenced from a parent state. +// It returns true if any nested helmfile successfully found matching releases, +// which is used to update the caller's noMatchInHelmfiles tracking. +func (a *App) processNestedHelmfiles(st *state.HelmState, absd, file string, defOpts, opts LoadOpts, converge func(*state.HelmState) (bool, []error), sharedCtx *Context) (bool, error) { + anyMatched := false for i, m := range st.Helmfiles { optsForNestedState := LoadOpts{ CalleePath: filepath.Join(absd, file), @@ -1008,17 +996,22 @@ func (a *App) processNestedHelmfiles(st *state.HelmState, absd, file string, def switch err.(type) { case *NoMatchingHelmfileError: default: - return appError(fmt.Sprintf("in .helmfiles[%d]", i), err) + return anyMatched, appError(fmt.Sprintf("in .helmfiles[%d]", i), err) } + } else { + anyMatched = true } } - return nil + return anyMatched, nil } func (a *App) visitStatesWithContext(fileOrDir string, defOpts LoadOpts, converge func(*state.HelmState) (bool, []error), sharedCtx *Context) error { noMatchInHelmfiles := true - desiredStateFiles, err := a.findDesiredStateFiles(fileOrDir, defOpts) + desiredStateFiles, findErr := a.findDesiredStateFiles(fileOrDir, defOpts) + if findErr != nil { + return appError("", findErr) + } // Process files in parallel if we have multiple files and parallel mode is enabled shouldProcessInParallel := len(desiredStateFiles) > 1 && !a.SequentialHelmfiles @@ -1052,109 +1045,137 @@ func (a *App) visitStatesWithContext(fileOrDir string, defOpts LoadOpts, converg noMatchInHelmfiles = false } } else { - // Sequential processing for single file or when --sequential-helmfiles is set - err = a.visitStateFiles(fileOrDir, defOpts, func(f, d string) (retErr error) { + // Sequential processing for single file or when --sequential-helmfiles is set. + // + // Two strategies for path resolution: + // - Single file: use os.Chdir (via within()) to preserve backward-compatible + // chart path format in output (relative to the helmfile directory). + // - Multiple files with --sequential-helmfiles: use baseDir parameter to avoid + // os.Chdir, which fixes relative env var paths like KUBECONFIG (#2409). + useBaseDir := len(desiredStateFiles) > 1 + + for _, relPath := range desiredStateFiles { + var file string + var dir string + if a.fs.DirectoryExistsAt(relPath) { + file = relPath + dir = relPath + } else { + file = filepath.Base(relPath) + dir = filepath.Dir(relPath) + } + + absd, errAbsDir := a.fs.Abs(dir) + if errAbsDir != nil { + return errAbsDir + } + opts := defOpts.DeepCopy() - if opts.CalleePath == "" { - opts.CalleePath = f + opts.CalleePath = file } - st, err := a.loadDesiredStateFromYaml(f, opts) + processFile := func() (retErr error) { + var st *state.HelmState + var loadErr error - ctx := context{app: a, st: st, retainValues: defOpts.RetainValuesFiles} + if useBaseDir { + // Multi-file sequential: use baseDir for path resolution + // instead of os.Chdir to avoid breaking relative env var paths. + baseDir := dir + if dir == "." { + baseDir = "" + } + st, loadErr = a.loadDesiredStateFromYamlWithBaseDir(file, baseDir, opts) + } else { + // Single file: CWD is set by within(), load without baseDir + st, loadErr = a.loadDesiredStateFromYaml(file, opts) + } - if err != nil { - switch stateLoadErr := err.(type) { - case *state.StateLoadError: - switch stateLoadErr.Cause.(type) { - case *state.UndefinedEnvError: - return nil + ctx := context{app: a, st: st, retainValues: defOpts.RetainValuesFiles} + + if loadErr != nil { + switch stateLoadErr := loadErr.(type) { + case *state.StateLoadError: + switch stateLoadErr.Cause.(type) { + case *state.UndefinedEnvError: + return nil + default: + return ctx.wrapErrs(loadErr) + } default: - return ctx.wrapErrs(err) + return ctx.wrapErrs(loadErr) } - default: - return ctx.wrapErrs(err) } - } - st.Selectors = opts.Selectors - visitSubHelmfiles := func() error { - if len(st.Helmfiles) > 0 { - noMatchInSubHelmfiles := true - for i, m := range st.Helmfiles { - optsForNestedState := LoadOpts{ - CalleePath: filepath.Join(d, f), - Environment: m.Environment, - Reverse: defOpts.Reverse, - RetainValuesFiles: defOpts.RetainValuesFiles, - } - if (m.Selectors == nil && !isExplicitSelectorInheritanceEnabled()) || m.SelectorsInherited { - optsForNestedState.Selectors = opts.Selectors - } else { - optsForNestedState.Selectors = m.Selectors - } + if st == nil { + return nil + } - if err := a.visitStates(m.Path, optsForNestedState, converge); err != nil { - switch err.(type) { - case *NoMatchingHelmfileError: - default: - return appError(fmt.Sprintf("in .helmfiles[%d]", i), err) - } - } else { - noMatchInSubHelmfiles = false - } + st.Selectors = opts.Selectors + + if !opts.Reverse && len(st.Helmfiles) > 0 { + matched, err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx) + if err != nil { + return err + } + if matched { + noMatchInHelmfiles = false } - noMatchInHelmfiles = noMatchInHelmfiles && noMatchInSubHelmfiles } + + templated, tmplErr := st.ExecuteTemplates() + if tmplErr != nil { + return appError(fmt.Sprintf("failed executing release templates in \"%s\"", file), tmplErr) + } + + var ( + processed bool + errs []error + ) + + CleanWaitGroup.Add(1) + defer func() { + defer CleanWaitGroup.Done() + cleanErr := context{app: a, st: templated, retainValues: defOpts.RetainValuesFiles}.clean(errs) + if retErr == nil { + retErr = cleanErr + } else if cleanErr != nil { + a.Logger.Debugf("Failed to clean up temporary files generated while processing %q: %v", templated.FilePath, cleanErr) + } + }() + + processed, errs = converge(templated) + + if len(errs) > 0 { + return errs[0] + } + + noMatchInHelmfiles = noMatchInHelmfiles && !processed + + if opts.Reverse && len(st.Helmfiles) > 0 { + matched, err := a.processNestedHelmfiles(st, absd, file, defOpts, opts, converge, sharedCtx) + if err != nil { + return err + } + if matched { + noMatchInHelmfiles = false + } + } + return nil } - if !opts.Reverse { - err = visitSubHelmfiles() - if err != nil { - return err - } + var fileErr error + if useBaseDir { + fileErr = processFile() + } else { + fileErr = a.within(absd, processFile) } - - templated, tmplErr := st.ExecuteTemplates() - if tmplErr != nil { - return appError(fmt.Sprintf("failed executing release templates in \"%s\"", f), tmplErr) + if fileErr != nil { + return appError(fmt.Sprintf("in %s/%s", dir, file), fileErr) } - - var ( - processed bool - errs []error - ) - - CleanWaitGroup.Add(1) - defer func() { - defer CleanWaitGroup.Done() - cleanErr := context{app: a, st: templated, retainValues: defOpts.RetainValuesFiles}.clean(errs) - if retErr == nil { - retErr = cleanErr - } else if cleanErr != nil { - a.Logger.Debugf("Failed to clean up temporary files generated while processing %q: %v", templated.FilePath, cleanErr) - } - }() - - processed, errs = converge(templated) - - noMatchInHelmfiles = noMatchInHelmfiles && !processed - - if opts.Reverse { - err = visitSubHelmfiles() - if err != nil { - return err - } - } - - return nil - }) - } - - if err != nil { - return err + } } if noMatchInHelmfiles { diff --git a/pkg/app/app_sequential_test.go b/pkg/app/app_sequential_test.go new file mode 100644 index 00000000..8dc28618 --- /dev/null +++ b/pkg/app/app_sequential_test.go @@ -0,0 +1,417 @@ +package app + +import ( + "bytes" + "fmt" + "reflect" + "testing" + + "github.com/helmfile/vals" + + ffs "github.com/helmfile/helmfile/pkg/filesystem" + "github.com/helmfile/helmfile/pkg/helmexec" + "github.com/helmfile/helmfile/pkg/testhelper" + "github.com/helmfile/helmfile/pkg/testutil" +) + +// TestSequentialHelmfilesNoChdirCalled verifies that sequential processing +// does NOT call os.Chdir(), which was the root cause of issue #2409. +func TestSequentialHelmfilesNoChdirCalled(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/01-first.yaml": ` +releases: +- name: first-release + chart: stable/chart-a + namespace: default +`, + "/path/to/helmfile.d/02-second.yaml": ` +releases: +- name: second-release + chart: stable/chart-b + namespace: default +`, + } + + testFs := testhelper.NewTestFs(files) + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + app := &App{ + OverrideHelmBinary: DefaultHelmBinary, + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: newAppTestLogger(), + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + } + + app = injectFs(app, testFs) + expectNoCallsToHelm(app) + + err = app.ForEachState( + Noop, + false, + SetFilter(true), + ) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if testFs.ChdirCalls != 0 { + t.Errorf("expected 0 Chdir calls in sequential mode, got %d", testFs.ChdirCalls) + } +} + +// TestSequentialHelmfilesProcessesAllFiles verifies all files in helmfile.d +// are processed when using sequential mode. +func TestSequentialHelmfilesProcessesAllFiles(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/001-app.yaml": ` +releases: +- name: app1 + chart: stable/app1 + namespace: default +`, + "/path/to/helmfile.d/002-db.yaml": ` +releases: +- name: db1 + chart: stable/postgresql + namespace: default +`, + "/path/to/helmfile.d/003-cache.yaml": ` +releases: +- name: cache1 + chart: stable/redis + namespace: default +`, + } + + var buffer bytes.Buffer + syncWriter := testhelper.NewSyncWriter(&buffer) + logger := helmexec.NewLogger(syncWriter, "debug") + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: logger, + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + }, files) + + expectNoCallsToHelm(app) + + out, err := testutil.CaptureStdout(func() { + err := app.ListReleases(configImpl{ + skipCharts: false, + output: "json", + }) + if err != nil { + t.Logf("ListReleases error: %v", err) + } + }) + + if err != nil { + t.Fatalf("unexpected error capturing output: %v", err) + } + + if !bytes.Contains([]byte(out), []byte("app1")) { + t.Errorf("app1 release not found in output:\n%s", out) + } + if !bytes.Contains([]byte(out), []byte("db1")) { + t.Errorf("db1 release not found in output:\n%s", out) + } + if !bytes.Contains([]byte(out), []byte("cache1")) { + t.Errorf("cache1 release not found in output:\n%s", out) + } +} + +// TestSequentialHelmfilesAlphabeticalOrder verifies sequential mode processes +// files in alphabetical order. +func TestSequentialHelmfilesAlphabeticalOrder(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/z-last.yaml": ` +releases: +- name: zulu-release + chart: stable/chart-z + namespace: ns-z +`, + "/path/to/helmfile.d/a-first.yaml": ` +releases: +- name: alpha-release + chart: stable/chart-a + namespace: ns-a +`, + "/path/to/helmfile.d/m-middle.yaml": ` +releases: +- name: mike-release + chart: stable/chart-m + namespace: ns-m +`, + } + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: newAppTestLogger(), + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + }, files) + + expectNoCallsToHelm(app) + + var actualOrder []string + noop := func(run *Run) (bool, []error) { + actualOrder = append(actualOrder, run.state.FilePath) + return false, []error{} + } + + err = app.ForEachState( + noop, + false, + SetFilter(true), + ) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + expectedOrder := []string{"/path/to/helmfile.d/a-first.yaml", "/path/to/helmfile.d/m-middle.yaml", "/path/to/helmfile.d/z-last.yaml"} + if !reflect.DeepEqual(actualOrder, expectedOrder) { + t.Errorf("unexpected order of processed state files: expected=%v, actual=%v", expectedOrder, actualOrder) + } +} + +// TestSequentialHelmfilesMatchesParallelResults verifies that sequential and +// parallel modes produce the same set of releases. +func TestSequentialHelmfilesMatchesParallelResults(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/01-app.yaml": ` +releases: +- name: app-release + chart: stable/app + namespace: default +`, + "/path/to/helmfile.d/02-db.yaml": ` +releases: +- name: db-release + chart: stable/postgresql + namespace: default +`, + } + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + // Run in parallel mode (default) + parallelOut, err := testutil.CaptureStdout(func() { + var buffer bytes.Buffer + syncWriter := testhelper.NewSyncWriter(&buffer) + logger := helmexec.NewLogger(syncWriter, "debug") + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: logger, + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: false, + }, files) + expectNoCallsToHelm(app) + + if err := app.ListReleases(configImpl{skipCharts: false, output: "json"}); err != nil { + t.Logf("parallel ListReleases error: %v", err) + } + }) + if err != nil { + t.Fatalf("unexpected error capturing parallel output: %v", err) + } + + // Run in sequential mode + sequentialOut, err := testutil.CaptureStdout(func() { + var buffer bytes.Buffer + syncWriter := testhelper.NewSyncWriter(&buffer) + logger := helmexec.NewLogger(syncWriter, "debug") + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: logger, + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + }, files) + expectNoCallsToHelm(app) + + if err := app.ListReleases(configImpl{skipCharts: false, output: "json"}); err != nil { + t.Logf("sequential ListReleases error: %v", err) + } + }) + if err != nil { + t.Fatalf("unexpected error capturing sequential output: %v", err) + } + + // Both modes should contain the same releases + for _, name := range []string{"app-release", "db-release"} { + if !bytes.Contains([]byte(parallelOut), []byte(name)) { + t.Errorf("parallel output missing release %q:\n%s", name, parallelOut) + } + if !bytes.Contains([]byte(sequentialOut), []byte(name)) { + t.Errorf("sequential output missing release %q:\n%s", name, sequentialOut) + } + } +} + +// TestSequentialHelmfilesWithUndefinedEnv verifies that files with undefined +// environments are skipped gracefully in sequential mode. +func TestSequentialHelmfilesWithUndefinedEnv(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/01-has-prod.yaml": ` +environments: + prod: {} +--- +releases: +- name: prod-release + chart: stable/prod + namespace: default +`, + "/path/to/helmfile.d/02-no-prod.yaml": ` +environments: + staging: {} +--- +releases: +- name: staging-release + chart: stable/staging + namespace: default +`, + } + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "prod", + Logger: newAppTestLogger(), + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + }, files) + + expectNoCallsToHelm(app) + + out, err := testutil.CaptureStdout(func() { + err := app.ListReleases(configImpl{ + skipCharts: false, + output: "json", + }) + if err != nil { + t.Logf("ListReleases error: %v", err) + } + }) + + if err != nil { + t.Fatalf("unexpected error capturing output: %v", err) + } + + // The prod-release should be present + if !bytes.Contains([]byte(out), []byte("prod-release")) { + t.Errorf("prod-release not found in output:\n%s", out) + } + + // The staging-release should NOT be present (env "prod" not defined in that file) + if bytes.Contains([]byte(out), []byte("staging-release")) { + t.Errorf("staging-release should have been skipped but was found in output:\n%s", out) + } +} + +// TestSequentialHelmfilesConvergeErrorPropagated verifies that errors returned +// from the converge function are properly propagated in sequential mode. +func TestSequentialHelmfilesConvergeErrorPropagated(t *testing.T) { + files := map[string]string{ + "/path/to/helmfile.d/01-first.yaml": ` +releases: +- name: first-release + chart: stable/chart-a + namespace: default +`, + "/path/to/helmfile.d/02-second.yaml": ` +releases: +- name: second-release + chart: stable/chart-b + namespace: default +`, + } + + valsRuntime, err := vals.New(vals.Options{CacheSize: 32}) + if err != nil { + t.Fatalf("unexpected error creating vals runtime: %v", err) + } + + app := appWithFs(&App{ + OverrideHelmBinary: DefaultHelmBinary, + fs: ffs.DefaultFileSystem(), + OverrideKubeContext: "default", + DisableKubeVersionAutoDetection: true, + Env: "default", + Logger: newAppTestLogger(), + valsRuntime: valsRuntime, + FileOrDir: "/path/to/helmfile.d", + SequentialHelmfiles: true, + }, files) + + expectNoCallsToHelm(app) + + convergeErr := fmt.Errorf("simulated converge failure") + failingConverge := func(_ *Run) (bool, []error) { + return false, []error{convergeErr} + } + + err = app.ForEachState( + failingConverge, + false, + SetFilter(true), + ) + + if err == nil { + t.Fatal("expected error from ForEachState, got nil") + } + + if !bytes.Contains([]byte(err.Error()), []byte("simulated converge failure")) { + t.Errorf("expected error to contain 'simulated converge failure', got: %v", err) + } +} diff --git a/pkg/app/testdata/app_diff_test/bad_selector b/pkg/app/testdata/app_diff_test/bad_selector index a445b1d8..867d0ed9 100644 --- a/pkg/app/testdata/app_diff_test/bad_selector +++ b/pkg/app/testdata/app_diff_test/bad_selector @@ -1,7 +1,4 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 0 release(s) matching app=test_non_existent found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/fail_on_unselected_need_by_default b/pkg/app/testdata/app_diff_test/fail_on_unselected_need_by_default index cad328fa..e2307a97 100644 --- a/pkg/app/testdata/app_diff_test/fail_on_unselected_need_by_default +++ b/pkg/app/testdata/app_diff_test/fail_on_unselected_need_by_default @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test/include-needs b/pkg/app/testdata/app_diff_test/include-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_diff_test/include-needs +++ b/pkg/app/testdata/app_diff_test/include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_direct_need index 388571ef..538e191f 100644 --- a/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -15,4 +13,3 @@ WARNING: release test2 needs disabled, but disabled is not installed due to inst Affected releases are: disabled (incubator/raw) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_transitive_need index d03dc72d..374768b4 100644 --- a/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_diff_test/include-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -17,4 +15,3 @@ WARNING: release test2 needs disabled, but disabled is not installed due to inst Affected releases are: disabled (incubator/raw) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need index 388571ef..538e191f 100644 --- a/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -15,4 +13,3 @@ WARNING: release test2 needs disabled, but disabled is not installed due to inst Affected releases are: disabled (incubator/raw) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need index d03dc72d..374768b4 100644 --- a/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_diff_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -17,4 +15,3 @@ WARNING: release test2 needs disabled, but disabled is not installed due to inst Affected releases are: disabled (incubator/raw) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-transitive-needs b/pkg/app/testdata/app_diff_test/include-transitive-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_diff_test/include-transitive-needs +++ b/pkg/app/testdata/app_diff_test/include-transitive-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_diff_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need index d03dc72d..374768b4 100644 --- a/pkg/app/testdata/app_diff_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_diff_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -17,4 +15,3 @@ WARNING: release test2 needs disabled, but disabled is not installed due to inst Affected releases are: disabled (incubator/raw) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/no-hooks b/pkg/app/testdata/app_diff_test/no-hooks index 31bbdd79..e3290598 100644 --- a/pkg/app/testdata/app_diff_test/no-hooks +++ b/pkg/app/testdata/app_diff_test/no-hooks @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release b/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release index 0911be75..17ce5de9 100644 --- a/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release +++ b/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=a found in helmfile.yaml @@ -8,4 +6,3 @@ GROUP RELEASES 1 default/default/a processing releases in group 1/1: default/default/a -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release_with_reinstall b/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release_with_reinstall index 0911be75..17ce5de9 100644 --- a/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release_with_reinstall +++ b/pkg/app/testdata/app_diff_test/show_diff_on_changed_selected_release_with_reinstall @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=a found in helmfile.yaml @@ -8,4 +6,3 @@ GROUP RELEASES 1 default/default/a processing releases in group 1/1: default/default/a -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/shows_no_diff_on_already_uninstalled_selected_release b/pkg/app/testdata/app_diff_test/shows_no_diff_on_already_uninstalled_selected_release index fba4619f..274f1f57 100644 --- a/pkg/app/testdata/app_diff_test/shows_no_diff_on_already_uninstalled_selected_release +++ b/pkg/app/testdata/app_diff_test/shows_no_diff_on_already_uninstalled_selected_release @@ -1,6 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=a found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test/skip-needs b/pkg/app/testdata/app_diff_test/skip-needs index 31bbdd79..e3290598 100644 --- a/pkg/app/testdata/app_diff_test/skip-needs +++ b/pkg/app/testdata/app_diff_test/skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/bar b/pkg/app/testdata/app_diff_test_1/bar index dbfa489d..b348b37a 100644 --- a/pkg/app/testdata/app_diff_test_1/bar +++ b/pkg/app/testdata/app_diff_test_1/bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/bar_is_disabled b/pkg/app/testdata/app_diff_test_1/bar_is_disabled index d3dd2f42..c28d87bc 100644 --- a/pkg/app/testdata/app_diff_test_1/bar_is_disabled +++ b/pkg/app/testdata/app_diff_test_1/bar_is_disabled @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -15,4 +13,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_bar_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_1/delete_bar_when_bar_needs_foo index f59a4ca9..2e1dadd2 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_bar_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_1/delete_bar_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -12,4 +10,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar index 5ac68f02..f135653d 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml err: release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_include-needs b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_include-needs index 86256542..d0e53b18 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_include-needs +++ b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml @@ -16,4 +14,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_skip-needs b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_skip-needs index f6ef5b87..423dcd31 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_skip-needs +++ b/pkg/app/testdata/app_diff_test_1/delete_bar_when_foo_needs_bar_with_skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_bar_needs_foo index e851c281..e13596c3 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -7,4 +5,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_foo_needs_bar index e851c281..e13596c3 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_and_bar_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -7,4 +5,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo index 2e3a0c9b..80e1e748 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs 2 release(s) found in helmfile.yaml err: release "default//bar" depends on "default//foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default//bar" depends on "default//foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_include-needs b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_include-needs index 69dcf37c..3ba64bfa 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_include-needs +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs 2 release(s) found in helmfile.yaml @@ -16,4 +14,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_skip-needs b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_skip-needs index a338f98b..66b8126d 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_skip-needs +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_when_bar_needs_foo_with_skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/delete_foo_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_1/delete_foo_when_foo_needs_bar index 93154c54..41b61c6b 100644 --- a/pkg/app/testdata/app_diff_test_1/delete_foo_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_1/delete_foo_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -12,4 +10,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/helm3_upgrade_when_ns2_bar_needs_ns1_foo b/pkg/app/testdata/app_diff_test_1/helm3_upgrade_when_ns2_bar_needs_ns1_foo index 0c03ad8f..ce8fe3fe 100644 --- a/pkg/app/testdata/app_diff_test_1/helm3_upgrade_when_ns2_bar_needs_ns1_foo +++ b/pkg/app/testdata/app_diff_test_1/helm3_upgrade_when_ns2_bar_needs_ns1_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/install b/pkg/app/testdata/app_diff_test_1/install index 0467e745..d5457123 100644 --- a/pkg/app/testdata/app_diff_test_1/install +++ b/pkg/app/testdata/app_diff_test_1/install @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -15,4 +13,3 @@ Affected releases are: baz (mychart3) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/non-existent_release_in_needs b/pkg/app/testdata/app_diff_test_1/non-existent_release_in_needs index 993c26fc..82fe7169 100644 --- a/pkg/app/testdata/app_diff_test_1/non-existent_release_in_needs +++ b/pkg/app/testdata/app_diff_test_1/non-existent_release_in_needs @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml err: release(s) "default//foo" depend(s) on an undefined release "default//bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release(s) "default//foo" depend(s) on an undefined release "default//bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? diff --git a/pkg/app/testdata/app_diff_test_1/noop b/pkg/app/testdata/app_diff_test_1/noop index 2a5979ff..fadc03f0 100644 --- a/pkg/app/testdata/app_diff_test_1/noop +++ b/pkg/app/testdata/app_diff_test_1/noop @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -9,4 +7,3 @@ GROUP RELEASES processing releases in group 1/1: default//bar No affected releases -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/smoke b/pkg/app/testdata/app_diff_test_1/smoke index 3f9c0293..796556ee 100644 --- a/pkg/app/testdata/app_diff_test_1/smoke +++ b/pkg/app/testdata/app_diff_test_1/smoke @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 10 release(s) found in helmfile.yaml @@ -27,4 +25,3 @@ Affected releases are: logging (charts/fluent-bit) UPDATED servicemesh (charts/istio) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/unselected_release_in_needs b/pkg/app/testdata/app_diff_test_1/unselected_release_in_needs index 7b439bca..89a961dc 100644 --- a/pkg/app/testdata/app_diff_test_1/unselected_release_in_needs +++ b/pkg/app/testdata/app_diff_test_1/unselected_release_in_needs @@ -1,7 +1,5 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=foo found in helmfile.yaml err: release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default//foo" depends on "default//bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo index fd5abd5a..9f161fc6 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo,_with_ns_override b/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo,_with_ns_override index 2579cfd9..63d12ce0 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo,_with_ns_override +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_bar_needs_foo,_with_ns_override @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar index 0c3a30a8..b9102203 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar,_with_ns_override b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar,_with_ns_override index 5d4b0d82..cc73b8d2 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar,_with_ns_override +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar,_with_ns_override @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar_with_context_override b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar_with_context_override index 093034ef..3aacf1c0 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar_with_context_override +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_foo_needs_bar_with_context_override @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_releaseb_needs_releasea_with_aws_context b/pkg/app/testdata/app_diff_test_1/upgrade_when_releaseb_needs_releasea_with_aws_context index 98f6000d..712edaba 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_releaseb_needs_releasea_with_aws_context +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_releaseb_needs_releasea_with_aws_context @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: releaseA (mychart1) UPDATED releaseB (mychart2) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrade_when_tns1_ns1_foo_needs_tns2_ns2_bar b/pkg/app/testdata/app_diff_test_1/upgrade_when_tns1_ns1_foo_needs_tns2_ns2_bar index dbfa489d..b348b37a 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrade_when_tns1_ns1_foo_needs_tns2_ns2_bar +++ b/pkg/app/testdata/app_diff_test_1/upgrade_when_tns1_ns1_foo_needs_tns2_ns2_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrades_with_bad_selector b/pkg/app/testdata/app_diff_test_1/upgrades_with_bad_selector index 116b3213..253d53d9 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrades_with_bad_selector +++ b/pkg/app/testdata/app_diff_test_1/upgrades_with_bad_selector @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -30,4 +28,3 @@ rendering result of "helmfile.yaml.gotmpl.part.0": merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml.gotmpl -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=false b/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=false index 6f186783..90dd5c2d 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=false +++ b/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=false @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -31,4 +29,4 @@ merged environment: &{default map[] map[] map[]} 2 release(s) matching app=test found in helmfile.yaml.gotmpl err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml.gotmpl": release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=true b/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=true index 6b8bb9f6..1880f86d 100644 --- a/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=true +++ b/pkg/app/testdata/app_diff_test_1/upgrades_with_good_selector_with_--skip-needs=true @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -41,4 +39,3 @@ Affected releases are: external-secrets (incubator/raw) UPDATED my-release (incubator/raw) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/bar b/pkg/app/testdata/app_diff_test_2/bar index 265b7cf7..465f5f54 100644 --- a/pkg/app/testdata/app_diff_test_2/bar +++ b/pkg/app/testdata/app_diff_test_2/bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_bar_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_2/delete_bar_when_bar_needs_foo index 63caeadb..1f7d1f93 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_bar_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_2/delete_bar_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -12,4 +10,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar index e23a0c61..15990558 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml err: release "foo" depends on "bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "foo" depends on "bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_include-needs b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_include-needs index ae471a8f..0df4dc20 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_include-needs +++ b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml @@ -16,4 +14,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_skip-needs b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_skip-needs index 57ee0225..a6718797 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_skip-needs +++ b/pkg/app/testdata/app_diff_test_2/delete_bar_when_foo_needs_bar_with_skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_bar_needs_foo index e851c281..e13596c3 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -7,4 +5,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_foo_needs_bar index e851c281..e13596c3 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_2/delete_foo_and_bar_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -7,4 +5,3 @@ Affected releases are: bar (mychart2) DELETED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/delete_foo_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_2/delete_foo_when_bar_needs_foo index 39484b75..313fa284 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_foo_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_2/delete_foo_when_bar_needs_foo @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs 2 release(s) found in helmfile.yaml err: release "bar" depends on "foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "bar" depends on "foo" which does not match the selectors. Please add a selector like "--selector name=foo", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_2/delete_foo_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_2/delete_foo_when_foo_needs_bar index 3ff7fa24..dddea730 100644 --- a/pkg/app/testdata/app_diff_test_2/delete_foo_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_2/delete_foo_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -12,4 +10,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) DELETED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/foo b/pkg/app/testdata/app_diff_test_2/foo index fdcc0229..9db6279e 100644 --- a/pkg/app/testdata/app_diff_test_2/foo +++ b/pkg/app/testdata/app_diff_test_2/foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/helm3_upgrade_when_ns2_bar_needs_ns1_foo b/pkg/app/testdata/app_diff_test_2/helm3_upgrade_when_ns2_bar_needs_ns1_foo index fdcc0229..9db6279e 100644 --- a/pkg/app/testdata/app_diff_test_2/helm3_upgrade_when_ns2_bar_needs_ns1_foo +++ b/pkg/app/testdata/app_diff_test_2/helm3_upgrade_when_ns2_bar_needs_ns1_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/install b/pkg/app/testdata/app_diff_test_2/install index 8bdcb023..5e7a214b 100644 --- a/pkg/app/testdata/app_diff_test_2/install +++ b/pkg/app/testdata/app_diff_test_2/install @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -15,4 +13,3 @@ Affected releases are: baz (mychart3) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/non-existent_release_in_needs b/pkg/app/testdata/app_diff_test_2/non-existent_release_in_needs index 6deb4a86..0692c704 100644 --- a/pkg/app/testdata/app_diff_test_2/non-existent_release_in_needs +++ b/pkg/app/testdata/app_diff_test_2/non-existent_release_in_needs @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml err: release(s) "foo" depend(s) on an undefined release "bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release(s) "foo" depend(s) on an undefined release "bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? diff --git a/pkg/app/testdata/app_diff_test_2/noop b/pkg/app/testdata/app_diff_test_2/noop index d2f5bfe3..937ee995 100644 --- a/pkg/app/testdata/app_diff_test_2/noop +++ b/pkg/app/testdata/app_diff_test_2/noop @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -9,4 +7,3 @@ GROUP RELEASES processing releases in group 1/1: bar No affected releases -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/smoke b/pkg/app/testdata/app_diff_test_2/smoke index fa90407b..c2fc529f 100644 --- a/pkg/app/testdata/app_diff_test_2/smoke +++ b/pkg/app/testdata/app_diff_test_2/smoke @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 10 release(s) found in helmfile.yaml @@ -27,4 +25,3 @@ Affected releases are: logging (charts/fluent-bit) UPDATED servicemesh (charts/istio) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo b/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo index 37604ab3..552228ba 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo +++ b/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo,_with_ns_override b/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo,_with_ns_override index 79d073ad..66d7593e 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo,_with_ns_override +++ b/pkg/app/testdata/app_diff_test_2/upgrade_when_bar_needs_foo,_with_ns_override @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar b/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar index 2fd4a74f..0ea590fc 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar +++ b/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar,_with_ns_override b/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar,_with_ns_override index eddde355..9a041c16 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar,_with_ns_override +++ b/pkg/app/testdata/app_diff_test_2/upgrade_when_foo_needs_bar,_with_ns_override @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ Affected releases are: bar (mychart2) UPDATED foo (mychart1) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrades_with_bad_selector b/pkg/app/testdata/app_diff_test_2/upgrades_with_bad_selector index 116b3213..253d53d9 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrades_with_bad_selector +++ b/pkg/app/testdata/app_diff_test_2/upgrades_with_bad_selector @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -30,4 +28,3 @@ rendering result of "helmfile.yaml.gotmpl.part.0": merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml.gotmpl -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=false b/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=false index 73f4bec3..2935ed5b 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=false +++ b/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=false @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -31,4 +29,4 @@ merged environment: &{default map[] map[] map[]} 2 release(s) matching app=test found in helmfile.yaml.gotmpl err: release "default/external-secrets" depends on "kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml.gotmpl": release "default/external-secrets" depends on "kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=true b/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=true index 022fb82d..0bf99ba2 100644 --- a/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=true +++ b/pkg/app/testdata/app_diff_test_2/upgrades_with_good_selector_with_--skip-needs=true @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -41,4 +39,3 @@ Affected releases are: external-secrets (incubator/raw) UPDATED my-release (incubator/raw) UPDATED -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/bad_selector b/pkg/app/testdata/app_lint_test/bad_selector index a445b1d8..867d0ed9 100644 --- a/pkg/app/testdata/app_lint_test/bad_selector +++ b/pkg/app/testdata/app_lint_test/bad_selector @@ -1,7 +1,4 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 0 release(s) matching app=test_non_existent found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/fail_on_unselected_need_by_default b/pkg/app/testdata/app_lint_test/fail_on_unselected_need_by_default index cad328fa..e2307a97 100644 --- a/pkg/app/testdata/app_lint_test/fail_on_unselected_need_by_default +++ b/pkg/app/testdata/app_lint_test/fail_on_unselected_need_by_default @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_lint_test/include-needs b/pkg/app/testdata/app_lint_test/include-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_lint_test/include-needs +++ b/pkg/app/testdata/app_lint_test/include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_direct_need index fb9b47eb..3c08554b 100644 --- a/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/kube-system/disabled processing releases in group 2/2: default//test2 -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_transitive_need index 99b52cd7..8f55648a 100644 --- a/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_lint_test/include-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -13,4 +11,3 @@ GROUP RELEASES processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need index fb9b47eb..3c08554b 100644 --- a/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/kube-system/disabled processing releases in group 2/2: default//test2 -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need index 99b52cd7..8f55648a 100644 --- a/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_lint_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -13,4 +11,3 @@ GROUP RELEASES processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-transitive-needs b/pkg/app/testdata/app_lint_test/include-transitive-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_lint_test/include-transitive-needs +++ b/pkg/app/testdata/app_lint_test/include-transitive-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_lint_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need index 99b52cd7..8f55648a 100644 --- a/pkg/app/testdata/app_lint_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_lint_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -13,4 +11,3 @@ GROUP RELEASES processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_lint_test/skip-needs b/pkg/app/testdata/app_lint_test/skip-needs index 31bbdd79..e3290598 100644 --- a/pkg/app/testdata/app_lint_test/skip-needs +++ b/pkg/app/testdata/app_lint_test/skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/bad_selector b/pkg/app/testdata/app_template_test/bad_selector index a445b1d8..867d0ed9 100644 --- a/pkg/app/testdata/app_template_test/bad_selector +++ b/pkg/app/testdata/app_template_test/bad_selector @@ -1,7 +1,4 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 0 release(s) matching app=test_non_existent found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/fail_on_unselected_need_by_default b/pkg/app/testdata/app_template_test/fail_on_unselected_need_by_default index cad328fa..e2307a97 100644 --- a/pkg/app/testdata/app_template_test/fail_on_unselected_need_by_default +++ b/pkg/app/testdata/app_template_test/fail_on_unselected_need_by_default @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/app_template_test/include-needs b/pkg/app/testdata/app_template_test/include-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_template_test/include-needs +++ b/pkg/app/testdata/app_template_test/include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_direct_need index 520a55de..0b468ae0 100644 --- a/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -12,4 +10,3 @@ GROUP RELEASES processing releases in group 1/2: default/kube-system/disabled processing releases in group 2/2: default//test2 WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_transitive_need index 69858565..3bb8007e 100644 --- a/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_template_test/include-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -14,4 +12,3 @@ processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need b/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need index 520a55de..0b468ae0 100644 --- a/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need +++ b/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_direct_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test2 found in helmfile.yaml @@ -12,4 +10,3 @@ GROUP RELEASES processing releases in group 1/2: default/kube-system/disabled processing releases in group 2/2: default//test2 WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need index 69858565..3bb8007e 100644 --- a/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_template_test/include-needs_with_include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -14,4 +12,3 @@ processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-transitive-needs b/pkg/app/testdata/app_template_test/include-transitive-needs index e235f4b9..2e043346 100644 --- a/pkg/app/testdata/app_template_test/include-transitive-needs +++ b/pkg/app/testdata/app_template_test/include-transitive-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -15,4 +13,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need b/pkg/app/testdata/app_template_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need index 69858565..3bb8007e 100644 --- a/pkg/app/testdata/app_template_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need +++ b/pkg/app/testdata/app_template_test/include-transitive-needs_should_not_fail_on_disabled_transitive_need @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=test3 found in helmfile.yaml @@ -14,4 +12,3 @@ processing releases in group 1/3: default/kube-system/disabled processing releases in group 2/3: default//test2 processing releases in group 3/3: default//test3 WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/no-hooks b/pkg/app/testdata/app_template_test/no-hooks index 31bbdd79..e3290598 100644 --- a/pkg/app/testdata/app_template_test/no-hooks +++ b/pkg/app/testdata/app_template_test/no-hooks @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/show-only b/pkg/app/testdata/app_template_test/show-only index 0e789742..df73ab60 100644 --- a/pkg/app/testdata/app_template_test/show-only +++ b/pkg/app/testdata/app_template_test/show-only @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 1 release(s) matching name=logging found in helmfile.yaml @@ -9,4 +7,3 @@ GROUP RELEASES 1 default/kube-system/logging processing releases in group 1/1: default/kube-system/logging -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_template_test/skip-needs b/pkg/app/testdata/app_template_test/skip-needs index 31bbdd79..e3290598 100644 --- a/pkg/app/testdata/app_template_test/skip-needs +++ b/pkg/app/testdata/app_template_test/skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs 2 release(s) matching app=test found in helmfile.yaml @@ -11,4 +9,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/bad_selector b/pkg/app/testdata/app_unittest_test/bad_selector index 56247803..51324757 100644 --- a/pkg/app/testdata/app_unittest_test/bad_selector +++ b/pkg/app/testdata/app_unittest_test/bad_selector @@ -1,6 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/include-needs b/pkg/app/testdata/app_unittest_test/include-needs index 8a7e8f63..f7f03251 100644 --- a/pkg/app/testdata/app_unittest_test/include-needs +++ b/pkg/app/testdata/app_unittest_test/include-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) matching app=test found in helmfile.yaml @@ -14,4 +12,3 @@ processing releases in group 1/4: default/kube-system/logging processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/release_without_unittests_is_skipped b/pkg/app/testdata/app_unittest_test/release_without_unittests_is_skipped index 150c9b0a..8a7c0137 100644 --- a/pkg/app/testdata/app_unittest_test/release_without_unittests_is_skipped +++ b/pkg/app/testdata/app_unittest_test/release_without_unittests_is_skipped @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=no-tests found in helmfile.yaml @@ -8,4 +6,3 @@ GROUP RELEASES 1 default/default/no-tests processing releases in group 1/1: default/default/no-tests -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/skip-needs b/pkg/app/testdata/app_unittest_test/skip-needs index d127107d..77c8522c 100644 --- a/pkg/app/testdata/app_unittest_test/skip-needs +++ b/pkg/app/testdata/app_unittest_test/skip-needs @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) matching app=test found in helmfile.yaml @@ -10,4 +8,3 @@ GROUP RELEASES processing releases in group 1/2: default/default/external-secrets processing releases in group 2/2: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/unittest_all_releases_with_unittests b/pkg/app/testdata/app_unittest_test/unittest_all_releases_with_unittests index e6c3ffb8..0ff1404a 100644 --- a/pkg/app/testdata/app_unittest_test/unittest_all_releases_with_unittests +++ b/pkg/app/testdata/app_unittest_test/unittest_all_releases_with_unittests @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 5 release(s) found in helmfile.yaml @@ -14,4 +12,3 @@ processing releases in group 1/4: default/kube-system/logging, default/default/n processing releases in group 2/4: default/kube-system/kubernetes-external-secrets processing releases in group 3/4: default/default/external-secrets processing releases in group 4/4: default/default/my-release -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/with_dedicated_flags b/pkg/app/testdata/app_unittest_test/with_dedicated_flags index 6420827b..2d4cef04 100644 --- a/pkg/app/testdata/app_unittest_test/with_dedicated_flags +++ b/pkg/app/testdata/app_unittest_test/with_dedicated_flags @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=logging found in helmfile.yaml @@ -8,4 +6,3 @@ GROUP RELEASES 1 default/kube-system/logging processing releases in group 1/1: default/kube-system/logging -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/app_unittest_test/with_dedicated_flags_helm4 b/pkg/app/testdata/app_unittest_test/with_dedicated_flags_helm4 index 9745fb35..38cc33f4 100644 --- a/pkg/app/testdata/app_unittest_test/with_dedicated_flags_helm4 +++ b/pkg/app/testdata/app_unittest_test/with_dedicated_flags_helm4 @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=logging found in helmfile.yaml @@ -10,4 +8,3 @@ GROUP RELEASES processing releases in group 1/1: default/kube-system/logging warn: --color flag is not supported with Helm 4 due to flag parsing issues, ignoring -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/dag_test/dag_lists_dependencies_in_order b/pkg/app/testdata/dag_test/dag_lists_dependencies_in_order index 4a14bc5a..63bb539e 100644 --- a/pkg/app/testdata/dag_test/dag_lists_dependencies_in_order +++ b/pkg/app/testdata/dag_test/dag_lists_dependencies_in_order @@ -1,6 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} merged environment: &{default map[] map[] map[]} WARNING: release test2 needs disabled, but disabled is not installed due to installed: false. Either mark disabled as installed or remove disabled from test2's needs -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_bar_when_bar_needs_foo/log b/pkg/app/testdata/testapply/delete_bar_when_bar_needs_foo/log index cd1269e7..3adeaeab 100644 --- a/pkg/app/testdata/testapply/delete_bar_when_bar_needs_foo/log +++ b/pkg/app/testdata/testapply/delete_bar_when_bar_needs_foo/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -34,4 +32,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION bar 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_bar_when_foo_needs_bar/log b/pkg/app/testdata/testapply/delete_bar_when_foo_needs_bar/log index 17e7a5ca..c4da6734 100644 --- a/pkg/app/testdata/testapply/delete_bar_when_foo_needs_bar/log +++ b/pkg/app/testdata/testapply/delete_bar_when_foo_needs_bar/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml @@ -37,4 +35,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION bar 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_foo_and_bar_when_bar_needs_foo/log b/pkg/app/testdata/testapply/delete_foo_and_bar_when_bar_needs_foo/log index b8344a59..4cf0f4cb 100644 --- a/pkg/app/testdata/testapply/delete_foo_and_bar_when_bar_needs_foo/log +++ b/pkg/app/testdata/testapply/delete_foo_and_bar_when_bar_needs_foo/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -27,4 +25,3 @@ NAME NAMESPACE DURATION bar 0s foo 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_foo_and_bar_when_foo_needs_bar/log b/pkg/app/testdata/testapply/delete_foo_and_bar_when_foo_needs_bar/log index 1219f507..a15ac481 100644 --- a/pkg/app/testdata/testapply/delete_foo_and_bar_when_foo_needs_bar/log +++ b/pkg/app/testdata/testapply/delete_foo_and_bar_when_foo_needs_bar/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -27,4 +25,3 @@ NAME NAMESPACE DURATION foo 0s bar 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_foo_when_bar_needs_foo/log b/pkg/app/testdata/testapply/delete_foo_when_bar_needs_foo/log index ea1c8210..5b557587 100644 --- a/pkg/app/testdata/testapply/delete_foo_when_bar_needs_foo/log +++ b/pkg/app/testdata/testapply/delete_foo_when_bar_needs_foo/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release bar needs foo, but foo is not installed due to installed: false. Either mark foo as installed or remove foo from bar's needs 2 release(s) found in helmfile.yaml @@ -37,4 +35,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION foo 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/delete_foo_when_foo_needs_bar/log b/pkg/app/testdata/testapply/delete_foo_when_foo_needs_bar/log index d61dc48b..659b1fd2 100644 --- a/pkg/app/testdata/testapply/delete_foo_when_foo_needs_bar/log +++ b/pkg/app/testdata/testapply/delete_foo_when_foo_needs_bar/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -34,4 +32,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION foo 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/duplicate_releases/log b/pkg/app/testdata/testapply/duplicate_releases/log index 8f766889..f989eda4 100644 --- a/pkg/app/testdata/testapply/duplicate_releases/log +++ b/pkg/app/testdata/testapply/duplicate_releases/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} err: found 2 duplicate releases with ID "default//foo" -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": found 2 duplicate releases with ID "default//foo" diff --git a/pkg/app/testdata/testapply/helm-status-check-to-release-existence/log b/pkg/app/testdata/testapply/helm-status-check-to-release-existence/log index ed6cbc3e..59565383 100644 --- a/pkg/app/testdata/testapply/helm-status-check-to-release-existence/log +++ b/pkg/app/testdata/testapply/helm-status-check-to-release-existence/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -9,4 +7,3 @@ GROUP RELEASES 1 default//bar, default//foo_notFound invoking preapply hooks for releases in group 1/1: default//bar, default//foo_notFound -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/install-with-upgrade-with-reinstallifforbidden/log b/pkg/app/testdata/testapply/install-with-upgrade-with-reinstallifforbidden/log index 1aafee9f..19044a1e 100644 --- a/pkg/app/testdata/testapply/install-with-upgrade-with-reinstallifforbidden/log +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-reinstallifforbidden/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -32,4 +30,3 @@ baz stable/mychart3 3.1.0 0s bar stable/mychart2 3.1.0 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install-with-reinstallifforbidden/log b/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install-with-reinstallifforbidden/log index 1aafee9f..19044a1e 100644 --- a/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install-with-reinstallifforbidden/log +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install-with-reinstallifforbidden/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -32,4 +30,3 @@ baz stable/mychart3 3.1.0 0s bar stable/mychart2 3.1.0 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install/log b/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install/log index 56e3c84f..f3becb67 100644 --- a/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install/log +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -30,4 +28,3 @@ baz stable/mychart3 3.1.0 0s bar stable/mychart2 3.1.0 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/install-with-upgrade-with-validation-control/log b/pkg/app/testdata/testapply/install-with-upgrade-with-validation-control/log index 56e3c84f..f3becb67 100644 --- a/pkg/app/testdata/testapply/install-with-upgrade-with-validation-control/log +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-validation-control/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -30,4 +28,3 @@ baz stable/mychart3 3.1.0 0s bar stable/mychart2 3.1.0 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/install/log b/pkg/app/testdata/testapply/install/log index 2c50809d..56bf3acf 100644 --- a/pkg/app/testdata/testapply/install/log +++ b/pkg/app/testdata/testapply/install/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -32,4 +30,3 @@ baz stable/mychart3 0s bar stable/mychart2 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/non-existent_release_in_needs/log b/pkg/app/testdata/testapply/non-existent_release_in_needs/log index e26c9222..285e83ed 100644 --- a/pkg/app/testdata/testapply/non-existent_release_in_needs/log +++ b/pkg/app/testdata/testapply/non-existent_release_in_needs/log @@ -1,8 +1,6 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release foo needs bar, but bar is not installed due to installed: false. Either mark bar as installed or remove bar from foo's needs 2 release(s) found in helmfile.yaml err: release(s) "default//foo" depend(s) on an undefined release "default/ns1/bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release(s) "default//foo" depend(s) on an undefined release "default/ns1/bar". Perhaps you made a typo in "needs" or forgot defining a release named "bar" with appropriate "namespace" and "kubeContext"? diff --git a/pkg/app/testdata/testapply/noop/log b/pkg/app/testdata/testapply/noop/log index 936964d2..661f5a67 100644 --- a/pkg/app/testdata/testapply/noop/log +++ b/pkg/app/testdata/testapply/noop/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -10,4 +8,3 @@ GROUP RELEASES invoking preapply hooks for releases in group 1/2: default//foo invoking preapply hooks for releases in group 2/2: default//bar -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/smoke/log b/pkg/app/testdata/testapply/smoke/log index 110bac0c..2daeed71 100644 --- a/pkg/app/testdata/testapply/smoke/log +++ b/pkg/app/testdata/testapply/smoke/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 10 release(s) found in helmfile.yaml @@ -64,4 +62,3 @@ NAME NAMESPACE DURATION frontend-v1 0s backend-v1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/unselected_release_in_needs/log b/pkg/app/testdata/testapply/unselected_release_in_needs/log index e421b772..639f3c5e 100644 --- a/pkg/app/testdata/testapply/unselected_release_in_needs/log +++ b/pkg/app/testdata/testapply/unselected_release_in_needs/log @@ -1,7 +1,5 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=foo found in helmfile.yaml err: release "default//foo" depends on "default/ns1/bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml": release "default//foo" depends on "default/ns1/bar" which does not match the selectors. Please add a selector like "--selector name=bar", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo,_with_ns_override/log b/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo,_with_ns_override/log index 9b176ead..f8951d02 100644 --- a/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo,_with_ns_override/log +++ b/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo,_with_ns_override/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION foo testNamespace stable/mychart1 0s bar testNamespace stable/mychart2 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo/log b/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo/log index c1d5fb87..46a172b1 100644 --- a/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo/log +++ b/pkg/app/testdata/testapply/upgrade_when_bar_needs_foo/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION foo stable/mychart1 0s bar stable/mychart2 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar,_with_ns_override/log b/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar,_with_ns_override/log index 76f7f447..dc4f817a 100644 --- a/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar,_with_ns_override/log +++ b/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar,_with_ns_override/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION bar testNamespace stable/mychart2 0s foo testNamespace stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar/log b/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar/log index 9e661e00..e4a563ea 100644 --- a/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar/log +++ b/pkg/app/testdata/testapply/upgrade_when_foo_needs_bar/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION bar stable/mychart2 0s foo stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns1/bar_and_ns2/bar_is_disabled/log b/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns1/bar_and_ns2/bar_is_disabled/log index 2f361abc..a8776915 100644 --- a/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns1/bar_and_ns2/bar_is_disabled/log +++ b/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns1/bar_and_ns2/bar_is_disabled/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 3 release(s) found in helmfile.yaml @@ -40,4 +38,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION bar ns2 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns2/bar/log b/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns2/bar/log index 99f2e12b..de9d660f 100644 --- a/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns2/bar/log +++ b/pkg/app/testdata/testapply/upgrade_when_ns1/foo_needs_ns2/bar/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION bar ns2 stable/mychart2 0s foo ns1 stable/mychart1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrade_when_ns2/bar_needs_ns1/foo/log b/pkg/app/testdata/testapply/upgrade_when_ns2/bar_needs_ns1/foo/log index 37169d0b..2a5224ce 100644 --- a/pkg/app/testdata/testapply/upgrade_when_ns2/bar_needs_ns1/foo/log +++ b/pkg/app/testdata/testapply/upgrade_when_ns2/bar_needs_ns1/foo/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 2 release(s) found in helmfile.yaml @@ -29,4 +27,3 @@ NAME NAMESPACE CHART VERSION DURATION foo ns1 stable/mychart1 0s bar ns2 stable/mychart2 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrades_with_bad_selector/log b/pkg/app/testdata/testapply/upgrades_with_bad_selector/log index 116b3213..253d53d9 100644 --- a/pkg/app/testdata/testapply/upgrades_with_bad_selector/log +++ b/pkg/app/testdata/testapply/upgrades_with_bad_selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -30,4 +28,3 @@ rendering result of "helmfile.yaml.gotmpl.part.0": merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml.gotmpl -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=false_--include-needs=true/log b/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=false_--include-needs=true/log index 6f186783..90dd5c2d 100644 --- a/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=false_--include-needs=true/log +++ b/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=false_--include-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -31,4 +29,4 @@ merged environment: &{default map[] map[] map[]} 2 release(s) matching app=test found in helmfile.yaml.gotmpl err: release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies -changing working directory back to "/path/to" +Failed to clean up temporary files generated while processing "helmfile.yaml.gotmpl": release "default/default/external-secrets" depends on "default/kube-system/kubernetes-external-secrets" which does not match the selectors. Please add a selector like "--selector name=kubernetes-external-secrets", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies diff --git a/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=true/log b/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=true/log index a7fb45fa..6af67687 100644 --- a/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=true/log +++ b/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -54,4 +52,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/bad_--selector/log b/pkg/app/testdata/testapply_2/bad_--selector/log index 116b3213..253d53d9 100644 --- a/pkg/app/testdata/testapply_2/bad_--selector/log +++ b/pkg/app/testdata/testapply_2/bad_--selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -30,4 +28,3 @@ rendering result of "helmfile.yaml.gotmpl.part.0": merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml.gotmpl -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/deduplicate_by_--selector/log b/pkg/app/testdata/testapply_2/deduplicate_by_--selector/log index cd4c4597..e545c63c 100644 --- a/pkg/app/testdata/testapply_2/deduplicate_by_--selector/log +++ b/pkg/app/testdata/testapply_2/deduplicate_by_--selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching index=1 found in helmfile.yaml @@ -21,4 +19,3 @@ UPDATED RELEASES: NAME NAMESPACE CHART VERSION DURATION foo default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/include-transitive-needs=true/log b/pkg/app/testdata/testapply_2/include-transitive-needs=true/log index 1575b096..a4405c6a 100644 --- a/pkg/app/testdata/testapply_2/include-transitive-needs=true/log +++ b/pkg/app/testdata/testapply_2/include-transitive-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -56,4 +54,3 @@ serviceC my/chart 3.1.0 0s serviceB my/chart 3.1.0 0s serviceA my/chart 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/select_non_existent_release_with_--allow-no-matching-release/log b/pkg/app/testdata/testapply_2/select_non_existent_release_with_--allow-no-matching-release/log index d2a0e317..42465521 100644 --- a/pkg/app/testdata/testapply_2/select_non_existent_release_with_--allow-no-matching-release/log +++ b/pkg/app/testdata/testapply_2/select_non_existent_release_with_--allow-no-matching-release/log @@ -1,6 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 0 release(s) matching app=foo found in helmfile.yaml -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/select_single_release_from_helmfile_with_two_duplicates/log b/pkg/app/testdata/testapply_2/select_single_release_from_helmfile_with_two_duplicates/log index 24d364d2..7fec524f 100644 --- a/pkg/app/testdata/testapply_2/select_single_release_from_helmfile_with_two_duplicates/log +++ b/pkg/app/testdata/testapply_2/select_single_release_from_helmfile_with_two_duplicates/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=foo found in helmfile.yaml @@ -21,4 +19,3 @@ UPDATED RELEASES: NAME NAMESPACE CHART VERSION DURATION foo default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true/log b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true/log index d05f1897..62337d68 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true/log +++ b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -60,4 +58,3 @@ kubernetes-external-secrets kube-system incubator/raw 3.1.0 0s external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log index 0b207210..77069b44 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log +++ b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -56,4 +54,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log index 4deb8030..1a00d70c 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log +++ b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -71,4 +69,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION kubernetes-external-secrets kube-system 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log index 20de5774..58c602da 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log +++ b/pkg/app/testdata/testapply_2/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -60,4 +58,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=true/log b/pkg/app/testdata/testapply_2/skip-needs=true/log index a7fb45fa..6af67687 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=true/log +++ b/pkg/app/testdata/testapply_2/skip-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -54,4 +52,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_2/skip-needs=true_with_no_diff_on_a_release/log b/pkg/app/testdata/testapply_2/skip-needs=true_with_no_diff_on_a_release/log index f61d5aee..17ac4bf2 100644 --- a/pkg/app/testdata/testapply_2/skip-needs=true_with_no_diff_on_a_release/log +++ b/pkg/app/testdata/testapply_2/skip-needs=true_with_no_diff_on_a_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -50,4 +48,3 @@ UPDATED RELEASES: NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/bad_--selector/log b/pkg/app/testdata/testapply_3/bad_--selector/log index 116b3213..253d53d9 100644 --- a/pkg/app/testdata/testapply_3/bad_--selector/log +++ b/pkg/app/testdata/testapply_3/bad_--selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -30,4 +28,3 @@ rendering result of "helmfile.yaml.gotmpl.part.0": merged environment: &{default map[] map[] map[]} 0 release(s) matching app=test_non_existent found in helmfile.yaml.gotmpl -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true/log b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true/log index 933d3cb2..3706c59d 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true/log +++ b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -60,4 +58,3 @@ kubernetes-external-secrets kube-system incubator/raw 3.1.0 0s external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log index 343f3f58..7f9b3818 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log +++ b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_but_no_diff_on_needed_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -56,4 +54,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log index 9a8acc4d..0144f44a 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log +++ b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_installed_but_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -71,4 +69,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION kubernetes-external-secrets kube-system 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log index aa447253..b67a15d7 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log +++ b/pkg/app/testdata/testapply_3/skip-needs=false_include-needs=true_with_not_installed_and_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -60,4 +58,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=true/log b/pkg/app/testdata/testapply_3/skip-needs=true/log index a33eb14c..a01ac5c9 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=true/log +++ b/pkg/app/testdata/testapply_3/skip-needs=true/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -54,4 +52,3 @@ NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s my-release default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testapply_3/skip-needs=true_with_no_diff_on_a_release/log b/pkg/app/testdata/testapply_3/skip-needs=true_with_no_diff_on_a_release/log index a7fc1a87..47aff850 100644 --- a/pkg/app/testdata/testapply_3/skip-needs=true_with_no_diff_on_a_release/log +++ b/pkg/app/testdata/testapply_3/skip-needs=true_with_no_diff_on_a_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml.gotmpl" in directory "." -changing working directory to "/path/to" rendering starting for "helmfile.yaml.gotmpl.part.0": inherited=&{default map[] map[] map[]}, overrode= rendering result of "helmfile.yaml.gotmpl.part.0": 0: @@ -50,4 +48,3 @@ UPDATED RELEASES: NAME NAMESPACE CHART VERSION DURATION external-secrets default incubator/raw 3.1.0 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdeps/smoke/log b/pkg/app/testdata/testdeps/smoke/log index bd5b43ce..49b2a0dd 100644 --- a/pkg/app/testdata/testdeps/smoke/log +++ b/pkg/app/testdata/testdeps/smoke/log @@ -1,7 +1,4 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} There are no repositories defined in your helmfile.yaml. This means helmfile cannot update your dependencies or create a lock file. See https://github.com/roboll/helmfile/issues/878 for more information. -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy/destroy_installed_but_disabled_release/log b/pkg/app/testdata/testdestroy/destroy_installed_but_disabled_release/log index 0d748903..a7ec424b 100644 --- a/pkg/app/testdata/testdestroy/destroy_installed_but_disabled_release/log +++ b/pkg/app/testdata/testdestroy/destroy_installed_but_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release frontend-v1 needs backend-v1, but backend-v1 is not installed due to installed: false. Either mark backend-v1 as installed or remove backend-v1 from frontend-v1's needs 2 release(s) found in helmfile.yaml @@ -20,4 +18,3 @@ NAME NAMESPACE DURATION frontend-v1 0s backend-v1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy/destroy_only_one_release_with_selector/log b/pkg/app/testdata/testdestroy/destroy_only_one_release_with_selector/log index dc041feb..52a67e23 100644 --- a/pkg/app/testdata/testdestroy/destroy_only_one_release_with_selector/log +++ b/pkg/app/testdata/testdestroy/destroy_only_one_release_with_selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=logging found in helmfile.yaml @@ -14,4 +12,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION logging 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy/helm3/log b/pkg/app/testdata/testdestroy/helm3/log index 0d748903..a7ec424b 100644 --- a/pkg/app/testdata/testdestroy/helm3/log +++ b/pkg/app/testdata/testdestroy/helm3/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release frontend-v1 needs backend-v1, but backend-v1 is not installed due to installed: false. Either mark backend-v1 as installed or remove backend-v1 from frontend-v1's needs 2 release(s) found in helmfile.yaml @@ -20,4 +18,3 @@ NAME NAMESPACE DURATION frontend-v1 0s backend-v1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy/smoke/log b/pkg/app/testdata/testdestroy/smoke/log index fbac957f..d133d3d4 100644 --- a/pkg/app/testdata/testdestroy/smoke/log +++ b/pkg/app/testdata/testdestroy/smoke/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 10 release(s) found in helmfile.yaml @@ -40,4 +38,3 @@ database 0s front-proxy 0s logging 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy_2/destroy_installed_but_disabled_release/log b/pkg/app/testdata/testdestroy_2/destroy_installed_but_disabled_release/log index 53df46fb..9e44026f 100644 --- a/pkg/app/testdata/testdestroy_2/destroy_installed_but_disabled_release/log +++ b/pkg/app/testdata/testdestroy_2/destroy_installed_but_disabled_release/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release frontend-v1 needs backend-v1, but backend-v1 is not installed due to installed: false. Either mark backend-v1 as installed or remove backend-v1 from frontend-v1's needs 2 release(s) found in helmfile.yaml @@ -20,4 +18,3 @@ NAME NAMESPACE DURATION frontend-v1 0s backend-v1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy_2/destroy_only_one_release_with_selector/log b/pkg/app/testdata/testdestroy_2/destroy_only_one_release_with_selector/log index a1be558f..06806aed 100644 --- a/pkg/app/testdata/testdestroy_2/destroy_only_one_release_with_selector/log +++ b/pkg/app/testdata/testdestroy_2/destroy_only_one_release_with_selector/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 1 release(s) matching name=logging found in helmfile.yaml @@ -14,4 +12,3 @@ DELETED RELEASES: NAME NAMESPACE DURATION logging 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy_2/helm3/log b/pkg/app/testdata/testdestroy_2/helm3/log index 53df46fb..9e44026f 100644 --- a/pkg/app/testdata/testdestroy_2/helm3/log +++ b/pkg/app/testdata/testdestroy_2/helm3/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} WARNING: release frontend-v1 needs backend-v1, but backend-v1 is not installed due to installed: false. Either mark backend-v1 as installed or remove backend-v1 from frontend-v1's needs 2 release(s) found in helmfile.yaml @@ -20,4 +18,3 @@ NAME NAMESPACE DURATION frontend-v1 0s backend-v1 0s -changing working directory back to "/path/to" diff --git a/pkg/app/testdata/testdestroy_2/smoke/log b/pkg/app/testdata/testdestroy_2/smoke/log index 74e6e182..a317059f 100644 --- a/pkg/app/testdata/testdestroy_2/smoke/log +++ b/pkg/app/testdata/testdestroy_2/smoke/log @@ -1,5 +1,3 @@ -processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" merged environment: &{default map[] map[] map[]} 10 release(s) found in helmfile.yaml @@ -40,4 +38,3 @@ database 0s front-proxy 0s logging 0s -changing working directory back to "/path/to" diff --git a/pkg/state/chart_dependency.go b/pkg/state/chart_dependency.go index 3e40bbc9..f8ee0de3 100644 --- a/pkg/state/chart_dependency.go +++ b/pkg/state/chart_dependency.go @@ -136,7 +136,15 @@ func (st *HelmState) mergeLockedDependencies() (*HelmState, error) { return st, nil } - depMan := NewChartDependencyManager(filename, st.logger, st.LockFile) + lockFile := st.LockFile + // When basePath is set (e.g. when loaded with baseDir instead of os.Chdir), + // resolve the lock file path relative to basePath so it can be found + // without changing the working directory. + if lockFile != "" && st.basePath != "" && !filepath.IsAbs(lockFile) { + lockFile = filepath.Join(st.basePath, lockFile) + } + + depMan := NewChartDependencyManager(filename, st.logger, lockFile) if st.fs.ReadFile != nil { depMan.readFile = st.fs.ReadFile @@ -249,7 +257,12 @@ func getUnresolvedDependenciess(st *HelmState) (string, *UnresolvedDependencies) } func updateDependencies(st *HelmState, shell helmexec.DependencyUpdater, unresolved *UnresolvedDependencies, filename, wd string) (*HelmState, error) { - depMan := NewChartDependencyManager(filename, st.logger, st.LockFile) + lockFile := st.LockFile + if lockFile != "" && st.basePath != "" && !filepath.IsAbs(lockFile) { + lockFile = filepath.Join(st.basePath, lockFile) + } + + depMan := NewChartDependencyManager(filename, st.logger, lockFile) _, err := depMan.Update(shell, wd, unresolved) if err != nil { diff --git a/pkg/state/state.go b/pkg/state/state.go index 1c1d61e8..212ce22e 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -1059,7 +1059,12 @@ func (st *HelmState) SyncReleases(affectedReleases *AffectedReleases, helm helme for prep := range jobQueue { release := prep.release flags := prep.flags - chart := normalizeChart(st.basePath, release.ChartPathOrName()) + // Use ChartPath directly if already set (normalized during chart preparation), + // otherwise normalize the original chart name. + chart := release.ChartPathOrName() + if release.ChartPath == "" { + chart = normalizeChart(st.basePath, chart) + } var relErr *ReleaseError context := st.createHelmContext(release, workerIndex) @@ -2672,9 +2677,16 @@ func (st *HelmState) DiffReleases(helm helmexec.Interface, additionalValues []st releaseSuppressDiff = true } + // Use ChartPath directly if already set (normalized during chart preparation), + // otherwise normalize the original chart name. + chartPath := release.ChartPathOrName() + if release.ChartPath == "" { + chartPath = normalizeChart(st.basePath, chartPath) + } + if prep.upgradeDueToSkippedDiff { results <- diffResult{release, &ReleaseError{ReleaseSpec: release, err: nil, Code: HelmDiffExitCodeChanged}, buf} - } else if err := helm.DiffRelease(st.createHelmContextWithWriter(release, buf), release.Name, normalizeChart(st.basePath, release.ChartPathOrName()), release.Namespace, releaseSuppressDiff, flags...); err != nil { + } else if err := helm.DiffRelease(st.createHelmContextWithWriter(release, buf), release.Name, chartPath, release.Namespace, releaseSuppressDiff, flags...); err != nil { switch e := err.(type) { case helmexec.ExitError: // Propagate any non-zero exit status from the external command like `helm` that is failed under the hood @@ -5201,6 +5213,11 @@ func (st *HelmState) FullFilePath() (string, error) { if st.fs != nil { wd, err = st.fs.Getwd() } + // When FilePath already contains basePath as a prefix (e.g. when loaded + // with a baseDir), avoid double-counting basePath in the result. + if st.basePath != "" && strings.HasPrefix(st.FilePath, st.basePath+string(filepath.Separator)) { + return filepath.Join(wd, st.FilePath), err + } return filepath.Join(wd, st.basePath, st.FilePath), err } diff --git a/pkg/state/state_test.go b/pkg/state/state_test.go index 37dcd128..21e51643 100644 --- a/pkg/state/state_test.go +++ b/pkg/state/state_test.go @@ -2533,7 +2533,7 @@ func TestHelmState_ResolveDeps_NoLockFile_WithCustomLockFile(t *testing.T) { logger: logger, fs: &filesystem.FileSystem{ ReadFile: func(f string) ([]byte, error) { - if f != "custom-lock-file" { + if f != filepath.Join("/src", "custom-lock-file") { return nil, fmt.Errorf("stub: unexpected file: %s", f) } return nil, os.ErrNotExist diff --git a/pkg/state/storage.go b/pkg/state/storage.go index 84ebd8c4..121b4803 100644 --- a/pkg/state/storage.go +++ b/pkg/state/storage.go @@ -134,9 +134,14 @@ func (st *Storage) normalizePath(path string) string { u, _ := url.Parse(path) if u != nil && (u.Scheme != "" || filepath.IsAbs(path)) { return path - } else { - return st.JoinBase(path) } + // Avoid double-prefixing when the path already starts with basePath. + // This can happen when normalizePath is called multiple times on the same path + // (e.g. once in generateVanillaValuesFiles and again in resolveFile/ExpandPaths). + if st.basePath != "" && st.basePath != "." && strings.HasPrefix(path, st.basePath+string(filepath.Separator)) { + return path + } + return st.JoinBase(path) } // JoinBase returns an absolute path in the form basePath/relative diff --git a/pkg/testhelper/testfs.go b/pkg/testhelper/testfs.go index 47091dbb..decb472a 100644 --- a/pkg/testhelper/testfs.go +++ b/pkg/testhelper/testfs.go @@ -19,6 +19,7 @@ type TestFs struct { GlobFixtures map[string][]string DeleteFile func(string) error + ChdirCalls int mu sync.Mutex fileReaderCalls int successfulReads []string @@ -160,6 +161,9 @@ func (f *TestFs) Getwd() (string, error) { } func (f *TestFs) Chdir(dir string) error { + f.mu.Lock() + f.ChdirCalls++ + f.mu.Unlock() if _, ok := f.dirs[dir]; ok { f.Cwd = dir return nil diff --git a/test/integration/run.sh b/test/integration/run.sh index ddcd58f6..5fa5e626 100755 --- a/test/integration/run.sh +++ b/test/integration/run.sh @@ -130,6 +130,7 @@ ${kubectl} create namespace ${test_ns} || fail "Could not create namespace ${tes . ${dir}/test-cases/issue-2355.sh . ${dir}/test-cases/issue-2103.sh . ${dir}/test-cases/unittest.sh +. ${dir}/test-cases/issue-2409-sequential-kubecontext.sh # ALL DONE ----------------------------------------------------------------------------------------------------------- diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext.sh b/test/integration/test-cases/issue-2409-sequential-kubecontext.sh new file mode 100644 index 00000000..191d4608 --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext.sh @@ -0,0 +1,42 @@ +# Issue #2409: Test that --sequential-helmfiles works with kubeContext from bases +# https://github.com/helmfile/helmfile/issues/2409 +# +# This test replicates the exact user scenario: +# - Multiple files in helmfile.d/ +# - bases: with relative paths (../bases/) for environments and defaults +# - Environment values set kubeContext (resolved via .Environment.Values.kubeContext) +# - Running diff against the minikube cluster to exercise kubeContext resolution +# +# Before the fix, os.Chdir() in the sequential path could break relative path +# resolution, causing kubeContext or KUBECONFIG to not resolve correctly. + +issue_2409_input_dir="${cases_dir}/issue-2409-sequential-kubecontext/input/helmfile.d" +issue_2409_tmp=$(mktemp -d) + +test_start "issue 2409 sequential helmfiles with kubeContext" + +# Run diff with --sequential-helmfiles to verify kubeContext resolves correctly +# against the minikube cluster. This would fail with "context does not exist" +# if path resolution were broken by os.Chdir(). +info "Running helmfile --sequential-helmfiles diff with kubeContext from bases" +bash -c "${helmfile} --sequential-helmfiles -f ${issue_2409_input_dir} diff --detailed-exitcode; code="'$?'"; [ "'${code}'" -eq 2 ]" \ + || fail "\"helmfile --sequential-helmfiles diff\" should exit 2 (changes detected)" + +# Also verify template output contains both releases and the relative values file +info "Running helmfile --sequential-helmfiles template" +${helmfile} --sequential-helmfiles -f ${issue_2409_input_dir} template \ + > ${issue_2409_tmp}/sequential.log 2>&1 \ + || fail "\"helmfile --sequential-helmfiles template\" shouldn't fail" + +grep -q "test-release-2409" ${issue_2409_tmp}/sequential.log \ + || fail "release test-release-2409 from 01-app.yaml.gotmpl should be in output" + +grep -q "test-infra-2409" ${issue_2409_tmp}/sequential.log \ + || fail "release test-infra-2409 from 02-infra.yaml.gotmpl should be in output" + +grep -q "common-values-2409" ${issue_2409_tmp}/sequential.log \ + || fail "relative values file values/common.yaml should be resolved in sequential mode" + +rm -rf ${issue_2409_tmp} + +test_pass "issue 2409 sequential helmfiles with kubeContext" diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/defaults.yaml.gotmpl b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/defaults.yaml.gotmpl new file mode 100644 index 00000000..cf05c4f0 --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/defaults.yaml.gotmpl @@ -0,0 +1,2 @@ +helmDefaults: + kubeContext: {{ .Environment.Values.kubeContext }} diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/env-values.yaml b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/env-values.yaml new file mode 100644 index 00000000..42b137d5 --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/env-values.yaml @@ -0,0 +1 @@ +kubeContext: minikube diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/environments.yaml b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/environments.yaml new file mode 100644 index 00000000..51862b27 --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/bases/environments.yaml @@ -0,0 +1,4 @@ +environments: + default: + values: + - ../bases/env-values.yaml diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/01-app.yaml.gotmpl b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/01-app.yaml.gotmpl new file mode 100644 index 00000000..2d37ba3f --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/01-app.yaml.gotmpl @@ -0,0 +1,19 @@ +bases: + - ../bases/environments.yaml +--- +bases: + - ../bases/defaults.yaml.gotmpl +--- +releases: +- name: test-release-2409 + chart: ../../../../charts/raw + values: + - templates: + - | + apiVersion: v1 + kind: ConfigMap + metadata: + name: test-configmap-2409 + namespace: {{ "{{ .Release.Namespace }}" }} + data: + key: value diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/02-infra.yaml.gotmpl b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/02-infra.yaml.gotmpl new file mode 100644 index 00000000..e6e60a8d --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/02-infra.yaml.gotmpl @@ -0,0 +1,11 @@ +bases: + - ../bases/environments.yaml +--- +bases: + - ../bases/defaults.yaml.gotmpl +--- +releases: +- name: test-infra-2409 + chart: ../../../../charts/raw + values: + - values/common.yaml diff --git a/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/values/common.yaml b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/values/common.yaml new file mode 100644 index 00000000..e3e39687 --- /dev/null +++ b/test/integration/test-cases/issue-2409-sequential-kubecontext/input/helmfile.d/values/common.yaml @@ -0,0 +1,9 @@ +templates: +- | + apiVersion: v1 + kind: ConfigMap + metadata: + name: common-values-2409 + namespace: {{ .Release.Namespace }} + data: + source: relative-path-resolved