Skip to content

describe affected ignores Helm chart version changes (version, namespace, name, release) #3732

Done

Description

Describe the Bug

atmos describe affected (and so atmos stack plan|deploy --affected) does not report a native Helm component as affected when only its chart version changes. The same applies to namespace, name, create_namespace and release.

addHelmSectionAffected compares vars, env, source, provision, generate, render, values, values_files, chart and repositories, but not version or the other release fields:

sections := []struct {
name string
reason string
}{
{sectionNameVars, affectedReasonStackVars},
{sectionNameEnv, affectedReasonStackEnv},
{sectionNameSource, affectedReasonStackSource},
{sectionNameProvision, affectedReasonStackProvision},
{sectionNameGenerate, affectedReasonStackGenerate},
{sectionNameRender, affectedReasonStackRender},
{sectionNameValues, affectedReasonStackValues},
{sectionNameValuesF, affectedReasonStackValuesFile},
{sectionNameChart, affectedReasonStackChart},
{sectionNameRepos, affectedReasonStackRepos},

A chart version bump therefore never shows up in describe affected. In CI this means:

  • A PR that bumps a chart, for example from Renovate, plans nothing for it.
  • Merging that PR deploys nothing, so the cluster stays on the old chart until someone runs a full deploy.

Expected Behavior

A Helm component whose version, namespace, name, create_namespace or release changed is reported as affected, the same as a change to chart or values.

Steps to Reproduce

  1. A native Helm component:

    components:
      helm:
        external-dns:
          chart: external-dns
          repository: https://kubernetes-sigs.github.io/external-dns/
          version: 1.23.0
          namespace: external-dns
  2. Commit, then change only version: 1.24.0 and commit.

  3. atmos describe affected --sha HEAD~1 -s <stack>

external-dns is not listed. atmos helm diff external-dns -s <stack> does show the chart change.

Environment

  • Atmos 1.235.0-nightly.43989067298; the code is unchanged on main at 148a35b.
  • macOS (arm64) locally, Ubuntu x86_64 on GitHub Actions.

Additional Context

The likely fix is to add the release fields to the list in addHelmSectionAffected, each with its own affected reason (for example stack.version):

 		{sectionNameChart, affectedReasonStackChart},
 		{sectionNameRepos, affectedReasonStackRepos},
+		{"version", affectedReasonStackVersion},
+		{"namespace", affectedReasonStackNamespace},
+		{"name", affectedReasonStackName},
+		{"create_namespace", affectedReasonStackCreateNamespace},
+		{"release", affectedReasonStackRelease},
 	}

Related: #3723, which is the other Helm comparison issue in describe affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions