Hide Forgot
Description of problem: This is a follow-up ticket on https://bugzilla.redhat.com/show_bug.cgi?id=2053685 (Topology performance: Immutable .toJSON consumes a lot of CPU time when rendering a large topology graph) where we added a cache for the Immutable.js data when cloning them deeply for a Firehose or useK8sWatchResources consumer. But in 4.9 the developer console crashes when importing an application because there were two components requesting secrets: 1. In SourceSecretSelector a useK8sWatchResource hook requests ONE secret. { kind: Secret, namespace, name: secretName, optional: true, isList: false } 2. A child of SourceSecretSelector, SourceSecretDropdown, also requests all Secrets to allow the user to select this secret. { kind: Secret, namespace, isList true } Unluckily secret name was undefined (an empty string) when importing a new deployment the internal ReduxID was the same. This happen because the name wasn't part of the query parameter, see makeReduxID and makeQuery, which is used as reduxID. Because the hook was called with `isList: false` it returns and caches the pure API response. (Which contains all Secrets btw, but as a SecretList API response instead of an array.) The Firehose component then reuses the cached result but expected that it is an array and failed. Because this crash happens only on 4.9 Jai fixed this with a small change here https://github.com/openshift/console/pull/11256. Instead of returning equal, but not the same data for these cases, we should improve the cache in a more generic way - and fix that SourceSecretSelector calls useK8sWatchResource without a name. Version-Release number of selected component (if applicable): The cache is backported already to 4.8 and will be backported also to 4.7. An improvement of the cache should be also backported back to 4.7. The crash in 4.9 is already fixed. So that we don't know at the moment if there is another issue or not. Reproducible: (Un)luckily not anymore since the fix/workaround https://github.com/openshift/console/pull/11256 was already merged.
As described this issue could not be reproduced. But the console works fine, incl. helm pages and import from git. Verified on 4.11.0-0.nightly-2022-04-24-135651
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.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-2022:5069