diff --git a/internal/controllers/synthesis/integration_test.go b/internal/controllers/synthesis/integration_test.go index d131fc30..8d6602e8 100644 --- a/internal/controllers/synthesis/integration_test.go +++ b/internal/controllers/synthesis/integration_test.go @@ -203,7 +203,6 @@ func TestControllerSynthesizerRollout(t *testing.T) { require.NoError(t, err) // The first synthesizer update should be applied to the composition - // TODO: Flake because sometimes the pod updates the slice refs but the synth generation somehow still doesn't match this one testutil.Eventually(t, func() bool { require.NoError(t, client.IgnoreNotFound(cli.Get(ctx, client.ObjectKeyFromObject(comp), comp))) return comp.Status.CurrentState != nil && comp.Status.CurrentState.ObservedSynthesizerGeneration >= syn.Generation diff --git a/internal/controllers/synthesis/rollout.go b/internal/controllers/synthesis/rollout.go index 6f89ecfc..b9b61d6c 100644 --- a/internal/controllers/synthesis/rollout.go +++ b/internal/controllers/synthesis/rollout.go @@ -46,7 +46,7 @@ func (c *rolloutController) Reconcile(ctx context.Context, req ctrl.Request) (ct } logger = logger.WithValues("synthesizerName", syn.Name, "synthesizerNamespace", syn.Namespace, "synthesizerGeneration", syn.Generation) - if syn.Status.LastRolloutTime != nil { + if syn.Status.LastRolloutTime != nil && syn.Status.CurrentGeneration != syn.Generation { remainingCooldown := c.cooldown - time.Since(syn.Status.LastRolloutTime.Time) if remainingCooldown > 0 { return ctrl.Result{RequeueAfter: remainingCooldown}, nil // not ready to continue rollout yet