When I execute kubectl get taskruns command, I want to get more helpful information about the taskruns
e.g.
TaskRun.Status.StartTimeTaskRun.Status.CompletionTimeTaskRun.Status.Conditions.TypeTaskRun.Status.Conditions.StatusTaskRun.Status.Conditions.ReasonWhen I execute kubectl get taskruns command, I don't get any helpful information
If this make sense, I can send out a PR to fix this
Hey there @skeeey ! Trying to make sure I know what's missing: so when I run kubectl get taskruns -o yaml I seem to be seeing the info you're looking for, e.g.:
status:
conditions:
- lastTransitionTime: 2018-12-11T15:50:09Z
status: "True"
type: Succeeded
podName: echo-hello-world-task-run-pod-85ca51
startTime: 2018-12-11T15:49:39Z
steps:
- terminated:
containerID: docker://fcfe4a004...6729d6d2ad53faff41
exitCode: 0
finishedAt: 2018-12-11T15:50:01Z
reason: Completed
startedAt: 2018-12-11T15:50:01Z
- terminated:
containerID: docker://fe86fc5f7...eb429697b44ce4a5b
exitCode: 0
finishedAt: 2018-12-11T15:50:02Z
reason: Completed
startedAt: 2018-12-11T15:50:02Z
(I took this example output from https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md#task)
So we've got:
TaskRun.Status.StartTimeTaskRun.Status.CompletionTime is technically: TaskRun.Status.Conditions[0].LastTransitionTimeTaskRun.Status.Conditions.Type is technically: TaskRun.Status.Conditions[0].TypeTaskRun.Status.Conditions.Status is technically: TaskRun.Status.Conditions[0].StatusTaskRun.Status.Conditions.Reason is in the status of each step (note that #549 proposes adding names to these step statuses so they're easier to read)Is that the info you're looking for?
(Note that some of this is not super intuitive b/c it's trying to follow these kubernetes api best practices: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties)
Hi @bobcatfish, maybe my description is not clear :), in fact, I want to get some basic info from kubectl get taskruns directly, e.g.
$ kubectl get taskruns
## Expected output
NAME TYPE STATUS STARTTTIME COMPLETIONTIME Reason
hello1 Succeeded Ture 2019-03-12T08:09:11Z 2019-03-12T08:09:24Z
hello2 Succeeded Ture 2019-03-12T08:10:12Z 2019-03-12T08:09:30Z
## Current output
NAME AGE
hello1 1d
hello2 1d
I think I can quickly glance the taskrun status from expected output and we can also use --watch to monitor their status changed, currently, I must use -o yaml and go through the yaml file to find the taskrun status, I think this is not convenient, what do you think?
/good-first-issue
/enhancement
/help-wanted
@vdemeester:
This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.
In response to this:
/good-first-issue
/enhancement
/help-wanted
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/kind enhancement
/assign @chmouel
@vdemeester: GitHub didn't allow me to assign the following users: chmouel.
Note that only tektoncd members and repo collaborators can be assigned.
For more information please see the contributor guide
In response to this:
/assign @chmouel
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
If we're going to do this for TaskRuns, it'd make sense to do it for PipelineRuns at the same time.
ohhh that makes perfect sense, thanks for the extra details @skeeey !!! :heart: :heart::heart:
It looks like the right way to do this might be with "Additional Printer Columns":
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#additional-printer-columns
@chmouel are you still hoping to do this?
I can work on this @dlorenc, I have this much output working.
$ kubectl get taskruns
NAME TYPE STATUS STARTTIME COMPLETIONTIME
echo-hello-world-task-run Succeeded True 21h 21h
I am not sure how to get reason out of all the steps. maybe adding an extra field called AggregateReasons which holds all the reasons as a comma separated string in the TaskRunStatus struct can be a possibility @dlorenc
Opened a PR for this https://github.com/tektoncd/pipeline/pull/694
Most helpful comment
If we're going to do this for
TaskRuns, it'd make sense to do it forPipelineRuns at the same time.