Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: no job start time case #89

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func jobsTablePrint(o io.Writer, jobs []tracejob.TraceJob) {

// translateTimestampSince returns the elapsed time since timestamp in
// human-readable approximation.
func translateTimestampSince(timestamp metav1.Time) string {
func translateTimestampSince(timestamp *metav1.Time) string {
if timestamp.IsZero() {
return "<unknown>"
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/tracejob/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type TraceJob struct {
ImageNameTag string
InitImageNameTag string
FetchHeaders bool
StartTime metav1.Time
StartTime *metav1.Time
Status TraceJobStatus
}

Expand Down Expand Up @@ -131,7 +131,7 @@ func (t *TraceJobClient) GetJob(nf TraceJobFilter) ([]TraceJob, error) {
ID: types.UID(id),
Namespace: j.Namespace,
Hostname: hostname,
StartTime: *j.Status.StartTime,
StartTime: j.Status.StartTime,
Status: jobStatus(j),
}
tjobs = append(tjobs, tj)
Expand Down