With the introduction of NewResponsiveWriter, oadm diagnostics no longer has color in its output, and long lines are wrapped which ruins the indentation scheme. I would prefer to just bypass the new writer for actual diagnostic output and continue using the old one. I'm not familiar enough with the change to be sure but it sounds like from https://github.com/openshift/origin/pull/11680 I can just pass os.Stdout instead of the writer that's used for the command. The command can continue to pass the new writer to cobra and just use os.Stdout for intended output. BTW, the reason color is turned off is that the new writer is not a terminal, according to IsTerminal https://github.com/openshift/origin/blob/65a46c858582ee166ad183dda06069be1a40db07/pkg/diagnostics/log/text.go#L29-L32 - in case that matters anywhere else, you might want to have NewResponsiveWriter implement whatever it needs to in order to be accurately considered a terminal based on the stdout.
Fixed in https://github.com/openshift/origin/pull/12023
Verify passed on origin, the cli is shown with colors. # openshift version openshift v1.5.0-alpha.0+e115e25-81 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 However, the fix was not included by the latest puddle of OCP, repro on: # openshift version openshift v3.4.0.29+ca980ba kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 Keep this bz ON_QA until PR is merged in OCP.
We're not planning a backport of this fix to OCP 3.4 given the "low" severity. You should only expect for this in 3.5 as specified in "Target Release". Dan and/or Luke, feel free to disagree.
Set to modified according to comment #3.
This has been merged into ocp and is in OCP v3.5.0.7 or newer.
Verified passed on OCP 3.5.0 , the cli is shown with colors: # openshift version openshift v3.5.0.7+390ef18 kubernetes v1.5.2+43a9be4 etcd 3.1.0-rc.0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0884