Bug 1967208 - Getting started card should use semver library for parsing the version instead of string manipulation
Summary: Getting started card should use semver library for parsing the version instea...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.8.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-02 15:47 UTC by Samuel Padgett
Modified: 2021-07-27 23:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
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
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9122 0 None open Bug 1967208: Use semver to parse version for "Getting started" card 2021-06-02 17:39:33 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:11:29 UTC

Description Samuel Padgett 2021-06-02 15:47:58 UTC
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.

Comment 2 Yadan Pei 2021-06-09 02:35:37 UTC
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

Comment 5 errata-xmlrpc 2021-07-27 23:11:18 UTC
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


Note You need to log in before you can comment on or make changes to this bug.