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

Set empty string as fallback for undefined version #12507

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

momesgin
Copy link
Member

@momesgin momesgin commented Nov 5, 2024

Summary

Fixes #11289

Occurred changes and/or fixed issues

I was not able to reproduce the issue, Jetstack probably has fixed their undefined version, or another change in our code has fixed it, but to be safe I've added a fallback to make sure the app doesn't break anymore.

Technical notes summary

isPrerelease gets called when user has enabled "Include Prerelease Versions" option from Preferences page. An empty string as a fallback will prevent semver.clean to throw error as it expects to receive a string, as a result isPrerelease will return false. This eventually results in not showing the problematic app on the charts page.

Areas or cases that should be tested

The repro steps doesn't work anymore. I think we can move on without testing this considering how small and safe the change is, and the undefined case being tested already in dev mode.

Areas which could experience regressions

Try enable/disable "Include Prerelease Versions" option from Preferences page, the functionality of the charts page should be the same as before.

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@momesgin momesgin added this to the v2.11.0 milestone Nov 5, 2024
@momesgin momesgin self-assigned this Nov 5, 2024
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

Slightly odd things happen when the user tries to install a chart with no version (the details page renders nothing and titles with (), the install option is shown).

However it's pretty borked that a chart has no version and even more so that it breaks the ui. Lets get this one in

@momesgin momesgin merged commit 2cfc0a4 into rancher:master Nov 15, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Charts page breaks when a chart has an undefined version
2 participants