Skip to content

Commit

Permalink
Sus but passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Dec 6, 2023
1 parent c88ec20 commit 9e755c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/reconstitution/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e755c9

Please sign in to comment.