Skip to content

Commit

Permalink
Merge pull request #89 from jerr/fix-no-starttime-case
Browse files Browse the repository at this point in the history
fix: no job start time case
  • Loading branch information
dalehamel authored Sep 18, 2019
2 parents 69c91c8 + 4ff6355 commit ccbe98a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit ccbe98a

Please sign in to comment.