From 48034051d48db9eabf0c6073387cb24ae7809fbd Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 13 Sep 2019 19:01:34 -0400 Subject: [PATCH] cli: emit job version number proper We must emit alloc job number rather than its the field address. --- command/alloc_status.go | 2 +- command/job_status.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/alloc_status.go b/command/alloc_status.go index 350894ea7e8..2022379986d 100644 --- a/command/alloc_status.go +++ b/command/alloc_status.go @@ -240,7 +240,7 @@ func formatAllocBasicInfo(alloc *api.Allocation, client *api.Client, uuidLength fmt.Sprintf("Node ID|%s", limit(alloc.NodeID, uuidLength)), fmt.Sprintf("Node Name|%s", alloc.NodeName), fmt.Sprintf("Job ID|%s", alloc.JobID), - fmt.Sprintf("Job Version|%d", alloc.Job.Version), + fmt.Sprintf("Job Version|%d", *alloc.Job.Version), fmt.Sprintf("Client Status|%s", alloc.ClientStatus), fmt.Sprintf("Client Description|%s", alloc.ClientDescription), fmt.Sprintf("Desired Status|%s", alloc.DesiredStatus), diff --git a/command/job_status.go b/command/job_status.go index 858355d11bb..1ef6dbcd9a5 100644 --- a/command/job_status.go +++ b/command/job_status.go @@ -462,7 +462,7 @@ func formatAllocList(allocations []*api.Allocation, verbose bool, uuidLength int limit(alloc.EvalID, uuidLength), limit(alloc.NodeID, uuidLength), alloc.TaskGroup, - alloc.Job.Version, + *alloc.Job.Version, alloc.DesiredStatus, alloc.ClientStatus, formatUnixNanoTime(alloc.CreateTime), @@ -478,7 +478,7 @@ func formatAllocList(allocations []*api.Allocation, verbose bool, uuidLength int limit(alloc.ID, uuidLength), limit(alloc.NodeID, uuidLength), alloc.TaskGroup, - alloc.Job.Version, + *alloc.Job.Version, alloc.DesiredStatus, alloc.ClientStatus, createTimePretty,