From 45ba1c0bf912c93abfdf5eb3cdc231cb3b47fe08 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Thu, 23 Jul 2026 16:44:13 -0500 Subject: [PATCH] CNF-26102: Fix istiocsr updateCondition error aggregation bug When both a reconciliation failure and a status update failure occur, updateCondition aggregated {err, errUpdate} instead of {prependErr, errUpdate}, silently dropping the original reconcile error. The trustmanager version of the same function correctly uses prependErr. --- pkg/controller/istiocsr/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/istiocsr/utils.go b/pkg/controller/istiocsr/utils.go index 896c8bbe6..0d669716b 100644 --- a/pkg/controller/istiocsr/utils.go +++ b/pkg/controller/istiocsr/utils.go @@ -482,7 +482,7 @@ func (r *Reconciler) updateCondition(istiocsr *v1alpha1.IstioCSR, prependErr err if err := r.updateStatus(r.ctx, istiocsr); err != nil { errUpdate := fmt.Errorf("failed to update %s/%s status: %w", istiocsr.GetNamespace(), istiocsr.GetName(), err) if prependErr != nil { - return utilerrors.NewAggregate([]error{err, errUpdate}) + return utilerrors.NewAggregate([]error{prependErr, errUpdate}) } return errUpdate }