-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing colors in diff #2043
Comments
@z0rc Ah good catch. Probably helm-diff should have an option to force enabling color, and external tools like helmfile that calls helm-diff should specify that force-color flag when it detects a terminal. WDYT? |
@mumoshu proposed logic look correct, just need to take into account |
Merged databus23/helm-diff#344 on helm-diff. The next action item would be to enhance helmfile to set HELM_DIFF_COLOR appropriately. |
Seems like HELM_DIFF_COLOR=true dont working in CICD env (without control terminal) with helm-diff-3.3.2. I tried to "export TERM=xterm256" or alike, but it has no effect. |
@evgkrsk |
Oops, sorry, my fault. Waiting for helm-diff release... |
@mumoshu Would it be possible to create a new release on databus23/helm-diff to have colors again? Really appreciated :-) |
I would prefer that this can be done via helmDefaults. there is an updated release databus23/helm-diff |
@frank-berlin I hear you, but I have never intended to include operational concerns into helmDefaults, so that everything included in helmfile.yaml can be entirely about releases. Probably we'll keep that, until there's any serious design discussion that convinces me. |
As @frank-berlin has kindly shared, the latest helm-diff release should work well with |
I don't see this.
Running Running Running Running Is this expected resolution? Additionally is it possible to make patch release of helmfile docker image, which includes updated helm-diff? |
Turns out I forgot the fact that it only has Lines 1710 to 1712 in debd3c0
That said, |
@mumoshu any chance to restore Also helmfile's |
@z0rc I don't have much slack in my life these days to allow me to work on it soon, but anyway, yeah I'm convinced that we should address this in helmfile side! Almost certainly we'd need to do the term detection thing that formerly done only in helm-diff: So that helmfile is able to configure |
Is there any workaround we can use now?
This does not work for me with helmdiff version
|
Hey everyone! |
A colleague complained about this last week, and I think he had the latest version installed. But I didn't double check, so I'm not sure... |
@lindhe Thanks! (Please feel free to submit a PR as always) Anyway, a known workaround would be to explicitly set |
Yes, this is still needed. |
Yeah. That works for me, but my colleague claims it didn't work for him. I'll double check if he did it right. EDIT: Nope. He had a typo. It works. |
Since helm-diff has added an ability to auto-detect the term to decide if it should output with color or not, helmfile had been defaulted to no-color. This resoloves that, by adding a term-detection logic that is same as helm-diff. As a part of this work, I have also implemented a new global flag `--color`, which is used for forcing color without relying on the term-detection logic implemented in helmfile or explicitly setting the HELM_DIFF_COLOR envvar. I hope it is useful for folks. Ref roboll/helmfile#2043 Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Since helm-diff has added an ability to auto-detect the term to decide if it should output with color or not, helmfile had been defaulted to no-color. This resoloves that, by adding a term-detection logic that is same as helm-diff. As a part of this work, I have also implemented a new global flag `--color`, which is used for forcing color without relying on the term-detection logic implemented in helmfile or explicitly setting the HELM_DIFF_COLOR envvar. I hope it is useful for folks. Ref roboll/helmfile#2043 Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
Fixed via helmfile/helmfile#24 |
After upgrading
helm-diff
to 3.2.0 or newer, runninghelmfile diff
produces output with no colors when running in regular terminal (not CI,TERM=xterm-256color
). In the same time runninghelm diff
in the same terminal produces colors as expected.My guess is that after databus23/helm-diff#240, there is check https://github.com/databus23/helm-diff/blob/master/cmd/root.go#L47-L50 which always true due to how
helmfile
executeshelm-diff
.helm-diff
's stdout is captured/redirected in separate file descriptor which isn't considered as terminal.I tried passing running
helmfile --no-color=false diff
, but it didn't enable color in diff output. Only way to enforce colors I found washelmfile diff --args="--no-color=false"
, but it's problematic in way where this arg passed tohelm list
execution and fails there.The text was updated successfully, but these errors were encountered: