You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.Release.Revision not working correctly in diff #253
I just had a quick look and it seems that the issue isn't really related to the plugin itself. helm-diff relies on the template function from helm (see this)
I ran a quick test and I was able to reproduce. All helm template commands are returning 1 where .Release.Revision is defined
Helm versions I used for this test: 3.4.1 and 3.5.0
The template command uses the install method to generate the templates. This method sets the revision to 1 as it thinks it's the first deployment of the release
Ok, so apparently helm template works as intended.
One way to fix this could be replacing the command used to render templates, so we use upgrade --dry-run instead of template
Reacted by Jean-Philippe Martin, Alex Ianus and Josh Woodcock
@strainovic Thanks! Gotcha. I was rather in an impression that that kind of inactivity means maturity of the project :)
I use helm-diff and helmfile and haven't seen big blockers for a year or so.
I occasionally review issues and pull requests but most of the time (1) they look like not necessities but nice-to-haves, good workarounds exist, or (2)no preceding issues are written to clarify the goals of the changes so I'm unsure if I should merge it or (3)have no tests or manual test report so I'm not sure if I can safely merge it or (4) I responded/asked question(s) but no one answers, or (5)many people talk about big dreams but no one actually contributes code 😢
Regarding this issue, I already took some time to test helm upgrade --dry-run myself, wrote my thought and concern in #253 (comment), and I'm now awaiting replies and feedbacks.
And I thought it's reasonable and forgivable to wait a few weeks until anyone tries to contribute, as this is annoying but not critical as you can just omit .Release.Revision from the chart template... I actually don't understand why one wants to have it in k8s resource labels.
a lot of things have been changed since then.
If you've specific/critical things helm-diff needs to address, please feel free to raise issues.
I can't promise to do everyone's all works myself, but I'll try keeping my best to maintain the project!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@mumoshu thanks for thinking about this. In my opinion risky features should be rolled out with a feature flag. Eg --use-experimental-upgrade and or HELM_DIFF_USE_EXPERIMENTAL_UPGRADE_FOR_DIFF
I'm not a great go programmer but this issue is really plaguing me. I will literally pay money for someone to fix this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, in my current position we are using are setting a label with .Release.Revision for selecting which resources we should way for, since we rely on helm install for deploying and need to make sure they are healthy on our pipelines.
So if diff could return the correct revision, would be great to not have a misleading output.
Activity
david92rl commentedon Jan 19, 2021
I just had a quick look and it seems that the issue isn't really related to the plugin itself.
helm-diff relies on the template function from helm (see this)
I ran a quick test and I was able to reproduce. All
helm templatecommands are returning 1 where.Release.Revisionis definedHelm versions I used for this test: 3.4.1 and 3.5.0
david92rl commentedon Jan 19, 2021
And.... this is why:
The template command uses the install method to generate the templates. This method sets the revision to 1 as it thinks it's the first deployment of the release
david92rl commentedon Jan 20, 2021
Ok, so apparently helm template works as intended.
One way to fix this could be replacing the command used to render templates, so we use
upgrade --dry-runinstead oftemplateaianus commentedon Feb 16, 2021
Any update on whether helm-diff will switch to
upgrade --dry-run?strainovic commentedon Mar 29, 2021
It is very annoying behavior. We have one-time jobs for database migrations and it is triggered each time, no matter if we changed something on not.
As far as I can see, helm-diff is not maintained actively?
mumoshu commentedon May 18, 2021
@strainovic Hey! What is the point to calling it not maintained actively? Are you willing to contribute?
mumoshu commentedon May 18, 2021
I've never realized
upgrade --dry-runcan be used for the replacement tohelm template!As we need to handle diffing on first install too, probably we'd need to use
helm upgrade --install --dry-run?mumoshu commentedon May 18, 2021
I was blindly beliving
helm template --is-upgradewe're currently using would magically handle the revision number as well, but apparently not.helm-diff/cmd/helm3.go
Line 134 in 0882d8c
I'm not fully sure if it's safe to fully migrate helm-diff to use
helm upgrade --dry-runinstead ofhelm template.Should we add some envvar to toggle helm-diff to use
upgrade --dry-runinhelm-diff/cmd/helm3.go
Line 141 in 0882d8c
strainovic commentedon May 27, 2021
Hi @mumoshu, I told you that as I haven't seen any commit almost for a year, while a lot of things have been changed since then.
My knowledge in Golang is very limited, but if I find any spot where I can contribute, I would do it :)
Thank you @mumoshu for your amazing work!
mumoshu commentedon May 27, 2021
@strainovic Thanks! Gotcha. I was rather in an impression that that kind of inactivity means maturity of the project :)
I use helm-diff and helmfile and haven't seen big blockers for a year or so.
I occasionally review issues and pull requests but most of the time (1) they look like not necessities but nice-to-haves, good workarounds exist, or (2)no preceding issues are written to clarify the goals of the changes so I'm unsure if I should merge it or (3)have no tests or manual test report so I'm not sure if I can safely merge it or (4) I responded/asked question(s) but no one answers, or (5)many people talk about big dreams but no one actually contributes code 😢
Regarding this issue, I already took some time to test
helm upgrade --dry-runmyself, wrote my thought and concern in #253 (comment), and I'm now awaiting replies and feedbacks.And I thought it's reasonable and forgivable to wait a few weeks until anyone tries to contribute, as this is annoying but not critical as you can just omit
.Release.Revisionfrom the chart template... I actually don't understand why one wants to have it in k8s resource labels.If you've specific/critical things helm-diff needs to address, please feel free to raise issues.
I can't promise to do everyone's all works myself, but I'll try keeping my best to maintain the project!
stale commentedon Aug 28, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
cmd/helm3: use upgrade dry-run in place of template
helm-plugins.diff: use upgrade dry-run in place of template
helm-plugins.diff: use upgrade dry-run in place of template
woodcockjosh commentedon Sep 29, 2021
/please fix /pretty-please fix
woodcockjosh commentedon Sep 29, 2021
@mumoshu thanks for thinking about this. In my opinion risky features should be rolled out with a feature flag. Eg
--use-experimental-upgradeand orHELM_DIFF_USE_EXPERIMENTAL_UPGRADE_FOR_DIFFI'm not a great go programmer but this issue is really plaguing me. I will literally pay money for someone to fix this.
stale commentedon Jan 8, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
feat: HELM_DIFF_USE_UPGRADE_DRY_RUN
feat: HELM_DIFF_USE_UPGRADE_DRY_RUN (#330)
Prometej commentedon Jan 12, 2023
/please fix /pretty-please fix
lucasslima commentedon Jul 23, 2024
Hey, in my current position we are using are setting a label with
.Release.Revisionfor selecting which resources we should way for, since we rely onhelm installfor deploying and need to make sure they are healthy on our pipelines.So if diff could return the correct revision, would be great to not have a misleading output.
atalakey4work commentedon Jun 19, 2025
@mumoshu any update on this as this is still an issue as of today?