From a7e8993df9eaa230fedbb563d85d0dc826dca320 Mon Sep 17 00:00:00 2001 From: Jordan Olshevski Date: Wed, 8 Jan 2025 23:44:46 +0000 Subject: [PATCH] Fix --- internal/reconstitution/controller.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/reconstitution/controller.go b/internal/reconstitution/controller.go index 9777ff0a..1bd153c3 100644 --- a/internal/reconstitution/controller.go +++ b/internal/reconstitution/controller.go @@ -118,6 +118,11 @@ func (r *controller) populateCache(ctx context.Context, comp *apiv1.Composition, return nil, client.IgnoreNotFound(fmt.Errorf("unable to get resource slice: %w", err)) } slices[i] = slice + + if slice.DeletionTimestamp == nil && comp.DeletionTimestamp != nil { + logger.Info("refusing to fill cache because composition is deleting but a resource slice is not") + return nil, nil + } } return r.Cache.fill(ctx, comp, synthesis, slices)