Charts page breaks when a chart has an `undefined` version
Setup
- Rancher version: 2.8-head & 2.9-head
Describe the bug
Some repositories might include charts with versions that have undefined value, this causes isPrerelease function break when it tries to pass undefined to semver.clean:
https://github.com/rancher/dashboard/blob/523832078e2c23364dc59b4082a7a0cbec0fbd4f/utils/version.js#L68
To Reproduce
Add a new repository using this URL https://charts.jetstack.io and go to Explore => Apps
Screenshots
@gaktive @nwmac we might be able to include this in 2.9.0?
Something doesn't seem right, i'm not 100% sure but i think helm chart versions are mandatory. Either way, even if it's a buggy chart, the UI should handle it.
Even though this isn't a regression, it could be freshly revealed given a new / change in chart in repo. Given also that it breaks the page we should probably fix for 2.9.0.
Possibly also needs a backport
@richard-cox @momesgin I could not reproduce this - I suspect this was an error in that particular repository.
For now, I am going to move this to 2.9.next1 for us to make more resilient, but per @richard-cox 's comment, I don't think a chart without a version is valid - please let me know if you disagree @momesgin
FYI @gaktive
/backport v2.10.1
Not sure if this needs to go into 2.9.x at this stage but if it's easy and users need this, we can consider it. If Vue3 complicates this though, we may elect not to do this.
Added QA/None label as there's no solid reproduce steps, and the change is very minor and safe.