Skip to content

Commit

Permalink
fix: prevent hot loop when fully promoted rollout is aborted
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Suen <[email protected]>
  • Loading branch information
jessesuen committed Sep 28, 2023
1 parent f650a1f commit a903a88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rollout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import (
logutil "github.com/argoproj/argo-rollouts/utils/log"
"github.com/argoproj/argo-rollouts/utils/record"
replicasetutil "github.com/argoproj/argo-rollouts/utils/replicaset"
rolloututil "github.com/argoproj/argo-rollouts/utils/rollout"
serviceutil "github.com/argoproj/argo-rollouts/utils/service"
timeutil "github.com/argoproj/argo-rollouts/utils/time"
unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured"
Expand Down Expand Up @@ -520,6 +521,10 @@ func (c *Controller) newRolloutContext(rollout *v1alpha1.Rollout) (*rolloutConte
},
reconcilerBase: c.reconcilerBase,
}
if rolloututil.IsFullyPromoted(rollout) && roCtx.pauseContext.IsAborted() {
logCtx.Warnf("Removing abort condition from fully promoted rollout")
roCtx.pauseContext.RemoveAbort()
}
// carry over existing recorded weights
roCtx.newStatus.Canary.Weights = rollout.Status.Canary.Weights
return &roCtx, nil
Expand Down

0 comments on commit a903a88

Please sign in to comment.