-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add kn route list command #202
Conversation
Hi @navidshaikh. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
@navidshaikh: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
/ok-to-test |
/ok-to-test |
0687da8
to
18da0ac
Compare
Failure prompts
will add more test coverage for pkg/kn/commands/route/list_flags.go |
/test pull-knative-client-integration-tests |
1 similar comment
/test pull-knative-client-integration-tests |
e2e tests are failing with
The traffic percent and revision name altogether is not showing up (I added a time.Sleep as well before executing route list command, age is 21s), also conditions for route are |
Let us work on #54 now and get it integrated, then hopefully we can get rid a bit of the flakiness. |
641079e
to
172bebd
Compare
/assign @rhuss @cppforlife @maximilien @sixolet |
} | ||
|
||
func calculateTraffic(targets []servingv1alpha1.TrafficTarget) string { | ||
var traffic string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems that we keep on overriding traffic string in a loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cppforlife: yup but with an update only if there is traffic split available
traffic = fmt.Sprintf("%s, %d%% -> %s", traffic, target.Percent, target.RevisionName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im still confused, should it be traffic += ...
instead since there could be multiple targets?
"k8s.io/cli-runtime/pkg/genericclioptions" | ||
) | ||
|
||
func TestRoutListFlags(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think we need this test. it's too close to implementation so it doesnt add confidence that this object is correct. additionally route list flags object is used in the command test, so it gets tested there indirectly in a more resilient manner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this file's test, as without tests pk/kn/commands/route/list_flags.go
was failing CI go test coverage threshold (must be > 50%).
should I be testing this in some other way?
172bebd
to
d7bbab4
Compare
/test pull-knative-client-integration-tests |
Actually one last thing before lgtm. Can you squash the 14 commits into one? Unless you have good reason to have so many. Otherwise, looks good to me :) |
The bot should do this while merging to master, for eg: check this commit squashed into one from 9. |
/lgtm |
Thanks, great to know. Best 🍻 |
Tru, but you will get the sum of all commit messages (even when you did some extra rounds which then has been reverted). In that case you can still squash on your own to have a clean single commit message, too. |
d7bbab4
to
175d9b5
Compare
- Accepts an argument name for listing particular route - Enables the machine readable output flags - Updates docs for kn route command group - Adds unit tests for route command group and route list - Adds integration tests for route list in basic workflow test - Updates tests and getting namespace - Adds more unit tests for code in pkg/kn/commands/route/list_flags.go - Adds route list command in smoke tests - Updates vendor/modules.txt - Clean up imports - Addresses review comments - replaces knative to Knative - uses reflect.DeepEqual for slice comparison - removes few code comments - removes irrelevant tests modifications from the PR
175d9b5
to
45a8044
Compare
The following is the coverage report on pkg/.
|
/lgtm (re-adding @maximilien approval after squashing) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh, rhuss 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 |
Fixes #201
Example:
Help section