Skip to content

Commit

Permalink
try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sperlingxx committed Apr 17, 2020
1 parent df464f2 commit f737625
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/controller.v1alpha3/experiment/experiment_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,22 @@ func (r *ReconcileExperiment) updateFinalizers(instance *experimentsv1alpha3.Exp
}

func (r *ReconcileExperiment) terminateSuggestion(instance *experimentsv1alpha3.Experiment) (reconcile.Result, error) {
log.Info("Start terminating suggestion...")
suggestion := &suggestionsv1alpha3.Suggestion{}
log.Info("Start terminating original...")
original := &suggestionsv1alpha3.Suggestion{}
err := r.Get(context.TODO(), types.NamespacedName{
Namespace: instance.Namespace,
Name: instance.Name,
}, suggestion)
}, original)
if err != nil {
if errors.IsNotFound(err) {
return reconcile.Result{}, nil
}
return reconcile.Result{}, err
}
if suggestion.IsCompleted() {
if original.IsCompleted() {
return reconcile.Result{}, nil
}
suggestion := original.DeepCopy()
msg := "Suggestion is succeeded"
suggestion.MarkSuggestionStatusSucceeded(suggestionController.SuggestionSucceededReason, msg)
log.Info("Mark suggestion succeeded...")
Expand Down

0 comments on commit f737625

Please sign in to comment.