vmware-tanzu / kubeapps

A web-based UI for deploying and managing applications in Kubernetes clusters
Other
4.89k stars 705 forks source link

Error "Unable to refresh installed package" after chart deletion #6313

Open overag3 opened 1 year ago

overag3 commented 1 year ago

Describe the bug When i uninstall helm chart from Kubeapps dashboard, an error "Unable to refresh installed package" is thrown. The deletion of the chart was done correctly and a few seconds after, this error appear.

To Reproduce Steps to reproduce the behavior:

  1. Go to Applications tab
  2. Click on installed chart you want to uninstall
  3. Click on delete button and confirm deletion
  4. See error error-deletion-chart-kubeapps

Expected behavior Deleting a chart does not generate any error

Desktop (please complete the following information):

Additional context This error appear on a minikube cluster but also a Rancher cluster. The charts we have developed are affected by this error but also those coming from the Bitnami repository (for example)

Regards

absoludity commented 1 year ago

Hi @overag3 , and thanks for helping out identifying issues. I can't be 100% sure, but I'm about 60% sure that this may be related to #6269 , since it appears to be the UX not recognising the correct error code (when it used to). But I'll investigate and verify that. Cheers.

overag3 commented 1 year ago

Hi @absoludity, Many thanks for your help !

RGPosadas commented 1 year ago

@absoludity We've encountered the same issue on the latest KubeApps release. The warning still appears, but the actual deletion of the release is not affected at all. Also, the warning is not as long as OP's.

config.json:

{
  "kubeappsCluster": "default",
  "kubeappsNamespace": "apps",
  "helmGlobalNamespace": "apps",
  "carvelGlobalNamespace": "kapp-controller-packaging-global",
  "appVersion": "v2.8.0",
  "authProxyEnabled": true,
  "oauthLoginURI": "/oauth2/start",
  "oauthLogoutURI": "/oauth2/sign_out",
  "authProxySkipLoginPage": false,
  "featureFlags": {"apiOnly":{"enabled":false,"grpc":{"annotations":{"nginx.ingress.kubernetes.io/backend-protocol":"GRPC"}}},"operators":false,"schemaEditor":{"enabled":false}},
  "clusters": ["default"],
  "theme": "",
  "remoteComponentsUrl": "",
  "customAppViews": [],
  "skipAvailablePackageDetails": false,
  "createNamespaceLabels": {}
}
image
absoludity commented 1 year ago

Great, thanks for the info. So yes, #6269 did enable this error to be recognised for what it was, hence displaying the simpler message. The remaining issue is cosmetic (I think?) but would be great to remove - the cause being related to the timing when redirecting back to the list of applications page right after deleting a release, such that:

  1. When initially requesting the list of apps, the app is still on the cluster and included in the list, but
  2. Milliseconds later when Kubeapps requests more details for each result in the list, the app is no longer on the cluster.

We may be able to handle 404s for nascent deletions (only).