Repository navigation
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:
atmos/internal/exec/describe_affected_components.go
Lines 1040 to 1053 in 148a35b
| 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
-
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
-
Commit, then change only
version: 1.24.0and commit. -
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
mainat 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.
Activity