-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Broken Helm Rollback Command in v3.11.0-rc.1 #11712
Comments
Yikes. Thanks for providing those details. We will attempt to verify the issue. |
I have been able to verify this is happening. A simple script to reproduce.
This is enough to trigger the problem described here. |
I've been able to trace this to #10912 where If you look at the http requests between 3.11.0-rc.1 and 3.10.3 on rollback with |
I have a fix I'm working on. The could should be available for review on Thursday. |
Fixes helm#11712 A change was made that when validation was turned off the Kubernetes packages were building objects as a Table type. This was done for display purposes. When details about the objects was going to be printed as part of helm#10912. This broke rollback, and possibly other functionality, as a Table type was returned in some cases that needed the regular object. This caused things to break silently. The fix involved adding in a new Function (and interface) to query for tables instead of the objects themselves. There was not a clean way to add it to the existing function that covered all cases. A second problem was noticed along the way. When data was output via status as YAML or JSON it was in the form of a table rather than the objects themselves. This did not reflect expectations and did not match the functionality in kubectl. The code was updated to return a table when that was presented and the objects when they are being output for YAML or JSON. The API also supports this handling to SDK users can replicate this functionality. API changes made here were never released. The functions were developed for this release of Helm and only ever appeared in an RC. In this case, they can be changed. Signed-off-by: Matt Farina <matt.farina@suse.com>
Fixes #11712 A change was made that when validation was turned off the Kubernetes packages were building objects as a Table type. This was done for display purposes. When details about the objects was going to be printed as part of #10912. This broke rollback, and possibly other functionality, as a Table type was returned in some cases that needed the regular object. This caused things to break silently. The fix involved adding in a new Function (and interface) to query for tables instead of the objects themselves. There was not a clean way to add it to the existing function that covered all cases. A second problem was noticed along the way. When data was output via status as YAML or JSON it was in the form of a table rather than the objects themselves. This did not reflect expectations and did not match the functionality in kubectl. The code was updated to return a table when that was presented and the objects when they are being output for YAML or JSON. The API also supports this handling to SDK users can replicate this functionality. API changes made here were never released. The functions were developed for this release of Helm and only ever appeared in an RC. In this case, they can be changed. Signed-off-by: Matt Farina <matt.farina@suse.com> (cherry picked from commit 36e18fa)
@bschoenbach https://github.com/helm/helm/releases/tag/v3.11.0-rc.2 is out which fixes the regression. Thank you for catching it and providing details for us to fix it. |
Fixes helm#11712 A change was made that when validation was turned off the Kubernetes packages were building objects as a Table type. This was done for display purposes. When details about the objects was going to be printed as part of helm#10912. This broke rollback, and possibly other functionality, as a Table type was returned in some cases that needed the regular object. This caused things to break silently. The fix involved adding in a new Function (and interface) to query for tables instead of the objects themselves. There was not a clean way to add it to the existing function that covered all cases. A second problem was noticed along the way. When data was output via status as YAML or JSON it was in the form of a table rather than the objects themselves. This did not reflect expectations and did not match the functionality in kubectl. The code was updated to return a table when that was presented and the objects when they are being output for YAML or JSON. The API also supports this handling to SDK users can replicate this functionality. API changes made here were never released. The functions were developed for this release of Helm and only ever appeared in an RC. In this case, they can be changed. Signed-off-by: Matt Farina <matt.farina@suse.com>
Fixes helm#11712 A change was made that when validation was turned off the Kubernetes packages were building objects as a Table type. This was done for display purposes. When details about the objects was going to be printed as part of helm#10912. This broke rollback, and possibly other functionality, as a Table type was returned in some cases that needed the regular object. This caused things to break silently. The fix involved adding in a new Function (and interface) to query for tables instead of the objects themselves. There was not a clean way to add it to the existing function that covered all cases. A second problem was noticed along the way. When data was output via status as YAML or JSON it was in the form of a table rather than the objects themselves. This did not reflect expectations and did not match the functionality in kubectl. The code was updated to return a table when that was presented and the objects when they are being output for YAML or JSON. The API also supports this handling to SDK users can replicate this functionality. API changes made here were never released. The functions were developed for this release of Helm and only ever appeared in an RC. In this case, they can be changed. Signed-off-by: Matt Farina <matt.farina@suse.com>
I am getting the same behavior on helm 3.11 installed on fedora 38 via dnf: The following sequence triggers the issue consistently: $ helm create testchart --> pods and deployments are all gone (deleted) after a rollback!! Manually installing 3.10.3 (https://get.helm.sh/helm-v3.10.3-linux-amd64.tar.gz) currently solves the problem (as in rollback works properly) $ helm version (install via dnf on Fedora 38) $ dnf info helm $ kubectl version |
Output of
helm version
:version.BuildInfo{Version:"v3.11.0-rc.1", GitCommit:"9d8fee155bd7e7d3c1390f4076d9271a1147dce5", GitTreeState:"clean", GoVersion:"go1.18.9"}
Output of
kubectl version
:Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.12", GitCommit:"c6939792865ef0f70f92006081690d77411c8ed5", GitTreeState:"clean", BuildDate:"2022-09-21T12:13:07Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): On-Premise nutanix hardware
Problem:
helm rollback cmd to latest release breaks the deployment. Hence, corresponding deployments are deleted...everythins is gone after rollback. Using older helm version v3.10.3 works picture perfect.....Below you will find the trerminal output
/$:~/helm_3.11/linux-amd64$ helm history rost-webui -n dns
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
...
258 Wed Jan 11 09:28:02 2023 superseded rost-webui-0.1.0 prod-8f7e8a0e-742694699 Upgrade complete
/$ kubectl get pods -n dns
NAME READY STATUS RESTARTS AGE
rost-webui-764f4d6c84-6xdkx 1/1 Running 0 9m1s
/$:~/helm_3.11/linux-amd64$ ./helm rollback rost-webui 258 -n dns
Rollback was a success! Happy Helming!
/$:~/helm_3.11/linux-amd64$ helm history rost-webui -n dns
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
...
258 Wed Jan 11 09:28:02 2023 superseded rost-webui-0.1.0 prod-8f7e8a0e-742694699 Upgrade complete
259 Wed Jan 11 09:34:07 1025 superseded rost-webui-0.1.0 prod-8f7e8a0e-742694699 Rollback to 258
/$ kubectl get pods -n dns
No resources found in dns namespace.
The text was updated successfully, but these errors were encountered: