Bug 1967208
| Summary: | Getting started card should use semver library for parsing the version instead of string manipulation | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Samuel Padgett <spadgett> |
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.8 | CC: | aos-bugs, jokerman, yapei |
| Target Milestone: | --- | ||
| Target Release: | 4.8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: |
Version: 4.8.0-0.nightly-2021-06-02-025513
Cluster ID: 42a48920-049e-4386-8a22-dc267b14a7b2
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
|
|
| Last Closed: | 2021-07-27 23:11:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Check the version number in several places: 1. Getting started tour guide on Developer Console +Add page, it shows `What's new in OpenShift 4.8` 2. Getting started tour guide on Admin Console Home page, it shows `See what's new in OpenShift 4.8` using semver.parse we are returning correct version Verified on 4.8.0-0.nightly-2021-06-08-161629 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438 |
We're currently parsing the version this way: ``` // Show only major and minor version. const version = (useOpenshiftVersion() || '') .split('.') .slice(0, 2) .join('.'); ``` https://github.com/spadgett/console/blob/502fb0c8519605c9a7c7ace51808add0b679581c/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/explore-admin-features-getting-started-card.tsx#L13-L17 We have a semver library already for more robust version parsing. We should be using that instead of string split/join. See https://github.com/spadgett/console/blob/502fb0c8519605c9a7c7ace51808add0b679581c/frontend/public/module/k8s/cluster-settings.ts#L173-L181 for an example.