Skip to content
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

Not able to choose/upgrade to old major version from Kubeapps UI. #6099

Closed
ssshreyans26 opened this issue Mar 16, 2023 · 13 comments · Fixed by #6249
Closed

Not able to choose/upgrade to old major version from Kubeapps UI. #6099

ssshreyans26 opened this issue Mar 16, 2023 · 13 comments · Fixed by #6249
Assignees
Labels
component/apis-server Issue related to kubeapps api-server kind/bug An issue that reports a defect in an existing feature

Comments

@ssshreyans26
Copy link

ssshreyans26 commented Mar 16, 2023

Describe the bug
On changing the version, the page is reloading and the version in the UI is not changing to older one.

Unable to fetch package: Unable to get the available package detail for the package "helm-propelld%252Fframework" using the plugin "helm.packages": rpc error: code = Internal desc = Unable to retrieve chart: chart version not found

To Reproduce
Steps to reproduce the behavior:

  1. Go to kubeapps
  2. choose the chart you want to deploy
  3. choose the older major version (not the latest one)
  4. See error

Screenshots
image

image

Desktop :

  • Version 2.6.4
  • Kubernetes version 1.24
  • Package version 12.2.7
@ssshreyans26 ssshreyans26 added the kind/bug An issue that reports a defect in an existing feature label Mar 16, 2023
@absoludity
Copy link
Contributor

Thanks @ssshreyans26 . Can you please confirm whether you see this bug if you use the standard bitnami repository, and install different versions of, say, the apache chart? I don't see the issue when I choose a chart from the bitnami repo, so I'm interested to know if you do. If you don't, then we can narrow the bug down to something different with your package.

If you're able to reproduce it with a chart, can you add the chart to the bug? Or if you are unable, perhaps create a similarly-named chart with no content which shows the issue and provide that. Or if you're not in a position to do so, we'll try to create a similar chart and see if we can reproduce that way but we don't have a lot of resources right now.

@absoludity absoludity added the awaiting-more-evidence Need more info to actually get it done. label Mar 19, 2023
@ppbaena ppbaena removed the kind/bug An issue that reports a defect in an existing feature label Mar 27, 2023
@ssshreyans26
Copy link
Author

ssshreyans26 commented Mar 28, 2023

@absoludity It is not happening with standard bitnami repositories, we're using chartmuseum as our helm repo and storing the charts in s3, only with those charts we're facing this issue.

@absoludity
Copy link
Contributor

absoludity commented Mar 28, 2023

Great, that's helpful info, thanks. Also worth noting that we use chart-museum in our CI/CD integration tests without issue too. So if you can take one a couple of your charts, reduce and anonymize them (rie. removing templates and other things, anonymizing any info in the Chart.yaml), until you've a small example repo you can share (or just share the charts and we'll add them to a chartmuseum instance) that causes this issue, we can then reproduce it with your example chart, find the issue and fix it.

@stale
Copy link

stale bot commented Apr 25, 2023

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.

@stale stale bot added the stale Automatic label to stale issues due inactivity to be closed if no further action label Apr 25, 2023
@stale stale bot closed this as completed May 1, 2023
@absoludity
Copy link
Contributor

absoludity commented May 5, 2023

From slack:

Hi @ssshreyans26 . The issue closed automatically because it was waiting for info... in particular, the last comment from me was asking for a sample chart that we could reproduce the issue with. But I think the new info which you've said above is that you're not using semantic versioning for the charts? This came up with another project recently too. So Helm requires a semantic version for charts for a reason (see https://helm.sh/docs/topics/charts/#the-chartyaml-file ), and currently Kubeapps depends on that requirement to be able to suggest when a new version of the chart is available. Is there a reason you're not using semantic versions when Helm requires it? (If you and others have a decent reason, we can look at what we could do to support that use-case).

@absoludity absoludity reopened this May 5, 2023
@ssshreyans26
Copy link
Author

From slack:

Hi @ssshreyans26 . The issue closed automatically because it was waiting for info... in particular, the last comment from me was asking for a sample chart that we could reproduce the issue with. But I think the new info which you've said above is that you're not using semantic versioning for the charts? This came up with another project recently too. So Helm requires a semantic version for charts for a reason (see https://helm.sh/docs/topics/charts/#the-chartyaml-file ), and currently Kubeapps depends on that requirement to be able to suggest when a new version of the chart is available. Is there a reason you're not using semantic versions when Helm requires it? (If you and others have a decent reason, we can look at what we could do to support that use-case).

Hi @absoludity, All our applications are used internally and there is no external dependency, that is why we are using simple versioning. Semantic Versioning would increase the complexity in our use case.

Can you provide us with a workaround for this?

@stale stale bot removed the stale Automatic label to stale issues due inactivity to be closed if no further action label May 5, 2023
@absoludity
Copy link
Contributor

Hi @ssshreyans26 . I have tried to reproduce the problem locally, uploading two charts to chartmuseum as follows:

  • simplechart v0.1.0 (app version v1.0.0)
  • simplechart v0.1.1 (app version v1.1.0)

and can't reproduce the issue. As requested above, if you can provide two example charts (just anonymize and strip down the internal charts that demonstrate this issue, then verify you can reproduce the issue with your stripped down charts, then upload them here for me to try), then I'd be happy to dig further and see why you are experiencing the "Unable to fetch package" error with your charts.

@ssshreyans26
Copy link
Author

ssshreyans26 commented May 8, 2023

Hi @ssshreyans26 . I have tried to reproduce the problem locally, uploading two charts to chartmuseum as follows:

  • simplechart v0.1.0 (app version v1.0.0)
  • simplechart v0.1.1 (app version v1.1.0)

and can't reproduce the issue. As requested above, if you can provide two example charts (just anonymize and strip down the internal charts that demonstrate this issue, then verify you can reproduce the issue with your stripped down charts, then upload them here for me to try), then I'd be happy to dig further and see why you are experiencing the "Unable to fetch package" error with your charts.

@absoludity As per your request attaching two example charts here.
apiVersion: v2
appVersion: v11-master-8204c85
description: A Helm chart for Propelld Service
name: communication-infra-service
type: application
version: v11-master

apiVersion: v2
appVersion: v12-master-eeb151e
description: A Helm chart for Propelld Service
name: communication-infra-service
type: application
version: v12-master

@absoludity
Copy link
Contributor

Thanks @ssshreyans26 , that info enabled me to reproduce the issue, track down the actual problem and fix it. Done in #6249

@absoludity absoludity self-assigned this May 9, 2023
@absoludity absoludity added kind/bug An issue that reports a defect in an existing feature component/apis-server Issue related to kubeapps api-server and removed awaiting-more-evidence Need more info to actually get it done. labels May 9, 2023
@ssshreyans26
Copy link
Author

@absoludity Thanks for the fix! When can we expect a release for this?

absoludity added a commit that referenced this issue May 10, 2023
)

### Description of the change

When Kubeapps was encountering Helm charts with non-semver versions,
rather than just returning the versions as they are, we were implicitly
converting them to the closest semver. This resulted in Kubeapps then
not being able to upgrade to a different version once an app with a
non-semver version was installed.

See #6099 for more detail.

### Benefits

If people choose to use non-semver versions, we don't block them from
upgrading.

### Possible drawbacks

We were previously ignoring errors when creating semver versions whereas
with this PR we now simply return all the versions as they were
provided. This may change some untested behavior, though unlikely.

### Applicable issues

- fixes #6099 

### Additional information

Also fixes an accidental change to our dev environment Makefile (I'd
accidentally committed a change in #6209 that had our dev environment
installing the upstream bitnami chart rather than the dev kubeapps one).

Signed-off-by: Michael Nelson <minelson@vmware.com>
@absoludity
Copy link
Contributor

Possibly next week, but more likely later. But I'll let you know as soon as the dev image is built with the fix (just having a few issues with CI) and give you instructions so you can test that image to ensure it fixes your issue, until the next release.

@absoludity
Copy link
Contributor

You can try this image to verify that it fixes your problem (and perhaps use that until the next release), which should mean something like the following in your values.yaml:

kubeappsapis:
  image:
    repository: kubeapps/kubeapps-apis
    digest: sha256:fcfd9948343234f8fcd2a85525b204c06c0e1ad326f2e4c31a4ac55a275b72d5

Let us know if that fixes your issue.

@ssshreyans26
Copy link
Author

You can try this image to verify that it fixes your problem (and perhaps use that until the next release), which should mean something like the following in your values.yaml:

kubeappsapis:
  image:
    repository: kubeapps/kubeapps-apis
    digest: sha256:fcfd9948343234f8fcd2a85525b204c06c0e1ad326f2e4c31a4ac55a275b72d5

Let us know if that fixes your issue.

@absoludity Thanks for the fix, it's solving our problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/apis-server Issue related to kubeapps api-server kind/bug An issue that reports a defect in an existing feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants