Skip to content

OCPBUGS-115235: Remove unscoped CSV watch from ClusterNotUpgradeableAlert - #17139

Open
rsacherer wants to merge 1 commit into
openshift:release-4.20from
rsacherer:OCPBUGS-109521-remove-csv-watch-4.20
Open

OCPBUGS-115235: Remove unscoped CSV watch from ClusterNotUpgradeableAlert#17139
rsacherer wants to merge 1 commit into
openshift:release-4.20from
rsacherer:OCPBUGS-109521-remove-csv-watch-4.20

Conversation

@rsacherer

Copy link
Copy Markdown

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) — resourceListPathFromModel was 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+update as in newer branches). Test fixtures updated for stricter UpdateHistory/ClusterVersionStatus types, and jest.mock factories use React.createElement instead of JSX.

https://issues.redhat.com/browse/OCPBUGS-115235

…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>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 23023574-a640-4a3c-be6f-a58783593b5a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-113468 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-113468 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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) — resourceListPathFromModel was 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+update as in newer branches). Test fixtures updated for stricter UpdateHistory/ClusterVersionStatus types, and jest.mock factories use React.createElement instead of JSX.

https://issues.redhat.com/browse/OCPBUGS-115235

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.

@openshift-ci
openshift-ci Bot requested review from cajieh and jhadvig September 3, 2026 15:01
@openshift-ci openshift-ci Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. component/core Related to console core functionality labels Sep 3, 2026
@openshift-ci

openshift-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rsacherer
Once this PR has been reviewed and has the lgtm label, please assign spadgett for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sg00dwin

sg00dwin commented Sep 3, 2026

Copy link
Copy Markdown
Member

/ok-to-test
/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 3, 2026
@sg00dwin

sg00dwin commented Sep 4, 2026

Copy link
Copy Markdown
Member

/test e2e-gcp-console

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@rsacherer: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 7696d3f link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/core Related to console core functionality jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants