OCPBUGS-109521: Remove unscoped CSV watch from ClusterNotUpgradeableAlert - #17013
OCPBUGS-109521: Remove unscoped CSV watch from ClusterNotUpgradeableAlert#17013rsacherer wants to merge 1 commit into
Conversation
…lert The ClusterNotUpgradeableAlert component fetched all ClusterServiceVersions cluster-wide (resulting in up to 600MB object sizes in the browser on clusters with 350+ namespaces and lots of operators) on every visit to Cluster Settings when Upgradeable=False was set. The only use of CSVs was to decide whether or not to show navigation links. For installed operators this was ineffective: CSV status.conditions use phase/reason fields, not type/status, so getConditionUpgradeableFalse() always returned undefined on CSVs — meaning notUpgradeableCSVsPresent was permanently false and the 'View installed Operators' link was never shown. Additionally the link URL used /k8s/ns/all-namespaces/ instead of /k8s/all-namespaces/, causing 'No Operators found' on navigation. Fix: remove both the ClusterOperator and CSV watches. Both navigation links are now always shown when the alert renders — correct since the alert only mounts when Upgradeable=False is already confirmed on ClusterVersion. Use resourceListPathFromModel() for the correct all-namespaces URL. https://issues.redhat.com/browse/OCPBUGS-109521 Signed-off-by: Raimund Sacherer <switch1024@gmail.com>
|
@rsacherer: This pull request references Jira Issue OCPBUGS-109521, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
This is a backport of #16904 to release-4.22.
The ClusterNotUpgradeableAlert component fetched all ClusterServiceVersions cluster-wide (resulting in up to 600MB object sizes in the browser on clusters with 350+ namespaces and lots of operators) on every visit to Cluster Settings when Upgradeable=False was set.
The only use of CSVs was to decide whether or not to show navigation links.
For installed operators this was ineffective: CSV status.conditions use phase/reason fields, not type/status, so getConditionUpgradeableFalse() always returned undefined on CSVs — meaning notUpgradeableCSVsPresent was permanently false and the 'View installed Operators' link was never shown.
Additionally the link URL used /k8s/ns/all-namespaces/ instead of /k8s/all-namespaces/, causing 'No Operators found' on navigation.
Fix: remove both the ClusterOperator and CSV watches. Both navigation links are now always shown when the alert renders — correct since the alert only mounts when Upgradeable=False is already confirmed on ClusterVersion. Use resourceListPathFromModel() for the correct all-namespaces URL.
Backport note: On release-4.22 the
ClusterNotUpgradeableAlertlives incluster-settings.tsx(notcluster-settings-utils.tsxas in main) due to the file reorganisation that happened between 4.22 and main. The fix is otherwise identical.https://issues.redhat.com/browse/OCPBUGS-109521