Bug 1991439
| Summary: | Some hardcodes are detected at the code level in OpenShift console components | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Xu Rui Li <xurl> | ||||||
| Component: | Management Console | Assignee: | Jakub Hadvig <jhadvig> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 4.8 | CC: | aos-bugs, dtaylor, jokerman, rhamilto, spadgett, yapei | ||||||
| Target Milestone: | --- | Keywords: | i18n, Translation | ||||||
| Target Release: | 4.9.0 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1993999 1994094 1994098 1994117 (view as bug list) | Environment: | |||||||
| Last Closed: | 2021-10-18 17:45:29 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: | |||||||||
| Attachments: |
|
||||||||
Many of these instances are in dormant code that's not being used where we should simply remove the component (for instance, the service catalog components). prometheus.jsx and alert-manager.tsx are also legacy Tectonic resources that we can remove from console. The code included in this bug actually spans multiple components and teams; therefore, I opened new bugs and assigned the relevant files to the associated component where appropriate: * https://bugzilla.redhat.com/show_bug.cgi?id=1993999 for Console Storage Plugin * https://bugzilla.redhat.com/show_bug.cgi?id=1994094 for Console Kubevirt Plugin As Sam noted in https://bugzilla.redhat.com/show_bug.cgi?id=1991439#c2, several files are obsolete code that should be removed from the code base. I opened https://bugzilla.redhat.com/show_bug.cgi?id=1994117 to address the removal of those files. Finally, frontend/public/components/routes.tsx is the one file that will be updated to fix this bug. PR to follow. Hi Robb,
return i18next.t('public~<unknown host>');
Why we return `<unknown host>` (with '<>') not simple string 'unknown host'(without <>)?
Created attachment 1816711 [details]
unknown host translation
(In reply to Yadan Pei from comment #5) > Hi Robb, > > return i18next.t('public~<unknown host>'); > > Why we return `<unknown host>` (with '<>') not simple string 'unknown > host'(without <>)? That I do not know as that was the existing string. It appears Dave Taylor added the string originally. @dtaylor, any insight? Hi, orginally the string was 'return '<unknown host>', this was one of the orginal areas I worked on in 2018, so perhaps it was the standard at the time. Either way, we should be able to return just 'unknown host' without the <>. Opened https://github.com/openshift/console/pull/9854 to remove `<>` from string. Moving to VERIFIED since now the string is updated to `unknown host` Verified on 4.9.0-0.nightly-2021-08-30-192239 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.9.0 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:3759 |
Created attachment 1812280 [details] Some hardcodes list in the excel file. Description of problem: Some hardcodes are detected at the code level in OpenShift console components Version-Release number of selected component (if applicable): 4.8 How reproducible: Steps to Reproduce: By reviewing the source codes in OpenShift console with the Scan code tool, detect some hardcodes that list in OpenShiftHardCodelist.xlsx. Please double-check in the attached file OpenShiftHardCodelist.xlsx. If they are the true hardcodes, please fix them.