-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Infinite loop with PreviewReplicaCount set #308
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,18 +77,6 @@ func (c *RolloutController) reconcileNewReplicaSet(roCtx rolloutContext) (bool, | |
} | ||
roCtx.Log().Infof("Reconciling new ReplicaSet '%s'", newRS.Name) | ||
allRSs := roCtx.AllRSs() | ||
if rollout.Spec.Strategy.BlueGreen != nil { | ||
rolloutReplicas := defaults.GetReplicasOrDefault(rollout.Spec.Replicas) | ||
if *(newRS.Spec.Replicas) == rolloutReplicas { | ||
// Scaling not required. | ||
return false, nil | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have the same if statement in scaleReplicaSetAndRecordEvent() (https://github.com/argoproj/argo-rollouts/blob/master/rollout/sync.go#L295) so this check is not needed. |
||
} | ||
if *(newRS.Spec.Replicas) > rolloutReplicas { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, if someone set their previewReplicaCount to greater than the |
||
// Scale down. | ||
scaled, _, err := c.scaleReplicaSetAndRecordEvent(newRS, rolloutReplicas, rollout) | ||
return scaled, err | ||
} | ||
} | ||
newReplicasCount, err := replicasetutil.NewRSNewReplicas(rollout, allRSs, newRS) | ||
if err != nil { | ||
return false, err | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting repeated failed workflows with the following error
https://app.circleci.com/jobs/github/argoproj/argo-rollouts/651
https://app.circleci.com/jobs/github/argoproj/argo-rollouts/652
https://app.circleci.com/jobs/github/argoproj/argo-rollouts/650
This Stackoverflow suggested it was a resourcing issue: https://stackoverflow.com/questions/52129612/golang-circleci-2-0-test-failing-with-signal-killed