fix(cli): Deprecate color flag#2812
Conversation
cli/cmd/root.go
Outdated
| return err | ||
| } | ||
| if noColor { | ||
| cmd.MarkFlagRequired("log-console") |
There was a problem hiding this comment.
If someone tries to only use --no-color they'll get an error that they need to pass --log-console too, as --no-color doesn't do anything without it
| ### Options | ||
|
|
||
| ``` | ||
| --color string Enable colorized output (on, off, auto) (default "auto") |
There was a problem hiding this comment.
Since we marked the flag as deprecated it's removed from the help, but still works
ea9b842 to
4670c76
Compare
yevgenypats
left a comment
There was a problem hiding this comment.
Giving it a bit more thought, I think we need to skip color all together and only do without colors.
ELT workloads produces tons of logs so no one is really going through them through the terminal.
By disabling color by default I think we will insure the correct behaviour out of the box and prevent confusion and more flags.
I think our CLI is more of very slim worker rather then a UI or something like this so I think it makes sense to avoid colors completely, which causes issues in production environments. wdyt ?
4670c76 to
ff22bf5
Compare
ff22bf5 to
25006d4
Compare
Good point, I kept the deprecation with a message that console logs are always colorless, see 25006d4 |
🤖 I have created a release *beep* *boop* --- ## [1.1.5](cli-v1.1.4...cli-v1.1.5) (2022-10-16) ### Bug Fixes * **cli:** Deprecate color flag ([#2812](#2812)) ([9565195](9565195)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
Related to #2644.
Since the default is to have log color, it makes sense to have a
--no-colorflag instead of--color. I added one in a backwards compatible way. Also I thinkautonever really worked.