diff --git a/flyteplugins/go/tasks/pluginmachinery/core/phase.go b/flyteplugins/go/tasks/pluginmachinery/core/phase.go index 0f07e51137..e89cfc8b2d 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/phase.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/phase.go @@ -131,10 +131,11 @@ var PhaseInfoUndefined = PhaseInfo{phase: PhaseUndefined} func phaseInfo(p Phase, v uint32, err *core.ExecutionError, info *TaskInfo) PhaseInfo { if info == nil { + info = &TaskInfo{} + } + if info.OccurredAt == nil { t := time.Now() - info = &TaskInfo{ - OccurredAt: &t, - } + info.OccurredAt = &t } return PhaseInfo{ phase: p,