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

Add fix for Helm charts versions ordering #4952

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

castelblanque
Copy link
Collaborator

Signed-off-by: Rafa Castelblanque rcastelblanq@vmware.com

Description of the change

This bugfix tackles the issue of GetAvailablePackageVersions in Helm direct plugin not returning the correct versions list when the input versions are not ordered.

We had all input values in our tests correctly sorted, which might not be the case on runtime.
See here.

Solution done here is to sort versions first thing in PackageAppVersionsSummary.

Benefits

Versions returned by GetAvailablePackageVersions should be correct now.

Possible drawbacks

Solution modifies pkgutils.PackageAppVersionsSummary function, which applies to Flux plugin as well, although it should not break anything.

Applicable issues

Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for kubeapps-dev ready!

Name Link
🔨 Latest commit 8927550
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/62bc18070e09e30008bce322
😎 Deploy Preview https://deploy-preview-4952--kubeapps-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Do you know if there exists the same problem in the InstalledPkgSummaries response ?

cmd/kubeapps-apis/plugins/pkg/pkgutils/pkgutils_test.go Outdated Show resolved Hide resolved
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
@castelblanque
Copy link
Collaborator Author

Do you know if there exists the same problem in the InstalledPkgSummaries response ?

The defective function (PackageAppVersionsSummary) is not being invoked from the InstalledPkgSummaries. So I don't think there's a problem unless the code is repeated or versionInSummary/versionsInSummary is named alternatively somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm direct plugin returns incorrect response for GetAvailablePackageVersions
3 participants