-
Notifications
You must be signed in to change notification settings - Fork 286
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
helm-diff doesn't include values from stdin for helm3 version #340
Conversation
60a6787
to
cd7d59b
Compare
@mumoshu applied your changes. thanks! |
cmd/helm3.go
Outdated
if _, err := tmpfile.Write(bytes); err != nil { | ||
return nil, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this change actually work for you?
I'm afraid we're missing tmpfile.Close()
here, that I think is required to ensure writes are persisted. We should call Close()
regardless of the write err is nil or not so wrapping it into another function call would be easier to read.
See writeExistingValues
for your reference!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it worked pretty well. I got your point regarding closing the tempfile. tbh i don't want to overcomplicate it by adding one more function, so just added one more if condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for your effort!
9d434e4
to
ae2958a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate your contribution
Hi,
Unfortunately previous PR was close as state, but this fix is still needed, so I've created a new one. Please review it once you have time. thanks!
There is an issue in helm-diff for helm3 version, it doesn't include values from stdin. For helm2 it works as expected.
Current behavior:
Expected behavior with applied fix: