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
Install flag of the Upgrade action is not working on the sdk #7807
Expected result: chart deployed Actual result:Error: release has no deployed releases
It's a rough example, but it seems to be enough for understanding the problem.
Happy to provide repository with minimal but complete code needed for reproduction if there is need for it.
Cause of bug
This happens because install flag logic implemented in “main” package and tightly coupled with cli:
The Install flag on action/upgrade.go does not do an install if the release is not present. See cmd/upgrade.go to see how helm upgrade --install works.
The action's Upgrade.Install flag could definitely use some documentation. That is confusing.
Update: I submitted before explaining. Sorry. Upgrade.Install is just a flag that can be used for asking whether the Upgrade operation was called as a regular upgrade or as an install-or-upgrade. It is informational, and doesn't do anything.
@technosophos, I can see that it works that way but there is two problems with that
To make upgrade --install from go sdk I have to repeat cmd/upgrade.go logic in my application
Like you said, current behavior is confusing and do not align with other actions
I could change the code to respect Install flag and create a PR, but it would be a breaking change. Minor one, but still. If I do create a PR, would it be considered to be a part of helm v3 or it have to be postponed until helm v4?
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Hi, @Nitive - as you may have seen, we added an inline explanation in #7834.
The Helm project does follow strict SemVer so if we are going to make a breaking change, it will be in Helm v4. I'll resolve this issue at this time, and if you decide that working on v4 is something you'd like to do, we'd welcome your participation. Thanks!
Activity
liuming-dev commentedon Mar 25, 2020
helm upgrade --installinstall flag will work when no release exists.Nitive commentedon Mar 25, 2020
@Liuming-tech cli is working fine, the issue is with go sdk usage
technosophos commentedon Mar 28, 2020
The
Installflag onaction/upgrade.godoes not do an install if the release is not present. Seecmd/upgrade.goto see howhelm upgrade --installworks.The
action'sUpgrade.Installflag could definitely use some documentation. That is confusing.Update: I submitted before explaining. Sorry.
Upgrade.Installis just a flag that can be used for asking whether theUpgradeoperation was called as a regular upgrade or as an install-or-upgrade. It is informational, and doesn't do anything.Nitive commentedon Mar 29, 2020
@technosophos, I can see that it works that way but there is two problems with that
upgrade --installfrom go sdk I have to repeatcmd/upgrade.gologic in my applicationI could change the code to respect Install flag and create a PR, but it would be a breaking change. Minor one, but still. If I do create a PR, would it be considered to be a part of helm v3 or it have to be postponed until helm v4?
github-actions commentedon Aug 21, 2020
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
bridgetkromhout commentedon Aug 27, 2020
Hi, @Nitive - as you may have seen, we added an inline explanation in #7834.
The Helm project does follow strict SemVer so if we are going to make a breaking change, it will be in Helm v4. I'll resolve this issue at this time, and if you decide that working on v4 is something you'd like to do, we'd welcome your participation. Thanks!