-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add creation time to job status #1540
Add creation time to job status #1540
Conversation
@a86c6f7964 Let's show created time by default since this essentially shows how long the allocation has been running for. |
@diptanu if an allocation is retried the creation time does not change. That table is already pretty wide if you turn on |
@a86c6f7964 Yeah it is ok to add the created time in the allocation table, as it provides a sense of the age of the allocation which is operationally relevant most of the time. |
@@ -364,6 +358,12 @@ func (c *StatusCommand) outputFailedPlacements(failedEval *api.Evaluation) { | |||
} | |||
} | |||
|
|||
// formatUnixNanoTime is a helper for formatting time for output. | |||
func (c *StatusCommand) formatUnixNanoTime(nano int64) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to same file as formatTime
and it doesn't have to be an instance method
Please update these two pages as well: https://www.nomadproject.io/intro/getting-started/jobs.html |
okay I made changes from the feedback. thanks for the help. do you think that we should add creation time to the allocations that |
@a86c6f7964 Yes that would be nice, and in addition to the |
are you waiting on something from me? Do you only want to merge this once the other issues are complete? |
@@ -319,15 +301,16 @@ func (c *StatusCommand) outputJobInfo(client *api.Client, job *api.Job) error { | |||
c.Ui.Output(c.Colorize().Color("\n[bold]Allocations[reset]")) | |||
if len(jobAllocs) > 0 { | |||
allocs = make([]string, len(jobAllocs)+1) | |||
allocs[0] = "ID|Eval ID|Node ID|Task Group|Desired|Status" | |||
allocs[0] = "ID|Eval ID|Node ID|Task Group|Desired|Status|Created" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change Created
to Created At
LGTM. One small cosmetic comment |
changed to "Created At" |
Nice thank you! |
@a86c6f7964 Thanks, merging this one! Are you planning to tackle the two issues anytime soon? |
We merged within 10 seconds of each other! |
I would like to work on the other issues next, but I have been trying to get tests to pass. |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
closes #1217
I decided to take the approach of adding a command line flag to add the extra metadata, the other idea would be to make -verbose add the extra metadata.