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 2 commits into
Conversation
|
@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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Walkthrough
ChangesWatch error handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change prevents optional resource permission errors from blocking the Installed Operators page while preserving failures for required resources; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
Full details: Description checkExplanation The description includes the root cause, solution, test setup, test cases, additional context, and required Jira reference. Browser checks remain unmarked and reviewer assignments are not listed, but these omissions are non-critical. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. Full details: Stable And Deterministic Test NamesExplanation PASS: The pull request changes a TypeScript Jest test file and Full details: Test Structure And QualityExplanation PASS — the custom check applies only to Ginkgo test code. This pull request changes a TypeScript React test file using Jest and React Testing Library ( Full details: Microshift Test CompatibilityExplanation The pull request adds only frontend TypeScript/React unit tests and changes Full details: Single Node Openshift (Sno) Test CompatibilityExplanation The pull request changes only two frontend TypeScript/TSX files. The added tests use Jest/React Testing Library Full details: Topology-Aware Scheduling CompatibilityExplanation PASS: The pull request changes only the frontend Full details: Ote Binary Stdout ContractExplanation PASS: The PR changes only two frontend TypeScript/TSX files: Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS: The pull request adds Jest/React unit tests in Full details: No-Weak-CryptoExplanation PASS: The PR diff only changes Full details: Container-PrivilegesExplanation PASS: The pull request changes only two TypeScript/TSX files. The diff adds Full details: No-Sensitive-Data-In-LogsExplanation PASS: The PR adds no logging statements or log sinks. The changed production code only filters ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Scheduling tests matching the |
|
/retest |
|
Hey @platex-rehor-bot 👍
The multi-line formatting in the Also worth noting: |
|
/pipeline required |
|
Scheduling tests matching the |
|
/lgtm Playwright test failures caused by auth bugs. We really need to get those PRs merged. |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
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>
OCPBUGS-111081 Fix Prettier formatting violation in loadError useMemo (single-line condition). Revert MAX_WARNINGS from 343 back to 342 since this PR does not change the ESLint warning count.
5ca58f2 to
5bb3bc8
Compare
|
/lgtm |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, platex-rehor-bot, rhamilto 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 |
|
/retest-required |
1 similar comment
|
/retest-required |
|
/retest |
|
/test e2e-playwright |
|
@platex-rehor-bot: 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. |
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
Summary by CodeRabbit
Bug Fixes
Tests