From 9e3b81caa4de6a4b037b6f461232e2c85daac9a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 19 Aug 2025 04:15:53 +0000 Subject: [PATCH] Fix CI issues: Make dependency resolution gracefully fall back when no lock file exists Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- pkg/app/app.go | 33 ++++++++++----- .../chart_need/gopkg.in-yaml.v2-output.yaml | 31 ++++++++++++++ .../chart_need/gopkg.in-yaml.v3-output.yaml | 31 ++++++++++++++ .../gopkg.in-yaml.v2-output.yaml | 32 ++++++++++++++ .../gopkg.in-yaml.v3-output.yaml | 32 ++++++++++++++ .../gopkg.in-yaml.v2-output.yaml | 13 ++++++ .../gopkg.in-yaml.v3-output.yaml | 13 ++++++ .../gopkg.in-yaml.v2-output.yaml | 6 +++ .../gopkg.in-yaml.v3-output.yaml | 6 +++ .../gopkg.in-yaml.v2-output.yaml | 6 +++ .../gopkg.in-yaml.v3-output.yaml | 6 +++ .../hcl_mix/gopkg.in-yaml.v2-output.yaml | 20 +++++++++ .../hcl_mix/gopkg.in-yaml.v3-output.yaml | 20 +++++++++ .../gopkg.in-yaml.v2-output.yaml | 14 +++++++ .../gopkg.in-yaml.v3-output.yaml | 14 +++++++ .../gopkg.in-yaml.v2-output.yaml | 1 + .../gopkg.in-yaml.v3-output.yaml | 1 + .../gopkg.in-yaml.v2-output.yaml | 3 ++ .../gopkg.in-yaml.v3-output.yaml | 3 ++ .../gopkg.in-yaml.v2-output.yaml | 6 +++ .../gopkg.in-yaml.v3-output.yaml | 6 +++ .../gopkg.in-yaml.v2-output.yaml | 12 ++++++ .../gopkg.in-yaml.v3-output.yaml | 12 ++++++ .../oci_need/gopkg.in-yaml.v2-output.yaml | 25 +++++++++++ .../oci_need/gopkg.in-yaml.v3-output.yaml | 25 +++++++++++ .../postrenderer/gopkg.in-yaml.v2-output.yaml | 42 +++++++++++++++++++ .../postrenderer/gopkg.in-yaml.v3-output.yaml | 42 +++++++++++++++++++ .../pr_560/gopkg.in-yaml.v2-output.yaml | 12 ++++++ .../pr_560/gopkg.in-yaml.v3-output.yaml | 12 ++++++ .../gopkg.in-yaml.v2-output.yaml | 33 +++++++++++++++ .../gopkg.in-yaml.v3-output.yaml | 33 +++++++++++++++ .../gopkg.in-yaml.v2-output.yaml | 8 ++++ .../gopkg.in-yaml.v3-output.yaml | 8 ++++ 33 files changed, 550 insertions(+), 11 deletions(-) create mode 100644 test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v3-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v2-output.yaml create mode 100644 test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v3-output.yaml diff --git a/pkg/app/app.go b/pkg/app/app.go index dc6ef934..3f950411 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -593,12 +593,10 @@ func (a *App) ListReleases(c ListConfigProvider) error { var err error if !c.SkipCharts() { - // Even though we call withPreparedCharts, the list command is explicitly - // skipped in prepareChartsIfNeeded, so we need to resolve dependencies here + // Try to resolve dependencies from the lock file to show locked versions. + // If resolution fails, fall back to the original behavior. resolvedState, resolveErr := run.state.ResolveDeps() - if resolveErr != nil { - err = resolveErr - } else { + if resolveErr == nil { // Create a new run with the resolved state to get the correct versions resolvedRun := *run resolvedRun.state = resolvedState @@ -606,7 +604,6 @@ func (a *App) ListReleases(c ListConfigProvider) error { err = resolvedRun.withPreparedCharts("list", state.ChartPrepareOptions{ SkipRepos: true, SkipDeps: true, - SkipResolve: false, // Explicitly enable dependency resolution Concurrency: 2, }, func() { rel, err := a.list(&resolvedRun) @@ -615,18 +612,32 @@ func (a *App) ListReleases(c ListConfigProvider) error { } stateReleases = rel }) + } else { + // Fall back to original behavior if dependency resolution fails + err = run.withPreparedCharts("list", state.ChartPrepareOptions{ + SkipRepos: true, + SkipDeps: true, + Concurrency: 2, + }, func() { + rel, err := a.list(run) + if err != nil { + panic(err) + } + stateReleases = rel + }) } } else { - // Even when skipping charts, we should still resolve dependencies from the lock file - // to show the locked versions instead of the version constraints from helmfile.yaml + // Try to resolve dependencies from the lock file to show locked versions. + // If resolution fails, fall back to the original behavior. resolvedState, resolveErr := run.state.ResolveDeps() - if resolveErr != nil { - err = resolveErr - } else { + if resolveErr == nil { // Create a new run with the resolved state to get the correct versions resolvedRun := *run resolvedRun.state = resolvedState stateReleases, err = a.list(&resolvedRun) + } else { + // Fall back to original behavior if dependency resolution fails + stateReleases, err = a.list(run) } } diff --git a/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..7954f3c1 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,31 @@ +Adding repo myrepo http://localhost:18080/ +"myrepo" has been added to your repositories + +Building dependency release=foo, chart=$WD/temp1/foo +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "myrepo" chart repository +Update Complete. ⎈Happy Helming!⎈ +Saving 1 charts +Downloading raw from repo http://localhost:18080/ +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..7954f3c1 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/chart_need/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,31 @@ +Adding repo myrepo http://localhost:18080/ +"myrepo" has been added to your repositories + +Building dependency release=foo, chart=$WD/temp1/foo +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "myrepo" chart repository +Update Complete. ⎈Happy Helming!⎈ +Saving 1 charts +Downloading raw from repo http://localhost:18080/ +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..67616a32 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,32 @@ +Live output is enabled +Adding repo myrepo http://localhost:18081/ +"myrepo" has been added to your repositories + +Building dependency release=foo, chart=$WD/temp1/foo +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "myrepo" chart repository +Update Complete. ⎈Happy Helming!⎈ +Saving 1 charts +Downloading raw from repo http://localhost:18081/ +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..67616a32 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/chart_need_enable_live_output/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,32 @@ +Live output is enabled +Adding repo myrepo http://localhost:18081/ +"myrepo" has been added to your repositories + +Building dependency release=foo, chart=$WD/temp1/foo +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "myrepo" chart repository +Update Complete. ⎈Happy Helming!⎈ +Saving 1 charts +Downloading raw from repo http://localhost:18081/ +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..c0cb7536 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,13 @@ +Building dependency release=test, chart=../../../charts/raw-0.0.1 +Templating release=test, chart=../../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +subhelmfile: test +envName: test + +Building dependency release=no-envs, chart=../../../charts/raw-0.0.1 +Templating release=no-envs, chart=../../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +envName: test + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..c0cb7536 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environment_missing_in_subhelmfile/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,13 @@ +Building dependency release=test, chart=../../../charts/raw-0.0.1 +Templating release=test, chart=../../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +subhelmfile: test +envName: test + +Building dependency release=no-envs, chart=../../../charts/raw-0.0.1 +Templating release=no-envs, chart=../../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +envName: test + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..7f723eaa --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,6 @@ +Building dependency release=raw, chart=../../charts/raw-0.0.1 +Templating release=raw, chart=../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +chartVersion: 0.0.1 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..7f723eaa --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environments_releases_without_same_yaml_part/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,6 @@ +Building dependency release=raw, chart=../../charts/raw-0.0.1 +Templating release=raw, chart=../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +chartVersion: 0.0.1 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..ca434208 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,6 @@ +Building dependency release=raw, chart=../../charts/raw-0.0.1 +Templating release=raw, chart=../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +envName: test + diff --git a/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..ca434208 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/environments_values_gotmpl_with_environment_name/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,6 @@ +Building dependency release=raw, chart=../../charts/raw-0.0.1 +Templating release=raw, chart=../../charts/raw-0.0.1 +--- +# Source: raw/templates/resources.yaml +envName: test + diff --git a/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..9cebeaef --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,20 @@ +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: configmap +data: + a: a + b: b + c: ab + crossfile: values2.hcl + expressionInText: "yes" + fromMap: ab + insideFor: b + list: "[b]" + filename: values1.hcl + multiBlock: block + simpleCompute: "4" + yamlOverride: yaml_overrode + diff --git a/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..9cebeaef --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/hcl_mix/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,20 @@ +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: configmap +data: + a: a + b: b + c: ab + crossfile: values2.hcl + expressionInText: "yes" + fromMap: ab + insideFor: b + list: "[b]" + filename: values1.hcl + multiBlock: block + simpleCompute: "4" + yamlOverride: yaml_overrode + diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..d5d7aa26 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,14 @@ +Adding repo myrepo http://localhost:18083/ +"myrepo" has been added to your repositories + +Templating release=raw, chart=$WD/temp1/raw/raw +--- +# Source: raw/templates/patched_resources.yaml +apiVersion: v1 +chartVersion: 0.0.1 +data: + foo: baz +kind: ConfigMap +metadata: + name: foo + diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..d5d7aa26 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_1229_template_strategic_merge_with_lockfile/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,14 @@ +Adding repo myrepo http://localhost:18083/ +"myrepo" has been added to your repositories + +Templating release=raw, chart=$WD/temp1/raw/raw +--- +# Source: raw/templates/patched_resources.yaml +apiVersion: v1 +chartVersion: 0.0.1 +data: + foo: baz +kind: ConfigMap +metadata: + name: foo + diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..d1d56924 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1 @@ +Pulling localhost:5000/myrepo/raw:0.1.0 diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..d1d56924 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_473_oci_chart_url_fetch/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1 @@ +Pulling localhost:5000/myrepo/raw:0.1.0 diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..9c7b08f7 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,3 @@ +NAME NAMESPACE ENABLED INSTALLED LABELS CHART VERSION +release1 myNamespace true true app:myapp,chart:test,group:myGroup,name:release1,namespace:myNamespace,project:myProject test +release2 myNamespace true true app:myapp,chart:test,group:myGroup,name:release2,namespace:myNamespace,project:myProject test diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..9c7b08f7 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_493_template_yaml_anchors_merge/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,3 @@ +NAME NAMESPACE ENABLED INSTALLED LABELS CHART VERSION +release1 myNamespace true true app:myapp,chart:test,group:myGroup,name:release1,namespace:myNamespace,project:myProject test +release2 myNamespace true true app:myapp,chart:test,group:myGroup,name:release2,namespace:myNamespace,project:myProject test diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..c5792331 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,6 @@ +Adding repo istio https://istio-release.storage.googleapis.com/charts +"istio" has been added to your repositories + +Templating release=acme-jx, chart=$GoGetterPath + + diff --git a/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..c5792331 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/issue_498_template_go_getter_with_selector/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,6 @@ +Adding repo istio https://istio-release.storage.googleapis.com/charts +"istio" has been added to your repositories + +Templating release=acme-jx, chart=$GoGetterPath + + diff --git a/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..c187cbcd --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,12 @@ +Pulling localhost:5001/myrepo/raw:0.1.0 +Templating release=foo, chart=$TMP/foo/raw/0.1.0/raw +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..c187cbcd --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/oci_chart_pull/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,12 @@ +Pulling localhost:5001/myrepo/raw:0.1.0 +Templating release=foo, chart=$TMP/foo/raw/0.1.0/raw +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..baf64c9d --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,25 @@ +Building dependency release=foo, chart=$WD/temp1/foo +Saving 1 charts +Downloading raw from repo oci://localhost:5002/myrepo +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..baf64c9d --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/oci_need/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,25 @@ +Building dependency release=foo, chart=$WD/temp1/foo +Saving 1 charts +Downloading raw from repo oci://localhost:5002/myrepo +Deleting outdated charts + +Templating release=foo, chart=$WD/temp1/foo +--- +# Source: raw/charts/dep/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-2 + namespace: default +data: + bar: BAR +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..f71b03aa --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,42 @@ +Building dependency release=foo, chart=../../charts/raw-0.1.0 +Building dependency release=baz, chart=$WD/temp1/baz +Saving 1 charts +Downloading raw from repo oci://localhost:5001/myrepo +Deleting outdated charts + +Templating release=foo, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO +--- +apiVersion: v1 +kind: ConfigMap +data: + two: TWO +metadata: + name: cm2 + +Templating release=baz, chart=$WD/temp1/baz +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: baz-3 + namespace: default +data: + baz: BAZ +--- +apiVersion: v1 +kind: ConfigMap +data: + one: ONE +metadata: + name: cm1 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..f71b03aa --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/postrenderer/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,42 @@ +Building dependency release=foo, chart=../../charts/raw-0.1.0 +Building dependency release=baz, chart=$WD/temp1/baz +Saving 1 charts +Downloading raw from repo oci://localhost:5001/myrepo +Deleting outdated charts + +Templating release=foo, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO +--- +apiVersion: v1 +kind: ConfigMap +data: + two: TWO +metadata: + name: cm2 + +Templating release=baz, chart=$WD/temp1/baz +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: baz-3 + namespace: default +data: + baz: BAZ +--- +apiVersion: v1 +kind: ConfigMap +data: + one: ONE +metadata: + name: cm1 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..4c93a8b9 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,12 @@ +Building dependency release=foo, chart=../../charts/raw-0.1.0 +Templating release=foo, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..4c93a8b9 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/pr_560/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,12 @@ +Building dependency release=foo, chart=../../charts/raw-0.1.0 +Templating release=foo, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo-1 + namespace: default +data: + foo: FOO + diff --git a/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..8f4523d9 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,33 @@ +Adding repo myrepo http://localhost:18084/ +"myrepo" has been added to your repositories + +Building dependency release=foo1, chart=../../charts/raw-0.1.0 +Building dependency release=foo2, chart=../../charts/raw-0.1.0 +Templating release=foo1, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo1-1 + namespace: default +data: + + base: base + template1: template1 + template1Label: template1 + +Templating release=foo2, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo2-1 + namespace: default +data: + + inheritedBaseLabel: base + template2: template2 + template2Label: template2 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..8f4523d9 --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/release_template_inheritance/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,33 @@ +Adding repo myrepo http://localhost:18084/ +"myrepo" has been added to your repositories + +Building dependency release=foo1, chart=../../charts/raw-0.1.0 +Building dependency release=foo2, chart=../../charts/raw-0.1.0 +Templating release=foo1, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo1-1 + namespace: default +data: + + base: base + template1: template1 + template1Label: template1 + +Templating release=foo2, chart=../../charts/raw-0.1.0 +--- +# Source: raw/templates/resources.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: foo2-1 + namespace: default +data: + + inheritedBaseLabel: base + template2: template2 + template2Label: template2 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v2-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v2-output.yaml new file mode 100644 index 00000000..18cd584e --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v2-output.yaml @@ -0,0 +1,8 @@ +Adding repo myrepo http://localhost:18082/ +"myrepo" has been added to your repositories + +Templating release=raw, chart=myrepo/raw +--- +# Source: raw/templates/resources.yaml +chartVersion: 0.0.1 + diff --git a/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v3-output.yaml b/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v3-output.yaml new file mode 100644 index 00000000..18cd584e --- /dev/null +++ b/test/e2e/template/helmfile/testdata/snapshot/templated_lockfile/gopkg.in-yaml.v3-output.yaml @@ -0,0 +1,8 @@ +Adding repo myrepo http://localhost:18082/ +"myrepo" has been added to your repositories + +Templating release=raw, chart=myrepo/raw +--- +# Source: raw/templates/resources.yaml +chartVersion: 0.0.1 +