OCPBUGS-63159: Prevent the display of events from projects other than the currently selected project
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: 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.
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
typeand cross-namespace ordering. - Confirm the WebSocket closure and
sortedEventsreset 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.
/jira refresh
@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.
@coderabbitai review
✅ 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.
/lgtm
[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
- ~~frontend/OWNERS~~ [rhamilto]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest-required
/jira refresh
@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.
/jira refresh
@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.
/cherrypick release-4.21
@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
/verified later @yanpzhan
@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.
/label acknowledge-critical-fixes-only
/retest-required
Remaining retests: 0 against base HEAD 9ac9e36e6bca30bd2b7f84752cc588f4cb842b44 and 2 for PR HEAD c07ed11c4f749ad7c7d9a8c4f438e0e61e887d88 in total
/retest-required
/retest-required
@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.
@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.
@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