Skip to content

Commit

Permalink
fix completion time setting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
shaowei su committed Jan 26, 2021
1 parent 169453e commit 4c07585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller.v1/tensorflow/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ func (tc *TFController) UpdateJobStatus(job interface{}, replicas map[commonv1.R
msg := fmt.Sprintf("TFJob %s/%s has failed because %d %s replica(s) failed.",
tfJob.Namespace, tfJob.Name, failed, rtype)
tc.Recorder.Event(tfJob, corev1.EventTypeNormal, tfJobFailedReason, msg)
if tfJob.Status.CompletionTime == nil {
if jobStatus.CompletionTime == nil {
now := metav1.Now()
tfJob.Status.CompletionTime = &now
jobStatus.CompletionTime = &now
}
err := commonutil.UpdateJobConditions(jobStatus,
commonv1.JobFailed, tfJobFailedReason, msg)
Expand Down

0 comments on commit 4c07585

Please sign in to comment.