Skip to content

Commit 4ff6355

Browse files
committed
fix no starttime case
1 parent a38c074 commit 4ff6355

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/cmd/get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func jobsTablePrint(o io.Writer, jobs []tracejob.TraceJob) {
200200

201201
// translateTimestampSince returns the elapsed time since timestamp in
202202
// human-readable approximation.
203-
func translateTimestampSince(timestamp metav1.Time) string {
203+
func translateTimestampSince(timestamp *metav1.Time) string {
204204
if timestamp.IsZero() {
205205
return "<unknown>"
206206
}

pkg/tracejob/job.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type TraceJob struct {
3535
ImageNameTag string
3636
InitImageNameTag string
3737
FetchHeaders bool
38-
StartTime metav1.Time
38+
StartTime *metav1.Time
3939
Status TraceJobStatus
4040
}
4141

@@ -131,7 +131,7 @@ func (t *TraceJobClient) GetJob(nf TraceJobFilter) ([]TraceJob, error) {
131131
ID: types.UID(id),
132132
Namespace: j.Namespace,
133133
Hostname: hostname,
134-
StartTime: *j.Status.StartTime,
134+
StartTime: j.Status.StartTime,
135135
Status: jobStatus(j),
136136
}
137137
tjobs = append(tjobs, tj)

0 commit comments

Comments
 (0)