console icon indicating copy to clipboard operation
console copied to clipboard

OCPBUGS-63159: Prevent the display of events from projects other than the currently selected project

Open sg00dwin opened this issue 4 weeks ago • 22 comments

Includes tests for

  • Sorts events by timestamp across namespaces
  • Filters events by selected namespace
  • Clears and re-filters events when namespace changes
  • Validates event type filtering

sg00dwin avatar Dec 11 '25 22:12 sg00dwin

@sg00dwin: This pull request references Jira Issue OCPBUGS-63159, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

In response to this:

Includes tests for

  • Sorts events by timestamp across namespaces
  • Filters events by selected namespace
  • Clears and re-filters events when namespace changes
  • Validates event type filtering

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-robot avatar Dec 11 '25 22:12 openshift-ci-robot

Walkthrough

Adds a new test suite for event utilities and updates EventStream to close its WebSocket and clear the local event cache when effect dependencies change. No public API signatures were modified.

Changes

Cohort / File(s) Change Summary
Tests: event utilities
frontend/public/components/__tests__/events.spec.tsx
New test suite covering sortEvents and typeFilter: verifies descending lastTimestamp ordering across namespaces, order preservation with multiple namespaces, type-based filtering including missing-type defaults, and integration scenarios for namespace filtering and sorting.
Component: EventStream state reset
frontend/public/components/events.jsx
In the effect responding to dependent prop changes, explicitly closes the existing WebSocket and clears sortedEvents (resets local event cache) before establishing a new connection. No other reconnection or error-handling changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–30 minutes

  • Review the new tests for completeness and edge cases around missing type and cross-namespace ordering.
  • Confirm the WebSocket closure and sortedEvents reset timing do not introduce race conditions or break expected event stream reconnection behavior.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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

coderabbitai[bot] avatar Dec 11 '25 22:12 coderabbitai[bot]

/jira refresh

sg00dwin avatar Dec 11 '25 22:12 sg00dwin

@sg00dwin: This pull request references Jira Issue OCPBUGS-63159, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

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-robot avatar Dec 11 '25 22:12 openshift-ci-robot

@coderabbitai review

sg00dwin avatar Dec 11 '25 22:12 sg00dwin

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot] avatar Dec 11 '25 22:12 coderabbitai[bot]

/lgtm

rhamilto avatar Dec 15 '25 14:12 rhamilto

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, sg00dwin

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

The pull request process is described here

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

openshift-ci[bot] avatar Dec 15 '25 14:12 openshift-ci[bot]

/retest-required

sg00dwin avatar Dec 16 '25 17:12 sg00dwin

/jira refresh

sg00dwin avatar Dec 16 '25 17:12 sg00dwin

@sg00dwin: This pull request references Jira Issue OCPBUGS-63159, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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-robot avatar Dec 16 '25 17:12 openshift-ci-robot

/jira refresh

sg00dwin avatar Dec 16 '25 18:12 sg00dwin

@sg00dwin: This pull request references Jira Issue OCPBUGS-63159, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

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-robot avatar Dec 16 '25 18:12 openshift-ci-robot

/cherrypick release-4.21

sg00dwin avatar Dec 16 '25 19:12 sg00dwin

@sg00dwin: once the present PR merges, I will cherry-pick it on top of release-4.21 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.21

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.

Needs backport to 4.20, 4.19

sg00dwin avatar Dec 16 '25 19:12 sg00dwin

/verified later @yanpzhan

sg00dwin avatar Dec 17 '25 17:12 sg00dwin

@sg00dwin: This PR has been marked to be verified later by @yanpzhan.

In response to this:

/verified later @yanpzhan

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-robot avatar Dec 17 '25 17:12 openshift-ci-robot

/label acknowledge-critical-fixes-only

sg00dwin avatar Dec 17 '25 17:12 sg00dwin

/retest-required

Remaining retests: 0 against base HEAD 9ac9e36e6bca30bd2b7f84752cc588f4cb842b44 and 2 for PR HEAD c07ed11c4f749ad7c7d9a8c4f438e0e61e887d88 in total

openshift-ci-robot avatar Dec 17 '25 18:12 openshift-ci-robot

/retest-required

sg00dwin avatar Dec 17 '25 21:12 sg00dwin

/retest-required

sg00dwin avatar Dec 18 '25 13:12 sg00dwin

@sg00dwin: all tests passed!

Full PR test history. Your PR dashboard.

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.

openshift-ci[bot] avatar Dec 18 '25 19:12 openshift-ci[bot]

@sg00dwin: Jira Issue OCPBUGS-63159: All pull requests linked via external trackers have merged:

This pull request has the verified-later tag and will need to be manually moved to VERIFIED after testing. Jira Issue OCPBUGS-63159 has been moved to the MODIFIED state.

In response to this:

Includes tests for

  • Sorts events by timestamp across namespaces
  • Filters events by selected namespace
  • Clears and re-filters events when namespace changes
  • Validates event type filtering

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-robot avatar Dec 19 '25 04:12 openshift-ci-robot

@sg00dwin: new pull request created: #15867

In response to this:

/cherrypick release-4.21

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.

Fix included in accepted release 4.22.0-0.nightly-2025-12-21-224908

openshift-merge-robot avatar Dec 22 '25 04:12 openshift-merge-robot