Skip to content

Commit

Permalink
Merge pull request #915 from Cloudzp/fix_recommendation_trigger_err
Browse files Browse the repository at this point in the history
fix the issue that trigger recommendation by run number abormal
  • Loading branch information
mfanjie authored Dec 20, 2024
2 parents f51084f + 7acac49 commit 2b0ddae
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,11 @@ func (c *RecommendationTriggerController) Reconcile(ctx context.Context, req ctr
}
}

executeIdentity(context.TODO(), nil, c.RecommenderMgr, c.Provider, c.PredictorMgr, recommendationRule, id, c.Client, c.ScaleClient, c.OOMRecorder, metav1.Now(), newStatus.RunNumber)
if currentMissionIndex == -1 {
klog.Warningf("cannot found recommendation mission %s", recommendationRuleRef.Name)
return ctrl.Result{}, nil
}

executeIdentity(context.TODO(), nil, c.RecommenderMgr, c.Provider, c.PredictorMgr, recommendationRule, id, c.Client, c.ScaleClient, c.OOMRecorder, metav1.Now(), newStatus.RunNumber)
if newStatus.Recommendations[currentMissionIndex].Message != "Success" {
err = c.Client.Delete(context.TODO(), recommendation)
if err != nil {
Expand Down

0 comments on commit 2b0ddae

Please sign in to comment.