Bug 2084287
| Summary: | Topology & Add page breaks on 'default' Project -- No Items In Project | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Andrew Ballantyne <aballant> | ||||
| Component: | Dev Console | Assignee: | Christoph Jerolimov <cjerolim> | ||||
| Status: | CLOSED ERRATA | QA Contact: | spathak <spathak> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.6 | CC: | cjerolim, divgupta, jakumar, nmukherj, talessio | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.11.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: |
Cause: The UI expects that all ClusterServiceVersion contains a spec.provider definitions, but it is not required from the resource.
Consequence: The operator details page crashes when trying to show such a resource.
Fix: Add a null check so that ClusterServiceVersion resources without spec.provider works fine.
Result: The operator details page doesn't crash anymore for such operators.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2023-02-07 13:22:41 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: |
|
||||||
|
Description
Andrew Ballantyne
2022-05-11 19:26:44 UTC
Forgot to mention in the description -- there appears to be nothing in the project. I checked the admin list screens for pods, deployments, DCs, Jobs, DS, and RS -- there was nothing in the project. /static/operator-lifecycle-manager/code-refs/utils-chunk-3fed9eff372e533c4c16.min.js contains the code of packages/operator-lifecycle-manager/src/utils/useClusterServiceVersions.tsx
Based on the stack trace (Array.map) and error (Cannot read properties of undefined (reading 'name')) it looks like name is not defined in line 60:
.map((desc) => {
const { creationTimestamp } = desc.csv.metadata;
const uid = `${desc.csv.metadata.uid}-${desc.displayName}`;
const { description } = desc;
const provider = desc.csv.spec.provider.name; // Crash here
The cluster contains a CSV that misses the provider.name. Could reproduce this issue with this CSV:
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
name: minimal-csv
namespace: christoph
spec:
apiservicedefinitions:
owned:
- group: A
kind: A
name: A
version: v1
customresourcedefinitions:
owned:
- kind: B
name: B
version: v1
displayName: My minimal CSV
install:
strategy: ''
Verified on 4.11.0-0.nightly-2022-06-10-191219, with the yaml in comment 3 that the topology doesn't crash. But the OperatorHub tabs 'A' and 'B' shows a catched error. I want to take a look into that error as well. Oh no! Something went wrong. TypeError Description: Cannot read properties of undefined (reading 'apiGroup') The origin issue was fixed in 4.11. I reopened it to fix another part of this issue that is not related to the origin error 'Topology & Add page breaks' but since new tickets needs to be tracked in Jira, I mark this as verified again. See https://bugzilla.redhat.com/show_bug.cgi?id=2084287#c6 I already created a follow-up ticket in Jira: https://issues.redhat.com/browse/OCPBUGS-6689 And we will also backport this fix here and the fix of https://issues.redhat.com/browse/OCPBUGS-6689 as part of https://issues.redhat.com/browse/OCPBUGS-6690 to 4.10 and later to 4.9 and 4.8. 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 (Important: OpenShift Container Platform 4.11.26 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-2023:0565 |