From bacb5c576c1cb47a659f4800431e07df9be1a29a Mon Sep 17 00:00:00 2001 From: owensmallwood Date: Mon, 25 Aug 2025 20:06:24 -0600 Subject: [PATCH] Unified Storage: Fix yield statement (#110134) fix yield --- pkg/storage/unified/sql/backend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/storage/unified/sql/backend.go b/pkg/storage/unified/sql/backend.go index a4df140d541..2560943c92b 100644 --- a/pkg/storage/unified/sql/backend.go +++ b/pkg/storage/unified/sql/backend.go @@ -711,7 +711,9 @@ func (b *backend) ListModifiedSince(ctx context.Context, key resource.Namespaced if mr.Key.Name <= lastSeen { // resource names should be sorted alphabetically. So if not, the query is not correct. - yield(nil, fmt.Errorf("listModifiedSince: resources are not sorted by name ASC, lastSeen: %q, current: %q", lastSeen, mr.Key.Name)) + if !yield(nil, fmt.Errorf("listModifiedSince: resources are not sorted by name ASC, lastSeen: %q, current: %q", lastSeen, mr.Key.Name)) { + return + } } lastSeen = mr.Key.Name