FromSavepoint not work at first time
lppsuixn opened this issue · 0 comments
lppsuixn commented
Hi,I found FromSavepoint not work at first time.because jobStatus is not nil
var fromSavepoint = convertFromSavepoint(jobSpec, status.Components.Job, &status.Revision)
func convertFromSavepoint(jobSpec *v1beta1.JobSpec, jobStatus *v1beta1.JobStatus, revision *v1beta1.RevisionStatus) *string {
switch {
// Creating for the first time
case jobStatus == nil:
if !util.IsBlank(jobSpec.FromSavepoint) {
return jobSpec.FromSavepoint
}
return nil
// Updating with FromSavepoint provided
case revision.IsUpdateTriggered() && !util.IsBlank(jobSpec.FromSavepoint):
return jobSpec.FromSavepoint
// Latest savepoint
case jobStatus.SavepointLocation != "":
return &jobStatus.SavepointLocation
// The savepoint from which current job was restored
case jobStatus.FromSavepoint != "":
return &jobStatus.FromSavepoint
}
return nil
}