Velero: Colored output

Created on 26 Nov 2018  路  10Comments  路  Source: vmware-tanzu/velero

This is a branch off of #987.

We should decide if we want colored output and, if so, which output should be colored vs not.

AreCLI EnhancemenUser Good first issue Help wanted

Most helpful comment

Hey, we added few colors to Phase and Validation errors field for backups. Also, we made the name to be in bold to catch an eye if you're viewing multiple backups.

Here are the examples of completed and failed backups:

Screen Shot 2021-01-13 at 3 10 08 PM
Screen Shot 2021-01-13 at 3 10 26 PM

Let us know what do you think.

All 10 comments

I suggest to color the output of Phase and Validation error to red when the operation has been failed and if the operation has been succeeded, the color will be green.

What do you think?
cc @rosskukulinski @ncdc @carlisia

It seems reasonable to me, but I'm not sure what the current best practices are in terms of accessibility for red/green color deficiency people.

It would probably make sense to add something like --colorized=false or something

Also if it's not a TTY, it should not display the escape codes for colorization (easy to do)

@nzoueidi I'm on board with that, good sugestion.

Please keep in mind: https://github.com/heptio/velero/issues/987#issuecomment-441680773

Hey @nzoueidi, did you still want to work on this?

Hey @carlisia, is this issue still ready to be worked on?

It sounds like the asks are:

  • In the output of describe, color the output of Phase and Validation error red when the operation fails and green when it succeeds.
  • Only output the colorizing escape codes when writing to a TTY.
  • Add a command-line argument --colorized=false; do not output color when that's set to false.

My interpretation of this issue is that the goal is to colorize the output of all describe commands, even though the issue that inspired this was for backup describe.

Is all that correct?

cc @kauana

Hi @astrieanna that is entirely accurate. And if you run velero describe you will see the 3 commands that use it. Thank you!

Hey, we added few colors to Phase and Validation errors field for backups. Also, we made the name to be in bold to catch an eye if you're viewing multiple backups.

Here are the examples of completed and failed backups:

Screen Shot 2021-01-13 at 3 10 08 PM
Screen Shot 2021-01-13 at 3 10 26 PM

Let us know what do you think.

Hey @mike1808, this LGTM. You may go ahead with it.

Was this page helpful?
0 / 5 - 0 ratings