kubeapps icon indicating copy to clipboard operation
kubeapps copied to clipboard

Missing versions in Helm repository do not allow to manage the package

Open kvaps opened this issue 2 years ago • 4 comments

Describe the bug

It is not possible to upgrade the package if the currently installed version no longer exists in the Helm repository.

To Reproduce

  • Install kubeapps with FluxCD
  • Add Helm repository
  • Install package
  • Regenerate Helm repository with newer chart versions
  • Check installed package, you'll see the following message:
There is a problem with this package: this package has missing information, some actions might not be available..

Expected behavior

  • The information about chart for currently installed version should be fetched from the release secret, not from the repository.
  • It is possible to upgrade package to newer version, even if currently installed version is no longer accessible in Helm charts repository.

Screenshots

Screenshot 2024-01-05 at 9 20 47 Screenshot 2024-01-05 at 9 21 10

Desktop (please complete the following information):

  • Version v2.9.0
  • Kubernetes version v1.29.0-rc.1
  • Package version:
flux: v2.0.1
helm-controller: v0.36.2
image-automation-controller: v0.36.1
image-reflector-controller: v0.30.0
kustomize-controller: v1.1.1
notification-controller: v1.1.0
source-controller: v1.1.2

kvaps avatar Jan 03 '24 22:01 kvaps

Thanks for reporting this problem. I've been having a quick look at the issue and, in theory, the Flux package should be upgradeable in this situation. However, it is the UI which is disabling the action just in case, I believe:

https://github.com/vmware-tanzu/kubeapps/blob/2320384553494d12a8db5bb1bf7afc62f0227446/dashboard/src/components/AppView/AppView.tsx#L120-L126

One quick solution I can think of is just removing the disabled property; but I'd rather keep discouraging users from using the action in case of errors. Maybe a modal asking for confirmation? Not sure, though.

Since I don't have a reproduction scenario handy, could you check if manually editing the UI through your browser (to remove the disable prop) actually works for you? If so, I can try to squeeze a quick UI fix for it soon. Thanks!

antgamdia avatar Jan 09 '24 15:01 antgamdia

Hi @antgamdia, I tried to remove disabled="" from button in browser: Screenshot 2024-01-10 at 11 45 17

But upgrade button still not works.

Another problem is that description for the app is missing as well:

Screenshot 2024-01-10 at 11 48 37

kvaps avatar Jan 10 '24 10:01 kvaps

Thanks for the info. It seems we'd need to set up an environment for reproducing this behavior and see what's going on.

Since we don't have enough bandwidth for tackling all the issues at the moment, it might take a while. In the meantime, to rule out just UI changes that could be implemented quickly, you could try invoking the update operation directly through the API and see what happens. You can use the API docs portal directly:

image

image

antgamdia avatar Jan 10 '24 12:01 antgamdia

A possible cause of this is that repo is during a sync. After sync complete, it recognize the info, and show the upgrade & rollback buttons. This happened to me today.

linonetwo avatar Mar 13 '24 08:03 linonetwo