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

kn service list is not sorted #324

Closed
steren opened this issue Aug 1, 2019 · 3 comments · Fixed by #330
Closed

kn service list is not sorted #324

steren opened this issue Aug 1, 2019 · 3 comments · Fixed by #330
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@steren
Copy link

steren commented Aug 1, 2019

$ kn version
Version:      v20190731-71c39e8
Build Date:   2019-07-31 10:04:14
Git Revision: 71c39e8
Dependencies:
- serving:    v0.6.0

Expected Behavior

$ kn service list lists services sorted by alphabetical order.

Actual Behavior

$ kn service list does not seem to have any particular sorting.

@steren steren added the kind/bug Categorizes issue or PR as related to a bug. label Aug 1, 2019
@navidshaikh
Copy link
Collaborator

I've built the client from current master and I see that service list is printed in sorted order

15:38 ➜  client git:(master)  kn service create z --image gcr.io/knative-samples/helloworld-go --async
Service 'z' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service create s --image gcr.io/knative-samples/helloworld-go --async
Service 's' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service create b --image gcr.io/knative-samples/helloworld-go --async
Service 'b' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service create a --image gcr.io/knative-samples/helloworld-go --async
Service 'a' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service create az --image gcr.io/knative-samples/helloworld-go --async
Service 'az' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service create ab --image gcr.io/knative-samples/helloworld-go --async
Service 'ab' successfully created in namespace 'default'.

15:39 ➜  client git:(master)  kn service list
NAME   URL   GENERATION   AGE   CONDITIONS   READY     REASON
a            1            13s   0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.
ab           1            4s    0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.
az           1            8s    0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.
b            1            21s   0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.
s            1            27s   0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.
z            1            43s   0 OK / 3     Unknown   OutOfDate : The Route is still working to reflect the latest desired specification.

@steren could you please re-check and probably add a sample output ?

/cc @daisy-ycguo

@rhuss
Copy link
Contributor

rhuss commented Aug 6, 2019

@navidshaikh I don't think it would harm if we had a client-side sorting, too. E.g. it could be that one Knative implementation (e.g. in Kubernetes) does a server-side sorting and another (e.g. Cloud Run on Appengine) does not (i guess its the latter for @steren ).

To be safe we have to sort client-side (as a sort order is not part of the Knative serving spec anyway).

@navidshaikh
Copy link
Collaborator

@rhuss ah! right. Makes sense. 👍
/cc @daisy-ycguo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants