@@ -266,16 +266,14 @@ func (r *MonoVertexRolloutReconciler) reconcile(ctx context.Context, monoVertexR
266266 }
267267 }
268268
269- inProgressStrategy := r .inProgressStrategyMgr .GetStrategy (ctx , monoVertexRollout )
270-
271269 // clean up recyclable monovertices
272270 allDeleted , err := ctlrcommon .GarbageCollectChildren (ctx , monoVertexRollout , r , r .client )
273271 if err != nil {
274272 return ctrl.Result {}, err
275273 }
276274
277275 // if we still have monovertices that need deleting, or if we're in the middle of an upgrade strategy, then requeue
278- if ! allDeleted || inProgressStrategy != apiv1 . UpgradeStrategyNoOp {
276+ if ! allDeleted {
279277 if requeueDelay == 0 {
280278 requeueDelay = common .DefaultRequeueDelay
281279 } else {
@@ -357,53 +355,57 @@ func (r *MonoVertexRolloutReconciler) processExistingMonoVertex(ctx context.Cont
357355 }
358356 }
359357
360- done , progressiveRequeueDelay , err := progressive .ProcessResource (ctx , monoVertexRollout , existingMonoVertexDef , needsUpdate , r , r .client )
358+ assessmentComplete , failed , progressiveRequeueDelay , err := progressive .ProcessResource (ctx , monoVertexRollout , existingMonoVertexDef , needsUpdate , r , r .client )
361359 if err != nil {
362360 return 0 , err
363361 }
364- if done {
365-
366- // update the list of riders in the Status based on our child which was just promoted
367- promotedMonoVertex , err := ctlrcommon .FindMostCurrentChildOfUpgradeState (ctx , monoVertexRollout , common .LabelValueUpgradePromoted , nil , true , r .client )
368- if err != nil {
369- return 0 , err
370- }
362+ if progressiveRequeueDelay > 0 {
363+ requeueDelay = progressiveRequeueDelay
364+ }
365+ if assessmentComplete {
366+ if ! failed {
367+ // update the list of riders in the Status based on our child which was just promoted
368+ promotedMonoVertex , err := ctlrcommon .FindMostCurrentChildOfUpgradeState (ctx , monoVertexRollout , common .LabelValueUpgradePromoted , nil , true , r .client )
369+ if err != nil {
370+ return 0 , err
371+ }
371372
372- // update promotedPodSelector immediately so VPA targets the newly promoted child's pods
373- // without waiting for the next reconcile
374- monoVertexRollout .Status .PromotedPodSelector = buildPromotedPodSelector (promotedMonoVertex .GetName ())
373+ // update promotedPodSelector immediately so VPA targets the newly promoted child's pods
374+ // without waiting for the next reconcile
375+ monoVertexRollout .Status .PromotedPodSelector = buildPromotedPodSelector (promotedMonoVertex .GetName ())
375376
376- currentRiderList , err := r .GetDesiredRiders (monoVertexRollout , promotedMonoVertex .GetName (), promotedMonoVertex )
377- if err != nil {
378- return 0 , fmt .Errorf ("error getting desired Riders for MonoVertex %s: %s" , newMonoVertexDef .GetName (), err )
379- }
380- r .SetCurrentRiderList (ctx , monoVertexRollout , currentRiderList )
377+ currentRiderList , err := r .GetDesiredRiders (monoVertexRollout , promotedMonoVertex .GetName (), promotedMonoVertex )
378+ if err != nil {
379+ return 0 , fmt .Errorf ("error getting desired Riders for MonoVertex %s: %s" , newMonoVertexDef .GetName (), err )
380+ }
381+ r .SetCurrentRiderList (ctx , monoVertexRollout , currentRiderList )
381382
382- // we need to prevent the possibility that we're done but we fail to update the Progressive Status
383- // therefore, we publish Rollout.Status here, so if that fails, then we won't be "done" and so we'll come back in here to try again
384- err = r .updateMonoVertexRolloutStatus (ctx , monoVertexRollout )
385- if err != nil {
386- return 0 , err
387- }
383+ // we need to prevent the possibility that we're done but we fail to update the Progressive Status
384+ // therefore, we publish Rollout.Status here, so if that fails, then we won't be "done" and so we'll come back in here to try again
385+ err = r .updateMonoVertexRolloutStatus (ctx , monoVertexRollout )
386+ if err != nil {
387+ return 0 , err
388+ }
388389
389- r .inProgressStrategyMgr .UnsetStrategy (ctx , monoVertexRollout )
390- monoVertexRollout .Status .ProgressiveStatus .PromotedMonoVertexStatus = nil
391-
392- // generate metrics for MonoVertex progressive rollout results
393- if monoVertexRollout .GetUpgradingChildStatus () != nil {
394- // assessmentResult value indicates that the progressive rollout is completed, so we can generate the metrics for the same
395- assessmentResult := metrics .EvaluateSuccessStatusForMetrics (monoVertexRollout .GetUpgradingChildStatus ().AssessmentResult )
396- if assessmentResult != "" {
397- r .customMetrics .IncMonovertexProgressiveCompleted (monoVertexRollout .GetRolloutObjectMeta ().GetNamespace (), monoVertexRollout .GetRolloutObjectMeta ().GetName (),
398- monoVertexRollout .GetUpgradingChildStatus ().Name , metrics .EvaluateSuccessStatusForMetrics (monoVertexRollout .GetUpgradingChildStatus ().BasicAssessmentResult ),
399- assessmentResult , monoVertexRollout .GetUpgradingChildStatus ().ForcedSuccess )
390+ r .inProgressStrategyMgr .UnsetStrategy (ctx , monoVertexRollout )
391+ monoVertexRollout .Status .ProgressiveStatus .PromotedMonoVertexStatus = nil
392+
393+ // generate metrics for MonoVertex progressive rollout results
394+ if monoVertexRollout .GetUpgradingChildStatus () != nil {
395+ // assessmentResult value indicates that the progressive rollout is completed, so we can generate the metrics for the same
396+ assessmentResult := metrics .EvaluateSuccessStatusForMetrics (monoVertexRollout .GetUpgradingChildStatus ().AssessmentResult )
397+ if assessmentResult != "" {
398+ r .customMetrics .IncMonovertexProgressiveCompleted (monoVertexRollout .GetRolloutObjectMeta ().GetNamespace (), monoVertexRollout .GetRolloutObjectMeta ().GetName (),
399+ monoVertexRollout .GetUpgradingChildStatus ().Name , metrics .EvaluateSuccessStatusForMetrics (monoVertexRollout .GetUpgradingChildStatus ().BasicAssessmentResult ),
400+ assessmentResult , monoVertexRollout .GetUpgradingChildStatus ().ForcedSuccess )
401+ }
402+ }
403+ // we need to requeue one time to ensure that the newly promoted MonoVertex scales back to its rollout-defined scale
404+ if requeueDelay == 0 {
405+ requeueDelay = common .DefaultRequeueDelay
400406 }
401407 }
402- // we need to requeue one time to ensure that the newly promoted MonoVertex scales back to its rollout-defined scale
403- requeueDelay = common .DefaultRequeueDelay
404408
405- } else {
406- requeueDelay = progressiveRequeueDelay
407409 }
408410 default :
409411 if needsUpdate {
0 commit comments