Skip to content

Implement human readable output for kn route describe#643

Merged
knative-prow-robot merged 4 commits intoknative:masterfrom
navidshaikh:pr/describe-route
Feb 10, 2020
Merged

Implement human readable output for kn route describe#643
knative-prow-robot merged 4 commits intoknative:masterfrom
navidshaikh:pr/describe-route

Conversation

@navidshaikh
Copy link
Copy Markdown
Contributor

@navidshaikh navidshaikh commented Feb 7, 2020

/lint

Fixes #205

Proposed Changes

  • Keeps the machine readable output
  • Align the command description text, check for single argument, reported error messages and unit tests in service, revision, route, source binding describe commands

Default output:

➜  client git:(pr/describe-route) ./kn route describe foo
Name:       foo
Namespace:  default
Age:        2m
URL:        http://foo.default.apps.ci-ln-dr6jjit-d5d6b.origin-ci-int-aws.dev.rhcloud.com
Service:    foo

Traffic Targets:  
   40%  foo-zxjzw-1 #v1
        URL:  http://v1-foo.default.apps.ci-ln-dr6jjit-d5d6b.origin-ci-int-aws.dev.rhcloud.com
   60%  foo-bhjrx-2 #v2
        URL:  http://v2-foo.default.apps.ci-ln-dr6jjit-d5d6b.origin-ci-int-aws.dev.rhcloud.com

Conditions:  
  OK TYPE                  AGE REASON
  ++ Ready                 13s 
  ++ AllTrafficAssigned     2m 
  ++ IngressReady          13s 

Verbose output:

➜  client git:(pr/describe-route) ./kn route describe svc -v
Name:         svc
Namespace:    default
Labels:       serving.knative.dev/service=svc
Annotations:  serving.knative.dev/creator=kube:admin
              serving.knative.dev/lastModifier=kube:admin
Age:          11m
URL:          http://svc.default.apps.ci-ln-dr6jjit-d5d6b.origin-ci-int-aws.dev.rhcloud.com
Service:      svc (serving.knative.dev/v1alpha1)

Traffic Targets:  
  100%  @latest (svc-fkvpz-1)

Conditions:  
  OK TYPE                  AGE REASON
  ++ Ready                 10m 
  ++ AllTrafficAssigned    10m 
  ++ IngressReady          10m 

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 7, 2020
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@navidshaikh: 1 warning.

Details

In response to this:

/lint

Fixes #205

Proposed Changes

  • Keeps the machine readable output
  • Align the command description text
  • Add simple e2e test in basic workflow test

Default output:

➜  client git:(pr/describe-route) ./kn route describe foo
Name:       foo
Namespace:  default
Age:        1d
URL:        http://foo.default.example.com

Owner References:  
 Service:  foo

Traffic Targets:  
  60%  foo-tcvhr-4
  40%  foo-rnlnj-3 #v3
       URL:  http://v3-foo.default.example.com

Conditions:  
 OK TYPE                  AGE REASON
 ++ Ready                  1d 
 ++ AllTrafficAssigned     1d 
 ++ IngressReady           1d 

Verbose output:

➜  client git:(pr/describe-route) ./kn route describe svc -v  
Name:         svc
Namespace:    default
Labels:       serving.knative.dev/service=svc
Annotations:  serving.knative.dev/creator=minikube-user
             serving.knative.dev/lastModifier=minikube-user
Age:          1d
URL:          http://svc.default.example.com

Owner References:  
 Service:  svc (serving.knative.dev/v1alpha1)

Traffic Targets:  
 100%  @latest (svc-qxdyq-5)

Conditions:  
 OK TYPE                  AGE REASON
 ++ Ready                  1d 
 ++ AllTrafficAssigned     1d 
 ++ IngressReady           1d 

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.

Comment thread pkg/kn/commands/route/describe.go Outdated
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 7, 2020
@navidshaikh
Copy link
Copy Markdown
Contributor Author

/lint

Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@navidshaikh: 0 warnings.

Details

In response to this:

/lint

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.

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 7, 2020

@navidshaikh there's a compile error:

# knative.dev/client/test/e2e [knative.dev/client/test/e2e.test]
test/e2e/route_test.go:79:22: (*e2eTest).routeDescribe redeclared in this block
	previous declaration at test/e2e/basic_workflow_test.go:148:6

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 7, 2020

The flaky test should be fixed with #644

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 7, 2020

/retest

Copy link
Copy Markdown
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

looks good (as always ;-) but I would not output an owner reference in general: Print out a service if attached or nothing (see inline).

Otherwise, some minor nits.

Comment thread docs/cmd/kn_revision_describe.md Outdated
Comment thread pkg/kn/commands/route/describe.go Outdated
Comment thread pkg/kn/commands/route/describe.go Outdated
Comment thread pkg/kn/commands/source/binding/describe.go Outdated
@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 7, 2020

/retest

Copy link
Copy Markdown
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

LGTM

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maximilien, navidshaikh

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [maximilien,navidshaikh]

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

 - Keeps the machine readable output
 - Align the command description text, check for single argument, reported error messages and unit tests in service, revision, route, source binding describe commands
@navidshaikh navidshaikh force-pushed the pr/describe-route branch 2 times, most recently from 20e77bf to 3bf2396 Compare February 10, 2020 05:48
@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 10, 2020

/retest

@navidshaikh
Copy link
Copy Markdown
Contributor Author

/retest

boskos

Comment thread pkg/kn/commands/route/describe.go Outdated
Copy link
Copy Markdown
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

looks good to me with a minor question whether to alway sprint a "Service"

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 10, 2020

/retest

@knative-metrics-robot
Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/kn/commands/route/describe.go 78.3% 89.5% 11.2
pkg/kn/commands/service/describe.go 80.0% 79.8% -0.2

@navidshaikh
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 10, 2020

/retest

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Feb 10, 2020

thanks !

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2020
@knative-prow-robot knative-prow-robot merged commit 15dec58 into knative:master Feb 10, 2020
@navidshaikh navidshaikh deleted the pr/describe-route branch February 10, 2020 18:13
dsimansk pushed a commit to dsimansk/client that referenced this pull request Apr 22, 2025
This PR contains the following updates:

| Package | Change | Notes |
|---|---|---|
| quay.io/konflux-ci/tekton-catalog/task-build-image-index | `4d5ab47`
-> `70f2fe8` | |
| quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta |
`57a4a8b` -> `b9e9209` | |
| quay.io/konflux-ci/tekton-catalog/task-clair-scan | `712afcf` ->
`7c73e2b` | |
| quay.io/konflux-ci/tekton-catalog/task-clamav-scan | `62c835a` ->
`11b1684` | |
| quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check |
`5d63b92` -> `eb8136b` | |
| quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta | `88367f7` ->
`0761f97` | |
| quay.io/konflux-ci/tekton-catalog/task-init | `38660e6` -> `aac8127` |
|
| quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta |
`6ad0ae8` -> `c4f87c4` | |
| quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta |
`a591675` -> `57b3262` | |
| quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta | `0.3`
-> `0.4` |
:warning:[migration](https://redirect.github.com/redhat-appstudio/build-definitions/blob/main/task/sast-snyk-check-oci-ta/0.4/MIGRATION.md):warning:
|
| quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta |
`0.1` -> `0.2` |
:warning:[migration](https://redirect.github.com/redhat-appstudio/build-definitions/blob/main/task/sast-unicode-check-oci-ta/0.2/MIGRATION.md):warning:
|
| quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta | `f0e6c6f`
-> `82d5951` | |

---

### Configuration

📅 **Schedule**: Branch creation - "after 5am on saturday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

To execute skipped test pipelines write comment `/ok-to-test`.

This PR has been generated by
[MintMaker](https://redirect.github.com/konflux-ci/mintmaker) (powered
by [Renovate Bot](https://redirect.github.com/renovatebot/renovate)).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNTguMC1ycG0iLCJ1cGRhdGVkSW5WZXIiOiIzOS4xNTguMC1ycG0iLCJ0YXJnZXRCcmFuY2giOiJyZWxlYXNlLXYxLjE2IiwibGFiZWxzIjpbXX0=-->

Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux-kflux-prd-rh02[bot] <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com>
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 Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement kn route describe command

6 participants