Skip to content

OU-1409: feat: align proposal url with ols detail view, check multiple namespaces for proposals#1044

Open
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:align-proposals-action-with-ols
Open

OU-1409: feat: align proposal url with ols detail view, check multiple namespaces for proposals#1044
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:align-proposals-action-with-ols

Conversation

@jgbernalp

@jgbernalp jgbernalp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This PR:

  • Aligns the url redirection with the OLS detail view, removes the perspective based url builder
  • Checks for proposals in the alert namespace and the default namespace simultaneously

Summary by CodeRabbit

  • Bug Fixes
    • AI proposal checks now look in the relevant alert namespace as well as the default namespace, improving investigation links and proposal visibility.
    • The “View AI Investigation” action now opens the correct proposal page when a proposal is available.
    • Loading and error states for proposal lookups are now combined more accurately, reducing inconsistent UI feedback.

…ces for proposals

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@jgbernalp jgbernalp requested review from PeterYurkovich and zhuje July 8, 2026 08:20
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 8, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 8, 2026

Copy link
Copy Markdown

@jgbernalp: This pull request references OU-1409 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

This PR:

  • Aligns the url redirection with the OLS detail view, removes the perspective based url builder
  • Checks for proposals in the alert namespace and the default namespace simultaneously

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: fa558fb9-8eb1-4818-94d8-e0c73801147a

📥 Commits

Reviewing files that changed from the base of the PR and between 097f674 and e4ee24d.

📒 Files selected for processing (3)
  • web/src/components/ai-proposals/useProposalCheck.ts
  • web/src/components/alerting/AlertList/AlertTableRow.tsx
  • web/src/components/hooks/usePerspective.tsx
💤 Files with no reviewable changes (1)
  • web/src/components/hooks/usePerspective.tsx

Walkthrough

The proposal-checking hook now queries both the default and alert-specific namespaces, filtering results by fingerprint instead of full alert matching. AlertTableRow derives its investigation URL from the first returned proposal via a new local helper, and the previously exported getProposalsUrl helper was removed.

Changes

Proposal fetching and URL flow

Layer / File(s) Summary
Dual-namespace proposal query and fingerprint filtering
web/src/components/ai-proposals/useProposalCheck.ts
buildQueryFn now takes namespace and alertFingerprint; the hook runs two gated queries across the default and alert namespaces, filters by fingerprint label via matchesFp, and combines isFetching/isError across both queries.
AlertTableRow dropdown URL and helper cleanup
web/src/components/alerting/AlertList/AlertTableRow.tsx, web/src/components/hooks/usePerspective.tsx
AlertTableRow adds a local getProposalUrl helper and builds the investigation link from proposals[0] instead of getProposalsUrl; the now-unused getProposalsUrl export is deleted from usePerspective.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AlertTableRow
  participant useProposalCheck
  participant K8sAPI

  AlertTableRow->>useProposalCheck: useProposalCheck(alert)
  useProposalCheck->>K8sAPI: query proposals(PROPOSAL_NAMESPACE)
  alt alert namespace differs
    useProposalCheck->>K8sAPI: query proposals(alertNamespace)
  end
  K8sAPI-->>useProposalCheck: proposal lists
  useProposalCheck->>useProposalCheck: filter by matchesFp(fingerprint)
  useProposalCheck-->>AlertTableRow: proposals, isFetching, isError
  AlertTableRow->>AlertTableRow: getProposalUrl(namespace, proposals[0].name)
Loading
🚥 Pre-merge checks | ✅ 5 | ❌ 10

❌ Failed checks (10 inconclusive)

Check name Status Explanation Resolution
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: aligning proposal URLs with the OLS detail view and checking multiple proposal namespaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@PeterYurkovich

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2026
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [PeterYurkovich,jgbernalp]

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

@etmurasaki

Copy link
Copy Markdown
Contributor

/test e2e-monitoring

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@jgbernalp: all tests passed!

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants