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

tkn-results: Add CLI for listing results and records. #100

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

wlynch
Copy link
Member

@wlynch wlynch commented Mar 18, 2021

This adds a new tkn plugin for interacting with the Results API.
For now this only implements the list methods for results and records.

I wasn't sure what the best way to go about testing the whole CLI, since
most of the complexity is setting up the client. We might want to
consider adding this as a part of the e2e tests in a future PR.

Implements #81

@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 18, 2021
@imjasonh
Copy link
Member

Is the intention for this to be a CLI for testing/playing around with the API? If so it probably doesn't need super thorough tests, and should just be documented as test-only.

If it's not, we probably need to have a longer discussion with the tkn folks about what the relationship is between the two.

## Installation

```
$ GOBIN=${TKN_PLUGINS_DIR:-"${HOME}/.config/tkn/plugins"} go install github.com/tektoncd/experimental/tkn-resolve
Copy link
Member

Choose a reason for hiding this comment

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

Is github.com/tektoncd/experimental/tkn-resolve the right path?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! 😅 Fixed.

@wlynch
Copy link
Member Author

wlynch commented Mar 19, 2021

Is the intention for this to be a CLI for testing/playing around with the API? If so it probably doesn't need super thorough tests, and should just be documented as test-only.

If it's not, we probably need to have a longer discussion with the tkn folks about what the relationship is between the two.

Short term this is to let users have a nicer mechanism to work with the Results API without needing to jump through grpc_cli hoops. There's a blurry line here between a test-only tool and the recommended way to see results on a CLI.

I agree that we should have a longer discussion about how results fits in to the existing tkn UX for pipelineruns/taskruns (particularly since results is an optional component), but for now our hope is to start prototyping with a plugin.

}
)

// Execute executes the root command.
Copy link
Member

Choose a reason for hiding this comment

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

Typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

}
)

// Execute executes the root command.
Copy link
Member

Choose a reason for hiding this comment

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

Same here

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

This adds a new tkn plugin for interacting with the Results API.
For now this only implements the list methods for results and records.

I wasn't sure what the best way to go about testing the whole CLI, since
most of the complexity is setting up the client. We might want to
consider adding this as a part of the e2e tests in a future PR.
Copy link
Member

@XinruZhang XinruZhang 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 Apr 14, 2021
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XinruZhang

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 14, 2021
@tekton-robot tekton-robot merged commit 859cb28 into tektoncd:main Apr 14, 2021
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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants