Skip to content

fix: surface every updateChartMap error in ClusterSummary status - #1967

Closed
gianlucam76 wants to merge 1 commit into
projectsveltos:mainfrom
gianlucam76:bug-1960
Closed

gianlucam76 wants to merge 1 commit into
projectsveltos:mainfrom
gianlucam76:bug-1960

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

Fixes #1960

Problem

prepareForDeployment only surfaced a failure to ClusterSummary.Status when
updateChartMap returned apierrors.IsNotFound (a missing non-optional
templateResourceRef). Every other error from updateChartMap — e.g. a Helm
chart field that fails Sveltos template instantiation — fell through to a
silent requeue: no featureSummaries entry, no failure message, retrying
forever with nothing visible from kubectl get clustersummary alone. The real
error only ever showed up in the addon-controller pod logs.

Note: the exact repro in the issue (a bad helmCharts[].values template) is
already blocked by #1956, which excludes Values from templating on this
path. The underlying status-visibility bug is still very much live for every
other templated HelmChart field though (ReleaseName, RepositoryURL,
ChartVersion, ...), so the fix and test target one of those instead.

Fix

Drop the apierrors.IsNotFound type check: surface any updateChartMap error
the same way that case already did.

Testing

Added prepareForDeployment surfaces an updateChartMap template failure in ClusterSummary status, using a Helm chart with an unclosed template action in
ReleaseName (a generic template-parse error, not apierrors.IsNotFound).
Verified the test fails without the fix (no FeatureHelm status entry at all)
and passes with it (FeatureStatusFailedNonRetriable + failure message). Full
controllers suite passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_011kChqpPVTNXqjF7NJXUKzP

prepareForDeployment only surfaced a failure to ClusterSummary.Status
when updateChartMap returned apierrors.IsNotFound (a missing
non-optional templateResourceRef). Every other error like an Helm
chart field that fails Sveltos template instantiation only caused
the ClusterSummary to be requeued for reconciliation again.
The real error only ever showed up in the controller's own logs.

This PR fixes that by surfacing any updateChartMap error the same
way the IsNotFound case already did, dropping the type check so nothing
falls through silently.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClusterSummary status doesn't surface Helm chart registration failures

1 participant