Skip to content

Fix output from oc get clusterPolicy is hard to read - #12354

Closed
shiywang wants to merge 1 commit into
openshift:masterfrom
shiywang:fix_oc_get_hard_read
Closed

shiywang wants to merge 1 commit into
openshift:masterfrom
shiywang:fix_oc_get_hard_read

Conversation

@shiywang

Copy link
Copy Markdown

fix problem #12303

@liggitt

liggitt commented Dec 28, 2016

Copy link
Copy Markdown
Contributor

I thought the output of oc get * was supposed to be single-line

@shiywang

Copy link
Copy Markdown
Author

@liggitt Do you mean this #12303 issue is a feature instead of a problem? should I close this pr ?

@liggitt

liggitt commented Dec 28, 2016

Copy link
Copy Markdown
Contributor

I'm not sure what the solution is, but I don't think multiline output here is correct. Perhaps we cannot display all the role names in this printer

@shiywang shiywang changed the title output from oc get clusterPolicy is hard to read Fix output from oc get clusterPolicy is hard to read Dec 28, 2016
@shiywang

Copy link
Copy Markdown
Author

@fabianofranz Do you have any advice ?

@pweil-

pweil- commented Dec 30, 2016

Copy link
Copy Markdown

@openshift/cli-review

@shiywang
shiywang force-pushed the fix_oc_get_hard_read branch from de6be99 to 84b85ad Compare January 1, 2017 12:26
@juanvallejo

Copy link
Copy Markdown
Contributor

@liggitt

I'm not sure what the solution is, but I don't think multiline output here is correct. Perhaps we cannot display all the role names in this printer

Would it make sense to maybe display the truncated list of roles by default, and introduce a new flag that would force the entire list to display? (We could also only display the truncated list in the human readable printer and have users use -o yaml or -o json to view the full list) WDYT?

cc @fabianofranz

@liggitt

liggitt commented Jan 3, 2017

Copy link
Copy Markdown
Contributor

I don't think truncation is good. We have the wide flag, right? That seems as good a flag as any if we want to conditionally include a potentially massive column

@shiywang

shiywang commented Jan 3, 2017 •

Copy link
Copy Markdown
Author

@liggitt @juanvallejo I use oc get clusterPolicy -o wide, the outputs still have the same problem. Do you mean we should check options.Wide to treat them differently ?

@liggitt

liggitt commented Jan 3, 2017

Copy link
Copy Markdown
Contributor

Do you mean we should check options.Wide to treat them differently ?

Exactly. Possibly include the role column when outputting in wide mode, otherwise just include something like the number of roles?

@fabianofranz

Copy link
Copy Markdown
Contributor

Only include the roles column when in -o wide mode (will still have the problem, but that's ok in the wide output), in normal mode make it display the number of roles, and make sure it's displayed nicely in oc describe clusterpolicy <name>.

@shiywang

shiywang commented Jan 4, 2017 •

Copy link
Copy Markdown
Author

@fabianofranz @juanvallejo @liggitt , will prepare a pr for upstream, will add an wideColumns parameter for func (h *HumanReadablePrinter) Handler(columns []string, printFunc interface{})

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Jan 6, 2017
Automatic merge from submit-queue (batch tested with PRs 39132, 39428)

Move wideHeader [] strings into handlerEntry

To adress this problem: openshift/origin#12354, make `-o wide` more flexible to be used by OpenShift
@shiywang
shiywang force-pushed the fix_oc_get_hard_read branch from 84b85ad to 936c43d Compare January 9, 2017 10:55
@shiywang

shiywang commented Jan 9, 2017

Copy link
Copy Markdown
Author

@liggitt @juanvallejo @fabianofranz I copied the upstream code to our repo by file, seems it can not pass the compiled, I also use git patch\apply, it doesn't work either (not base on lastest commit), Do we have a better way to copy the upstream code to our code: vendor/k8s.io/kubernetes/pkg/

@0xmichalis

Copy link
Copy Markdown
Contributor

@shiywang the commit message for the upstream commit needs to be UPSTREAM: 39428: Move ... Also note that we are not merging upstream commits until the rebase lands.

@shiywang

shiywang commented Jan 9, 2017

Copy link
Copy Markdown
Author

@Kargakis oh, I got it, thanks

@ncdc ncdc changed the title Fix output from oc get clusterPolicy is hard to read [HOLD PENDING REBASE] Fix output from oc get clusterPolicy is hard to read Jan 9, 2017
@ncdc ncdc changed the title [HOLD PENDING REBASE] Fix output from oc get clusterPolicy is hard to read Fix output from oc get clusterPolicy is hard to read Jan 11, 2017
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2017
@shiywang
shiywang force-pushed the fix_oc_get_hard_read branch from 936c43d to dbb0e66 Compare January 17, 2017 06:08
golint change

add columnsWithWide
@shiywang
shiywang force-pushed the fix_oc_get_hard_read branch from dbb0e66 to 94e46b8 Compare January 17, 2017 06:13
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 17, 2017
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2017
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2017
@openshift-bot

Copy link
Copy Markdown
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2017
@shiywang shiywang closed this May 21, 2017
mhan8796 pushed a commit to mhan8796/kubernetes that referenced this pull request Jun 26, 2026
…s_printer

Automatic merge from submit-queue (batch tested with PRs 39132, 39428)

Move wideHeader [] strings into handlerEntry

To adress this problem: openshift/origin#12354, make `-o wide` more flexible to be used by OpenShift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. priority/P2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants