Skip to content

Commit

Permalink
Allow showing specific logs already during queued phase
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Graetz <[email protected]>
  • Loading branch information
fg91 committed Jan 14, 2024
1 parent 8e31e8c commit fd648b9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion flyteplugins/go/tasks/pluginmachinery/core/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,17 @@ func PhaseInfoQueued(t time.Time, version uint32, reason string) PhaseInfo {
return pi
}

func PhaseInfoQueuedWithTaskInfo(version uint32, reason string, info *TaskInfo) PhaseInfo {
func PhaseInfoQueuedWithTaskInfo(t time.Time, version uint32, reason string, info *TaskInfo) PhaseInfo {
if info != nil && info.Logs != nil {
logs := info.Logs
// Delete the logs for which ShowWhilePending is not true
info.Logs = make([]*core.TaskLog, 0, len(logs))
for _, l := range logs {
if l.ShowWhilePending {
info.Logs = append(info.Logs, l)
}
}
}
pi := phaseInfo(PhaseQueued, version, nil, info, false)
pi.reason = reason
return pi
Expand Down

0 comments on commit fd648b9

Please sign in to comment.