diff --git a/pkg/app/app_test.go b/pkg/app/app_test.go index 45a428c3..2d867b7a 100644 --- a/pkg/app/app_test.go +++ b/pkg/app/app_test.go @@ -3011,72 +3011,6 @@ baz 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart3-3.1.0 3.1.0 defau }, deleted: []exectest.Release{}, concurrency: 1, - log: `processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" -first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= -first-pass uses: &{default map[] map[]} -first-pass rendering output of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: baz - 3: chart: stable/mychart3 - 4: disableValidationOnInstall: true - 5: - name: foo - 6: chart: stable/mychart1 - 7: disableValidationOnInstall: true - 8: needs: - 9: - bar -10: - name: bar -11: chart: stable/mychart2 -12: disableValidation: true -13: - -first-pass produced: &{default map[] map[]} -first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} -vals: -map[] -defaultVals:[] -second-pass rendering result of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: baz - 3: chart: stable/mychart3 - 4: disableValidationOnInstall: true - 5: - name: foo - 6: chart: stable/mychart1 - 7: disableValidationOnInstall: true - 8: needs: - 9: - bar -10: - name: bar -11: chart: stable/mychart2 -12: disableValidation: true -13: - -merged environment: &{default map[] map[]} -3 release(s) found in helmfile.yaml - -Affected releases are: - bar (stable/mychart2) UPDATED - baz (stable/mychart3) UPDATED - foo (stable/mychart1) UPDATED - -processing 2 groups of releases in this order: -GROUP RELEASES -1 default//baz, default//bar -2 default//foo - -processing releases in group 1/2: default//baz, default//bar -processing releases in group 2/2: default//foo -getting deployed release version failed: Failed to get the version for: mychart1 - -UPDATED RELEASES: -NAME CHART VERSION -baz stable/mychart3 3.1.0 -bar stable/mychart2 3.1.0 -foo stable/mychart1 - -changing working directory back to "/path/to" -`, }, // // install with upgrade and --skip-diff-on-install @@ -3121,72 +3055,6 @@ baz 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart3-3.1.0 3.1.0 defau }, deleted: []exectest.Release{}, concurrency: 1, - log: `processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" -first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= -first-pass uses: &{default map[] map[]} -first-pass rendering output of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: baz - 3: chart: stable/mychart3 - 4: disableValidationOnInstall: true - 5: - name: foo - 6: chart: stable/mychart1 - 7: disableValidationOnInstall: true - 8: needs: - 9: - bar -10: - name: bar -11: chart: stable/mychart2 -12: disableValidation: true -13: - -first-pass produced: &{default map[] map[]} -first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} -vals: -map[] -defaultVals:[] -second-pass rendering result of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: baz - 3: chart: stable/mychart3 - 4: disableValidationOnInstall: true - 5: - name: foo - 6: chart: stable/mychart1 - 7: disableValidationOnInstall: true - 8: needs: - 9: - bar -10: - name: bar -11: chart: stable/mychart2 -12: disableValidation: true -13: - -merged environment: &{default map[] map[]} -3 release(s) found in helmfile.yaml - -Affected releases are: - bar (stable/mychart2) UPDATED - baz (stable/mychart3) UPDATED - foo (stable/mychart1) UPDATED - -processing 2 groups of releases in this order: -GROUP RELEASES -1 default//baz, default//bar -2 default//foo - -processing releases in group 1/2: default//baz, default//bar -processing releases in group 2/2: default//foo -getting deployed release version failed: Failed to get the version for: mychart1 - -UPDATED RELEASES: -NAME CHART VERSION -baz stable/mychart3 3.1.0 -bar stable/mychart2 3.1.0 -foo stable/mychart1 - -changing working directory back to "/path/to" -`, }, // // upgrades @@ -3399,67 +3267,6 @@ bar 4 Fri Nov 1 08:40:07 2019 DEPLOYED mychart2-3.1.0 3.1.0 defau }, // as we check for log output, set concurrency to 1 to avoid non-deterministic test result concurrency: 1, - log: `processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" -first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= -first-pass uses: &{default map[] map[]} -first-pass rendering output of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: bar - 3: chart: stable/mychart2 - 4: namespace: ns2 - 5: tillerNamespace: tns2 - 6: needs: - 7: - tns1/foo - 8: - name: foo - 9: chart: stable/mychart1 -10: namespace: ns1 -11: tillerNamespace: tns1 -12: - -first-pass produced: &{default map[] map[]} -first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} -vals: -map[] -defaultVals:[] -second-pass rendering result of "helmfile.yaml.part.0": - 0: - 1: releases: - 2: - name: bar - 3: chart: stable/mychart2 - 4: namespace: ns2 - 5: tillerNamespace: tns2 - 6: needs: - 7: - tns1/foo - 8: - name: foo - 9: chart: stable/mychart1 -10: namespace: ns1 -11: tillerNamespace: tns1 -12: - -merged environment: &{default map[] map[]} -2 release(s) found in helmfile.yaml - -Affected releases are: - bar (stable/mychart2) UPDATED - foo (stable/mychart1) UPDATED - -processing 2 groups of releases in this order: -GROUP RELEASES -1 default/tns1/foo -2 default/tns2/bar - -processing releases in group 1/2: default/tns1/foo -processing releases in group 2/2: default/tns2/bar - -UPDATED RELEASES: -NAME CHART VERSION -foo stable/mychart1 3.1.0 -bar stable/mychart2 3.1.0 - -changing working directory back to "/path/to" -`, }, // // deletes: deleting all releases in the correct order @@ -3724,89 +3531,6 @@ my-release 4 Fri Nov 1 08:40:07 2019 DEPLOYED raw-3.1.0 3.1.0 def }, // as we check for log output, set concurrency to 1 to avoid non-deterministic test result concurrency: 1, - log: `processing file "helmfile.yaml" in directory "." -changing working directory to "/path/to" -first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= -first-pass uses: &{default map[] map[]} -first-pass rendering output of "helmfile.yaml.part.0": - 0: - 1: - 2: - 3: releases: - 4: - name: kubernetes-external-secrets - 5: chart: incubator/raw - 6: namespace: kube-system - 7: - 8: - name: external-secrets - 9: chart: incubator/raw -10: namespace: default -11: labels: -12: app: test -13: needs: -14: - kube-system/kubernetes-external-secrets -15: -16: - name: my-release -17: chart: incubator/raw -18: namespace: default -19: labels: -20: app: test -21: needs: -22: - default/external-secrets -23: - -first-pass produced: &{default map[] map[]} -first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} -vals: -map[] -defaultVals:[] -second-pass rendering result of "helmfile.yaml.part.0": - 0: - 1: - 2: - 3: releases: - 4: - name: kubernetes-external-secrets - 5: chart: incubator/raw - 6: namespace: kube-system - 7: - 8: - name: external-secrets - 9: chart: incubator/raw -10: namespace: default -11: labels: -12: app: test -13: needs: -14: - kube-system/kubernetes-external-secrets -15: -16: - name: my-release -17: chart: incubator/raw -18: namespace: default -19: labels: -20: app: test -21: needs: -22: - default/external-secrets -23: - -merged environment: &{default map[] map[]} -2 release(s) matching app=test found in helmfile.yaml - -Affected releases are: - external-secrets (incubator/raw) UPDATED - my-release (incubator/raw) UPDATED - -processing 2 groups of releases in this order: -GROUP RELEASES -1 default/default/external-secrets -2 default/default/my-release - -processing releases in group 1/2: default/default/external-secrets -processing releases in group 2/2: default/default/my-release - -UPDATED RELEASES: -NAME CHART VERSION -external-secrets incubator/raw 3.1.0 -my-release incubator/raw 3.1.0 - -changing working directory back to "/path/to" -`, }, { // see https://github.com/roboll/helmfile/issues/919#issuecomment-549831747 diff --git a/pkg/app/testdata/testapply/helm2:_upgrade_when_tns2/bar_needs_tns1/foo/log b/pkg/app/testdata/testapply/helm2:_upgrade_when_tns2/bar_needs_tns1/foo/log new file mode 100644 index 00000000..8009ba64 --- /dev/null +++ b/pkg/app/testdata/testapply/helm2:_upgrade_when_tns2/bar_needs_tns1/foo/log @@ -0,0 +1,67 @@ +processing file "helmfile.yaml" in directory "." +changing working directory to "/path/to" +first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= +first-pass uses: &{default map[] map[]} +first-pass rendering output of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: bar + 3: chart: stable/mychart2 + 4: namespace: ns2 + 5: tillerNamespace: tns2 + 6: needs: + 7: - tns1/foo + 8: - name: foo + 9: chart: stable/mychart1 +10: namespace: ns1 +11: tillerNamespace: tns1 +12: + +first-pass produced: &{default map[] map[]} +first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} +vals: +map[] +defaultVals:[] +second-pass rendering result of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: bar + 3: chart: stable/mychart2 + 4: namespace: ns2 + 5: tillerNamespace: tns2 + 6: needs: + 7: - tns1/foo + 8: - name: foo + 9: chart: stable/mychart1 +10: namespace: ns1 +11: tillerNamespace: tns1 +12: + +merged environment: &{default map[] map[]} +2 release(s) found in helmfile.yaml + +Affected releases are: + bar (stable/mychart2) UPDATED + foo (stable/mychart1) UPDATED + +invoking preapply hooks for 2 groups of releases in this order: +GROUP RELEASES +1 default/tns2/bar +2 default/tns1/foo + +invoking preapply hooks for releases in group 1/2: default/tns2/bar +invoking preapply hooks for releases in group 2/2: default/tns1/foo +processing 2 groups of releases in this order: +GROUP RELEASES +1 default/tns1/foo +2 default/tns2/bar + +processing releases in group 1/2: default/tns1/foo +processing releases in group 2/2: default/tns2/bar + +UPDATED RELEASES: +NAME CHART VERSION +foo stable/mychart1 3.1.0 +bar stable/mychart2 3.1.0 + +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 new file mode 100644 index 00000000..63c2b747 --- /dev/null +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-skip-diff-on-install/log @@ -0,0 +1,72 @@ +processing file "helmfile.yaml" in directory "." +changing working directory to "/path/to" +first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= +first-pass uses: &{default map[] map[]} +first-pass rendering output of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: baz + 3: chart: stable/mychart3 + 4: disableValidationOnInstall: true + 5: - name: foo + 6: chart: stable/mychart1 + 7: disableValidationOnInstall: true + 8: needs: + 9: - bar +10: - name: bar +11: chart: stable/mychart2 +12: disableValidation: true +13: + +first-pass produced: &{default map[] map[]} +first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} +vals: +map[] +defaultVals:[] +second-pass rendering result of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: baz + 3: chart: stable/mychart3 + 4: disableValidationOnInstall: true + 5: - name: foo + 6: chart: stable/mychart1 + 7: disableValidationOnInstall: true + 8: needs: + 9: - bar +10: - name: bar +11: chart: stable/mychart2 +12: disableValidation: true +13: + +merged environment: &{default map[] map[]} +3 release(s) found in helmfile.yaml + +Affected releases are: + bar (stable/mychart2) UPDATED + baz (stable/mychart3) UPDATED + foo (stable/mychart1) UPDATED + +invoking preapply hooks for 2 groups of releases in this order: +GROUP RELEASES +1 default//foo +2 default//baz, default//bar + +invoking preapply hooks for releases in group 1/2: default//foo +invoking preapply hooks for releases in group 2/2: default//baz, default//bar +processing 2 groups of releases in this order: +GROUP RELEASES +1 default//baz, default//bar +2 default//foo + +processing releases in group 1/2: default//baz, default//bar +processing releases in group 2/2: default//foo +getting deployed release version failed: Failed to get the version for: mychart1 + +UPDATED RELEASES: +NAME CHART VERSION +baz stable/mychart3 3.1.0 +bar stable/mychart2 3.1.0 +foo stable/mychart1 + +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 new file mode 100644 index 00000000..63c2b747 --- /dev/null +++ b/pkg/app/testdata/testapply/install-with-upgrade-with-validation-control/log @@ -0,0 +1,72 @@ +processing file "helmfile.yaml" in directory "." +changing working directory to "/path/to" +first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= +first-pass uses: &{default map[] map[]} +first-pass rendering output of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: baz + 3: chart: stable/mychart3 + 4: disableValidationOnInstall: true + 5: - name: foo + 6: chart: stable/mychart1 + 7: disableValidationOnInstall: true + 8: needs: + 9: - bar +10: - name: bar +11: chart: stable/mychart2 +12: disableValidation: true +13: + +first-pass produced: &{default map[] map[]} +first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} +vals: +map[] +defaultVals:[] +second-pass rendering result of "helmfile.yaml.part.0": + 0: + 1: releases: + 2: - name: baz + 3: chart: stable/mychart3 + 4: disableValidationOnInstall: true + 5: - name: foo + 6: chart: stable/mychart1 + 7: disableValidationOnInstall: true + 8: needs: + 9: - bar +10: - name: bar +11: chart: stable/mychart2 +12: disableValidation: true +13: + +merged environment: &{default map[] map[]} +3 release(s) found in helmfile.yaml + +Affected releases are: + bar (stable/mychart2) UPDATED + baz (stable/mychart3) UPDATED + foo (stable/mychart1) UPDATED + +invoking preapply hooks for 2 groups of releases in this order: +GROUP RELEASES +1 default//foo +2 default//baz, default//bar + +invoking preapply hooks for releases in group 1/2: default//foo +invoking preapply hooks for releases in group 2/2: default//baz, default//bar +processing 2 groups of releases in this order: +GROUP RELEASES +1 default//baz, default//bar +2 default//foo + +processing releases in group 1/2: default//baz, default//bar +processing releases in group 2/2: default//foo +getting deployed release version failed: Failed to get the version for: mychart1 + +UPDATED RELEASES: +NAME CHART VERSION +baz stable/mychart3 3.1.0 +bar stable/mychart2 3.1.0 +foo stable/mychart1 + +changing working directory back to "/path/to" 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 new file mode 100644 index 00000000..3ca93c80 --- /dev/null +++ b/pkg/app/testdata/testapply/upgrades_with_good_selector_with_--skip-needs=true/log @@ -0,0 +1,89 @@ +processing file "helmfile.yaml" in directory "." +changing working directory to "/path/to" +first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{default map[] map[]}, overrode= +first-pass uses: &{default map[] map[]} +first-pass rendering output of "helmfile.yaml.part.0": + 0: + 1: + 2: + 3: releases: + 4: - name: kubernetes-external-secrets + 5: chart: incubator/raw + 6: namespace: kube-system + 7: + 8: - name: external-secrets + 9: chart: incubator/raw +10: namespace: default +11: labels: +12: app: test +13: needs: +14: - kube-system/kubernetes-external-secrets +15: +16: - name: my-release +17: chart: incubator/raw +18: namespace: default +19: labels: +20: app: test +21: needs: +22: - default/external-secrets +23: + +first-pass produced: &{default map[] map[]} +first-pass rendering result of "helmfile.yaml.part.0": {default map[] map[]} +vals: +map[] +defaultVals:[] +second-pass rendering result of "helmfile.yaml.part.0": + 0: + 1: + 2: + 3: releases: + 4: - name: kubernetes-external-secrets + 5: chart: incubator/raw + 6: namespace: kube-system + 7: + 8: - name: external-secrets + 9: chart: incubator/raw +10: namespace: default +11: labels: +12: app: test +13: needs: +14: - kube-system/kubernetes-external-secrets +15: +16: - name: my-release +17: chart: incubator/raw +18: namespace: default +19: labels: +20: app: test +21: needs: +22: - default/external-secrets +23: + +merged environment: &{default map[] map[]} +2 release(s) matching app=test found in helmfile.yaml + +Affected releases are: + external-secrets (incubator/raw) UPDATED + my-release (incubator/raw) UPDATED + +invoking preapply hooks for 2 groups of releases in this order: +GROUP RELEASES +1 default/default/my-release +2 default/default/external-secrets + +invoking preapply hooks for releases in group 1/2: default/default/my-release +invoking preapply hooks for releases in group 2/2: default/default/external-secrets +processing 2 groups of releases in this order: +GROUP RELEASES +1 default/default/external-secrets +2 default/default/my-release + +processing releases in group 1/2: default/default/external-secrets +processing releases in group 2/2: default/default/my-release + +UPDATED RELEASES: +NAME CHART VERSION +external-secrets incubator/raw 3.1.0 +my-release incubator/raw 3.1.0 + +changing working directory back to "/path/to"