Skip to content

Add missing defer summarize(req) in UninstallRemediation#1491

Open
SebTardif wants to merge 1 commit into
fluxcd:mainfrom
SebTardif:fix/uninstall-remediation-summarize
Open

Add missing defer summarize(req) in UninstallRemediation#1491
SebTardif wants to merge 1 commit into
fluxcd:mainfrom
SebTardif:fix/uninstall-remediation-summarize

Conversation

@SebTardif
Copy link
Copy Markdown
Contributor

Description

UninstallRemediation.Reconcile is the only action reconciler that does not call defer summarize(req). All six other reconcilers (Install, Upgrade, Test, Uninstall, Unlock, RollbackRemediation) include this call.

Without it, the Ready condition is never updated after an uninstall remediation, and ObservedPostRenderersDigest / ObservedCommonMetadataDigest are not refreshed.

Closes #1488

Changes

One-line addition: defer summarize(req) after the variable block, matching all other reconcilers.

Verification

  • go build ./... passes
  • go vet ./... passes
  • Integration tests require etcd (CI)

UninstallRemediation is the only action reconciler that does not call
defer summarize(req). All other reconcilers (Install, Upgrade, Test,
Uninstall, Unlock, RollbackRemediation) include this deferred call to
propagate sub-conditions into the top-level Ready condition.

Without this call, the Ready condition is never updated after an
uninstall remediation, leaving a stale status until the next
reconciliation pass.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@hiddeco
Copy link
Copy Markdown
Member

hiddeco commented May 19, 2026

Thanks for the patch.

Double checked things, and rollback_remediation.go and uninstall_remediation.go were added in the same commit (b975b3f), with the same doc comment, but only the former got defer summarize(req). This makes me believe it was indeed missed (and is a bug).

However, before this can be merged, please add a test in uninstall_remediation_test.go that asserts Ready's reason equals UninstallSucceeded after a successful run to prevent regressions in the future.

Also: if this work was assisted by an LLM, please add the appropriate trailer to the commit per https://github.com/fluxcd/helm-controller?tab=contributing-ov-file#ai-coding-assistants-guidance.

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.

UninstallRemediation missing defer summarize(req), Ready condition not updated

2 participants