-
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
[cli] Adds Actions to job status command output #24959
Conversation
…longer cares about pipe delineation
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.
lgtm!
parts := strings.Split(action, "|") | ||
if len(parts) != 3 { | ||
group, task, actionName := action["group"], action["task"], action["action"] | ||
if group == "" || task == "" || actionName == "" { |
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.
seems weird these may be empty. and could any of them be empty without all of them being empty?
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.
You know, I think group/task can never be empty, and we explicitly guard against actionName being empty too. Maybe this is an unreachable condition?
Provides a little table showing Nomad Actions available to a job when running
nomad job status $jobid
. Mimics what we show in the Web UI (where there's an Actions dropdown on the main page of jobs that have 'em)