cli icon indicating copy to clipboard operation
cli copied to clipboard

Add *experimental* commands support

Open vdemeester opened this issue 3 years ago • 12 comments

Changes

Commands can be annotated with experimental to be treated as such. This will show up in usage/help as well as will output a warning message in stderr on execution.

Examples:

$ tkn task
Available Commands:
  create      Create a Task from ClusterTask
  delete      Delete Tasks in a namespace
  describe    Describe a Task in a namespace
  foo*        Foo is bar and baz (experimental)
  list        Lists Tasks in a namespace
  logs        Show Task logs
  start       Start Tasks
$ tkn task foo --help
Foo is bar and baz

Usage:
tkn task foo [flags]

EXPERIMENTAL:
  tkn task foo is an experimental feature.
  Experimental features provide early access to the project functionality. These
  features may change between releases without warning, or can be removed from a
  future release.
$ tkn task foo
*Warning*: This is an experimental command, it's usage and behavior can change in the next release(s)
Foo is bar

Signed-off-by: Vincent Demeester [email protected]

/kind feature

Closes #1568

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

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

See the contribution guide for more details.

Release Notes

Add a way to mark commands as `experimental` and warn user of their usage

vdemeester avatar Jun 01 '22 08:06 vdemeester

✅ lgtm

nikhil-thomas avatar Jun 01 '22 08:06 nikhil-thomas

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

File Old Coverage New Coverage Delta
pkg/cmd/task/task.go 100.0% 71.4% -28.6

tekton-robot avatar Jun 01 '22 09:06 tekton-robot

This is great. We can do the same with adm

pradeepitm12 avatar Jun 01 '22 09:06 pradeepitm12

This is great. We can do the same with adm

That's the idea 😝

vdemeester avatar Jun 01 '22 09:06 vdemeester

/retest

vdemeester avatar Jun 01 '22 13:06 vdemeester

SGTM!

since we are tweaking and stretching so much the Cobra templates output, we may as well build our own parser 🙃 (jk)

chmouel avatar Jun 01 '22 18:06 chmouel

since we are tweaking and stretching so much the Cobra templates output, we may as well build our own parser upside_down_face (jk)

Well, on this, I think we could re-work it a bit as well (mainly the use of -, etc.. to have something more readable that generates what we want 😛

vdemeester avatar Jun 02 '22 09:06 vdemeester

Well, on this, I think we could re-work it a bit as well (mainly the use of -, etc.. to have something more readable that generates what we want stuck_out_tongue

what do you mean by re-work?

chmouel avatar Jun 27 '22 08:06 chmouel

Well, on this, I think we could re-work it a bit as well (mainly the use of -, etc.. to have something more readable that generates what we want stuck_out_tongue

what do you mean by re-work?

I do not remember what I meant by my comment 😅

vdemeester avatar Jun 27 '22 08:06 vdemeester

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please ask for approval from vdemeester after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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 avatar Jul 05 '22 13:07 tekton-robot

@vdemeester: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-tekton-cli-unit-tests ae05914952436bb847f76f7ee7f5eb4ffbed3ab5 link true /test pull-tekton-cli-unit-tests
pull-tekton-cli-build-tests ae05914952436bb847f76f7ee7f5eb4ffbed3ab5 link true /test pull-tekton-cli-build-tests

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

tekton-robot avatar Jul 05 '22 13:07 tekton-robot

@vdemeester: PR needs rebase.

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.

tekton-robot avatar Aug 01 '22 23:08 tekton-robot

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Oct 31 '22 00:10 tekton-robot

/remove-lifecycle stale

vdemeester avatar Nov 14 '22 10:11 vdemeester

/approve

piyush-garg avatar Nov 22 '22 06:11 piyush-garg

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: piyush-garg

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 avatar Nov 22 '22 06:11 tekton-robot