Skip to content

Commit

Permalink
Fix log prefix display inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
icloudnote committed Dec 20, 2024
1 parent dd06e6b commit 05046d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func SortTasksBySpecOrder(pipelineTasks []v1.PipelineTask, pipelinesTaskRuns map
if n, ok := trNames[ts.Name]; ok {
trStatusFields := pipelinesTaskRuns[n].Status.TaskRunStatusFields
trs = append(trs, Run{
Task: ts.Name,
Task: taskName(ts),
Name: n,
Retries: ts.Retries,
StartTime: trStatusFields.StartTime,
Expand All @@ -101,3 +101,10 @@ func SortTasksBySpecOrder(pipelineTasks []v1.PipelineTask, pipelinesTaskRuns map
sort.Sort(trs)
return trs
}

func taskName(task v1.PipelineTask) string {
if task.DisplayName != "" {
return task.DisplayName
}
return task.Name
}

0 comments on commit 05046d5

Please sign in to comment.