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

Adds more columns in revision get command output #70

Closed
wants to merge 25 commits into from

Conversation

navidshaikh
Copy link
Collaborator

Added few columns in the output as below

kn revision list
NAME       SERVICE   AGE   TRAFFIC
s1-ftc7f   s1        21h   100% -> s1.default.example.com
s2-8pb69   s2        21h   100% -> s2.default.example.com

@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 12, 2019
@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 12, 2019
@navidshaikh
Copy link
Collaborator Author

This PR is rebased onto #56 , so that PR #56 should go in first.

@navidshaikh navidshaikh force-pushed the fix-41 branch 3 times, most recently from 2970e9f to edacc08 Compare April 15, 2019 10:36
@cppforlife
Copy link

/ok-to-test

@knative-prow-robot knative-prow-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 15, 2019
@knative-prow-robot
Copy link
Contributor

@navidshaikh: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-knative-client-go-coverage 752d386 link /test pull-knative-client-go-coverage
pull-knative-client-integration-tests 752d386 link /test pull-knative-client-integration-tests
pull-knative-client-build-tests 752d386 link /test pull-knative-client-build-tests
pull-knative-client-unit-tests 752d386 link /test pull-knative-client-unit-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.

}

func TestRevisionListDefaultOutput(t *testing.T) {
foo_label := make(map[string]string)

Choose a reason for hiding this comment

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

some more camel casing needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

t.Fatal(err)
}
// each line's tab/spaces are replaced by comma
expected := []string{"NAME,SERVICE,AGE,TRAFFIC",

Choose a reason for hiding this comment

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

is there a test with multiple routes for one revision?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@cppforlife: updated tests to reflect same

GroupName = "serving.knative.dev"

//ConfigurationLabelKey indicates the Configuration revision is created from.
ConfigurationLabelKey = GroupName + "/service"

Choose a reason for hiding this comment

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

is this something we can pull in from client package instead of duplicating here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: navidshaikh
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: sixolet

If they are not already assigned, you can assign the PR to them by writing /assign @sixolet in a comment when ready.

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

@navidshaikh navidshaikh changed the title Adds more columns in revision list command output Adds more columns in revision get command output Apr 24, 2019
 This commit adds basic details about service in
 service list command output.
 text/tabwriter is used to print columns on stdout.

 Fixes #knative#40
 This commit adds AGE column representing the resources' age
 in human readable format calculated from CreationTimestamp
 field of service.
 Now if list is empty, we print "No resources found." string.
 This commit updates the respective unit test.
 Doesn't check the argument length after `service get` to leave
 room for filtering based on argument.
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 1, 2019
@navidshaikh
Copy link
Collaborator Author

Closing the PR in favor of PR #90

@navidshaikh navidshaikh closed this May 3, 2019
@navidshaikh navidshaikh reopened this May 9, 2019
@navidshaikh
Copy link
Collaborator Author

Closing in favor of #97

@navidshaikh navidshaikh closed this May 9, 2019
@navidshaikh navidshaikh deleted the fix-41 branch November 18, 2019 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants