Skip to content

Commit

Permalink
Fix for setting task info OccurredAt when not set. (flyteorg#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrina Rogan committed Mar 29, 2021
1 parent f406cbb commit 19e65e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flyteplugins/go/tasks/pluginmachinery/core/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 19e65e1

Please sign in to comment.