Skip to content

Commit

Permalink
Fix activeDeadline would be triggered even after the job is completed. (
Browse files Browse the repository at this point in the history
kubeflow#24)

Signed-off-by: Syulin7 <735122171@qq.com>
  • Loading branch information
Syulin7 authored May 29, 2024
1 parent cae29f8 commit b457b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller.v1/tensorflow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ func (tc *TFController) pastBackoffLimit(tfjob *tfv1.TFJob, pods []*v1.Pod) (boo

// pastActiveDeadline checks if job has ActiveDeadlineSeconds field set and if it is exceeded.
func (tc *TFController) pastActiveDeadline(tfjob *tfv1.TFJob) bool {
if tfjob.Spec.ActiveDeadlineSeconds == nil || tfjob.Status.StartTime == nil {
if tfjob.Spec.ActiveDeadlineSeconds == nil || tfjob.Status.StartTime == nil || tfjob.Status.CompletionTime != nil {
return false
}
now := metav1.Now()
Expand Down

0 comments on commit b457b4a

Please sign in to comment.