OCPBUGS-115235: Remove unscoped CSV watch from ClusterNotUpgradeableAlert - #17139
OCPBUGS-115235: Remove unscoped CSV watch from ClusterNotUpgradeableAlert#17139rsacherer 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. Backport note: On release-4.21 the ClusterNotUpgradeableAlert lives in cluster-settings.tsx (not cluster-settings-utils.tsx as in main) and uses SyncMarkdownView/removeQueryArgument (not MarkdownView/useQueryParamsMutator) due to refactoring that happened between 4.21 and main. The fix is otherwise identical. Test fixtures updated for stricter UpdateHistory/ClusterVersionStatus types on 4.21. https://issues.redhat.com/browse/OCPBUGS-109521 Signed-off-by: Raimund Sacherer <switch1024@gmail.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
@rsacherer: This pull request references Jira Issue OCPBUGS-115235, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
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. |
|
Hi @rsacherer. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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 kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rsacherer The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/ok-to-test |
|
Scheduling tests matching the |
|
/test e2e-gcp-console |
|
@rsacherer: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This is a backport of #16904 to release-4.20 (via #17013 for release-4.22, #17079 for release-4.21).
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.
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.20 utility imports use a barrel
'../utils'(not individual paths as in main) —resourceListPathFromModelwas added to the existing barrel import. The query string for the ClusterOperators link is?rowFilter-cluster-operator-status=Cannot+update(4.20 style, not?status=Cannot+updateas in newer branches). Test fixtures updated for stricterUpdateHistory/ClusterVersionStatustypes, and jest.mock factories useReact.createElementinstead of JSX.https://issues.redhat.com/browse/OCPBUGS-115235