Skip to content
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

Show Sidecar Names with tkn tr desc #747

Merged
merged 1 commit into from
Feb 24, 2020
Merged

Show Sidecar Names with tkn tr desc #747

merged 1 commit into from
Feb 24, 2020

Conversation

danielhelfand
Copy link
Member

Part of #655

This pull request adds the names of Sidecar containers associated with a TaskRun to tkn tr desc. Unfortunately, the ContainerState is not available for Sidecars at this time, but I have a pull request for this open and may be available as soon as next release of pipeline. For now, we can at least show what sidecars are present as part of a TaskRun.

Submitter Checklist

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

Release Notes

Add Sidecar names to tkn taskrun describe

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 20, 2020
@tekton-robot
Copy link
Contributor

The following is the coverage report on pkg/.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/formatted/color.go 65.9% 66.7% 0.8

@@ -64,6 +64,8 @@ func DecorateAttr(attrString, message string) string {
return fmt.Sprintf("💌 ")
case "taskruns":
return fmt.Sprintf("🗂 ")
case "sidecars":
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's gotta be a car, right? 🤷‍♂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahah it has to ! 🚗 🚗 🚗

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or mothercycle :D but the tiny red car is cutter imho!!

// Pass one or more names for sidecar containers for testing with tkn tr describe.
// Replace with test builder option once https://github.com/tektoncd/pipeline/issues/2078
// is closed.
func sidecarState(names ...string) tb.TaskRunStatusOp {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's merged now, should we wait for a pipeline release to remove this?

@@ -64,6 +64,8 @@ func DecorateAttr(attrString, message string) string {
return fmt.Sprintf("💌 ")
case "taskruns":
return fmt.Sprintf("🗂 ")
case "sidecars":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or mothercycle :D but the tiny red car is cutter imho!!

@@ -80,13 +80,13 @@ func TestDecoration(t *testing.T) {
funcMap := template.FuncMap{
"decorate": DecorateAttr,
}
aTemplate := `{{decorate "bullet" "Foo"}} {{decorate "resources" ""}}{{decorate "params" ""}}{{decorate "tasks" ""}}{{decorate "pipelineruns" ""}}{{decorate "status" ""}}{{decorate "inputresources" ""}}{{decorate "outputresources" ""}}{{decorate "steps" ""}}{{decorate "message" ""}}{{decorate "taskruns" ""}}{{decorate "red" "Red"}} {{decorate "underline" "Foo"}}`
aTemplate := `{{decorate "bullet" "Foo"}} {{decorate "resources" ""}}{{decorate "params" ""}}{{decorate "tasks" ""}}{{decorate "pipelineruns" ""}}{{decorate "status" ""}}{{decorate "inputresources" ""}}{{decorate "outputresources" ""}}{{decorate "steps" ""}}{{decorate "message" ""}}{{decorate "taskruns" ""}}{{decorate "sidecars" ""}}{{decorate "red" "Red"}} {{decorate "underline" "Foo"}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one day we should clean this up and make the emojis template generation and testing a bit smarter !

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2020
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chmouel, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants