diff --git a/internal/reconstitution/cache.go b/internal/reconstitution/cache.go index 85b05f42..d6de1e72 100644 --- a/internal/reconstitution/cache.go +++ b/internal/reconstitution/cache.go @@ -14,6 +14,8 @@ import ( "github.com/go-logr/logr" ) +// TODO: Is it possible for resynthesization to ocurr without an update to the composition spec? + // cache maintains a fast index of (ResourceRef + Composition + Synthesis) -> Resource. type cache struct { client client.Client diff --git a/internal/testutil/testutil.go b/internal/testutil/testutil.go index f14881ab..ee4a2dec 100644 --- a/internal/testutil/testutil.go +++ b/internal/testutil/testutil.go @@ -248,7 +248,7 @@ func NewPodController(t testing.TB, mgr ctrl.Manager, fn func(*apiv1.Composition // Add resource slice count - the wrapper will do this in the real world pod := pods.Items[0] - if comp.Status.CurrentState.ResourceSliceCount == nil { + if comp.Status.CurrentState.ResourceSliceCount == nil || comp.Status.CurrentState.ObservedCompositionGeneration != comp.Generation || comp.Status.CurrentState.ObservedSynthesizerGeneration != syn.Generation { count := int64(len(slices)) comp.Status.CurrentState.ResourceSliceCount = &count err = cli.Status().Update(ctx, comp)