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

enhancement: sort objects to solve out-of-order output #2862

Closed

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented May 23, 2019

Signed-off-by: yeya24 yb532204897@gmail.com

Ⅰ. Describe what this PR did

It is a small enhancement. I found that some commands such as pouch network ls or pouch volume ls will produce some outputs with different orders. We should sort these output in the code of cli as docker cli does.

Here is an example with different output:

root@cmzppppp:~# pouch network ls 
NETWORK ID   NAME     DRIVER   SCOPE
55ce21361b   bridge   bridge   local
d7026299ce   host     host     local
fd34017f24   none     null     local
root@cmzppppp:~# pouch network ls 
NETWORK ID   NAME     DRIVER   SCOPE
fd34017f24   none     null     local
55ce21361b   bridge   bridge   local
d7026299ce   host     host     local

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot
Copy link
Collaborator

We found this is your first time to contribute to pouch, @yeya24
👏 We really appreciate it.
Just remind that you have read the contribution guide: https://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md
If you didn't, you should do that first. If done, welcome again and please enjoy hacking! 🍻

@CLAassistant
Copy link

CLAassistant commented May 23, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #2862 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2862      +/-   ##
==========================================
- Coverage   69.09%   69.09%   -0.01%     
==========================================
  Files         285      285              
  Lines       17844    17844              
==========================================
- Hits        12330    12329       -1     
+ Misses       4114     4113       -1     
- Partials     1400     1402       +2
Flag Coverage Δ
#criv1alpha2_test 39.02% <ø> (+0.01%) ⬆️
#integration_test_0 36.6% <ø> (+0.03%) ⬆️
#integration_test_1 35.36% <ø> (-0.4%) ⬇️
#integration_test_2 36.66% <ø> (+0.19%) ⬆️
#integration_test_3 35.4% <ø> (-0.05%) ⬇️
#node_e2e_test 34.76% <ø> (-0.02%) ⬇️
#unittest 28.53% <ø> (ø) ⬆️
Impacted Files Coverage Δ
daemon/mgr/container.go 59.72% <0%> (-0.63%) ⬇️
cri/v1alpha2/cri.go 68.81% <0%> (-0.26%) ⬇️
ctrd/container.go 54.3% <0%> (+0.38%) ⬆️
ctrd/supervisord/daemon.go 50.67% <0%> (+1.35%) ⬆️
pkg/streams/utils.go 91.66% <0%> (+2.38%) ⬆️

cli/network.go Outdated Show resolved Hide resolved
cli/volume.go Outdated Show resolved Hide resolved
cli/volume.go Show resolved Hide resolved
@pouchrobot pouchrobot added size/L and removed size/S labels May 25, 2019
@yeya24 yeya24 force-pushed the enhancement/sort-list branch 2 times, most recently from 08a6955 to 96eb44b Compare May 25, 2019 15:43
@yeya24
Copy link
Contributor Author

yeya24 commented May 25, 2019

@ZYecho Hello, can you help me fix circle-ci failure? I don't know why these link is broken. Can you re-trigger this?

cli/network.go Show resolved Hide resolved
@ZYecho
Copy link
Contributor

ZYecho commented May 26, 2019

@ZYecho Hello, can you help me fix circle-ci failure? I don't know why these link is broken. Can you re-trigger this?

I'm not sure I have the rights to re-trigger that, but you can re-push use –no-edit, so that the CI can re-trigger.

test/cli_network_test.go Outdated Show resolved Hide resolved
Signed-off-by: yeya24 <yb532204897@gmail.com>

add testcase for volume listing

Signed-off-by: yeya24 <yb532204897@gmail.com>
@ZYecho
Copy link
Contributor

ZYecho commented May 28, 2019

LGTM

@yeya24
Copy link
Contributor Author

yeya24 commented Aug 30, 2019

Any updates for this PR? Otherwise I will close this.

@yeya24
Copy link
Contributor Author

yeya24 commented Nov 20, 2019

Close this.

@yeya24 yeya24 closed this Nov 20, 2019
@yeya24 yeya24 deleted the enhancement/sort-list branch November 20, 2019 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants