Bug 1304866

Summary: oc get projects should return sorted list of projects
Product: OpenShift Container Platform Reporter: Vikas Laad <vlaad>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED WONTFIX QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-04 22:07:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vikas Laad 2016-02-04 20:16:51 UTC
Description of problem:
Create multiple projects and try to run go get projects, often list displayed is not sorted by name. It should be sorted by name.

Version-Release number of selected component (if applicable):


How reproducible:
Often

Steps to Reproduce:
1. oc new-project aaa
2. oc new-project bbb
3. oc new-project ccc
4. oc new-project ddd
5. oc new-project eee
6. oc get projects

Actual results:
Often the result returned is not sorted by name
NAME      DISPLAY NAME   STATUS
ccc                      Active
ddd                      Active
eee                      Active
aaa                      Active
bbb                      Active


Expected results:
Result should be always sorted by name
NAME      DISPLAY NAME   STATUS
aaa                      Active
bbb                      Active
ccc                      Active
ddd                      Active
eee                      Active


Additional info:

Comment 1 Fabiano Franz 2016-07-04 22:07:27 UTC
The output of `get` isn't supposed to be deterministic by design. The --sort-by flag is provided to allow sorting. Also, `oc projects` is a more end-user targeted command to list project, and displays projects sorted by name.