feat(helm): roll-forward upgrades for pinned releases #305

Merged
johnride merged 1 commits from feat/helm-rollforward-min into master 2026-05-29 00:21:25 +00:00

View File

@@ -223,18 +223,18 @@ impl<T: Topology + HelmCommand> Interpret<T> for HelmChartInterpret {
self.score.release_name
)));
}
// Pinned-version safety net: if the score pins a *different*
// version than what's installed, refuse to silently
// upgrade/downgrade — that's a manual decision.
// install_only=false is explicit upgrade mode; a pinned
// version change is an intentional roll-forward (ADR-012-2).
// Apply it — helm fails loudly if convergence fails; no
// auto-rollback.
if let Some(expected) = self.expected_chart_field()
&& Self::normalize_chart_field(&expected)
!= Self::normalize_chart_field(&installed_chart)
{
return Err(InterpretError::new(format!(
"Helm release '{}' already installed as '{}', but score requests '{}'. \
Refusing to upgrade/downgrade; resolve manually.",
warn!(
"Helm release '{}' installed as '{}'; rolling forward to '{}'.",
self.score.release_name, installed_chart, expected
)));
);
}
// Otherwise (no pin, or pinned and matching) fall through to
// `helm upgrade --install`. Helm is the source of truth on