Skip to content

Commit

Permalink
At least mostly fix this flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Olshevski committed Dec 13, 2023
1 parent ba8be6d commit 6998da2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion internal/controllers/synthesis/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/controllers/synthesis/rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6998da2

Please sign in to comment.