OCPBUGS-111081: Fix Installed Operators page error for namespace-scoped RBAC users - #17072
OCPBUGS-111081: Fix Installed Operators page error for namespace-scoped RBAC users#17072platex-rehor-bot wants to merge 1 commit into
Conversation
OCPBUGS-111081 When the Firehose component was replaced by hooks in MultiListPage (CONSOLE-5026), the loadError computation lost the check that excluded resources declared with optional: true from contributing to the page's fatal error. This caused the Installed Operators page to show a "catalogsources forbidden" error for users whose RBAC is delivered via namespace-scoped RoleBindings only, since the cluster-scoped CatalogSource fetch (declared optional) would fail and its error would be promoted to a fatal page error. The fix cross-references each watched resource's key against the watchResources input config to check the optional flag, restoring the 4.21 behavior where optional resource errors are silently tolerated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@platex-rehor-bot: This pull request references Jira Issue OCPBUGS-111081, 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 |
|
Warning Review limit reached
Next review available in: 15 minutes Limit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
|
Hi @platex-rehor-bot. 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. |
|
/jira refresh |
|
@platex-rehor-bot: This pull request references Jira Issue OCPBUGS-111081, which is valid. 3 validation(s) were run on this bug
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. |
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, platex-rehor-bot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Scheduling tests matching the |
|
/retest |
|
Hey @platex-rehor-bot 👍
The multi-line formatting in the Also worth noting: |
|
@platex-rehor-bot: The following tests 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. |
Analysis / Root cause:
When the Firehose component was replaced by React hooks in
MultiListPage(as part of CONSOLE-5026), theloadErrorcomputation inlist-page.tsxlost the check that excluded resources declared withoptional: truefrom contributing to the page's fatal error.In 4.21,
firehose.jsxexplicitly filtered optional resources out before computingloadError:In 4.22, the replacement code in
list-page.tsxusesObject.values(watchedResources)which discards the resource key, and has no reference to theoptionalflag — so any resource error, including from optional resources, becomes a fatal page error.The Installed Operators page declares
CatalogSourceasoptional: true(cluster-scoped lookup used only for catalog-health badges). For users whose RBAC is delivered entirely via namespace-scoped RoleBindings (no ClusterRoleBinding), this cluster-scoped fetch returns 403, which now becomes a fatal page error instead of being silently tolerated.Solution description:
Modified the
loadErrorcomputation inMultiListPageto cross-reference each watched resource's key against thewatchResourcesinput config (which still carries theoptionalflag). Resources declaredoptional: trueare excluded from the fatal error calculation, restoring the 4.21 behavior.The fix is in the shared
MultiListPageinfrastructure (list-page.tsx), not in any Operators-specific code, so it correctly handles all current and future uses ofoptional: trueacross the console.Screenshots / screen recording:
Test setup:
Test cases:
loadErrorand non-optional errors are preserved.Browser conformance:
Additional info:
🤖 Generated with Claude Code