OCPBUGS-109521: Remove unscoped CSV watch from ClusterNotUpgradeableAlert - #17074
OCPBUGS-109521: Remove unscoped CSV watch from ClusterNotUpgradeableAlert#17074rsacherer 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 |
|
@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. |
|
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: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[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 |
|
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 Regular contributors should join the org to skip this step. 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. |
|
Closing until the release-4.22 backport (#17013) merges first. Will reopen once that lands. |
|
@rsacherer: This pull request references Jira Issue OCPBUGS-109521. The bug has been updated to no longer 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. |
|
@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. |
|
Closing — PR title references OCPBUGS-109521 which is the 4.22 backport ticket. Need a separate cloned Jira ticket for 4.21 before reopening with the correct reference. |
|
@rsacherer: This pull request references Jira Issue OCPBUGS-109521. The bug has been updated to no longer 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. |
This is a backport of #16904 to release-4.21 (via #17013 for 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.21 the
ClusterNotUpgradeableAlertlives incluster-settings.tsx(notcluster-settings-utils.tsxas in main) and usesSyncMarkdownView/removeQueryArgument(notMarkdownView/useQueryParamsMutator) due to refactoring between 4.21 and main. The fix is otherwise identical. Test fixtures updated for stricterUpdateHistory/ClusterVersionStatustypes on 4.21, and jest.mock factories useReact.createElementinstead of JSX (older babel-plugin-jest-hoist constraint).https://issues.redhat.com/browse/OCPBUGS-109521