Skip to content

ACM-21338 FleetResourceEventStream#4750

Merged
openshift-merge-bot[bot] merged 24 commits intostolostron:mainfrom
vishsanghishetty:ACM-21338-FleetResourceEventStream
Aug 1, 2025
Merged

ACM-21338 FleetResourceEventStream#4750
openshift-merge-bot[bot] merged 24 commits intostolostron:mainfrom
vishsanghishetty:ACM-21338-FleetResourceEventStream

Conversation

@vishsanghishetty
Copy link
Copy Markdown
Contributor

@vishsanghishetty vishsanghishetty commented Jul 11, 2025

📝 Summary

Ticket Summary (Title):

Add FleetResourceEventStream component for multicluster event streaming

Overview

This PR introduces a multicluster-aware version of the ResourceEventStream component. Instead of only showing events from the hub cluster, it can now display real-time Kubernetes events for resources running on any managed cluster in your fleet.

The component intelligently falls back to the standard OpenShift console ResourceEventStream when viewing hub cluster resources, so existing functionality remains unchanged while adding new multicluster capabilities..

Key Features

  • Smart Fallback: Automatically falls back to OpenShift console's ResourceEventStream for hub cluster resources
  • Multicluster Support: Uses WebSocket connections to stream events from managed clusters
  • Event Filtering: Filters events by involvedObject.uid, involvedObject.name, and involvedObject.kind
  • Real-time Streaming: Displays up to 50 most recent events with live updates
  • Interactive Controls: Play/pause functionality for event streaming
  • Error Handling: Comprehensive error states and reconnection logic

Technical Implementation

  • Uses FleetK8sResourceCommon type which extends K8sResourceCommon with optional cluster property
  • Leverages existing fleet API infrastructure (fleetWatch, useFleetK8sAPIPath, useHubClusterName)
  • Includes test coverage for all scenarios

Ticket Link:

https://issues.redhat.com/browse/ACM-21338

Type of Change:

  • 🐞 Bug Fix
  • ✨ Feature
  • 🔧 Refactor
  • 💸 Tech Debt
  • 🧪 Test-related
  • 📄 Docs

✅ Checklist

General

  • PR title follows the convention (e.g. ACM-12340 Fix bug with...)
  • Code builds and runs locally without errors
  • No console logs, commented-out code, or unnecessary files
  • All commits are meaningful and well-labeled
  • All new display strings are externalized for localization (English only)
  • (Nice to have) JSDoc comments added for new functions and interfaces

If Feature

  • UI/UX reviewed (if applicable)
  • All acceptance criteria met
  • Unit test coverage added or updated
  • Relevant documentation or comments included

If Bugfix

  • Root cause and fix summary are documented in the ticket (for future reference / errata)
  • Fix tested thoroughly and resolves the issue
  • Test(s) added to prevent regression

🗒️ Notes for Reviewers

Copy link
Copy Markdown
Contributor

@KevinFCormier KevinFCormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Vishali,

I left a few inline comments. In addition:

  • It would be great if you could move the component directly under src/components and then move the src/components/FleetResourceEventStream folder under src/internal... I'm trying to have a flat structure under src/api and src/components having 1 file per exported API.
  • I had asked you to incorporate some recent updates from Ugo into your work. See #4746 (comment)
  • It looks like the event stream is not actually working (and it wasn't before your changes either). Can you investigate this and try to resolve?
image

Comment thread frontend/packages/multicluster-sdk/src/components/index.ts Outdated
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 18, 2025
@stolostron stolostron deleted a comment from sonarqubecloud Bot Jul 18, 2025
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 18, 2025
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 19, 2025
@stolostron stolostron deleted a comment from sonarqubecloud Bot Jul 19, 2025
@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from cc08dac to eb3ab92 Compare July 19, 2025 13:26
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 19, 2025
@stolostron stolostron deleted a comment from sonarqubecloud Bot Jul 19, 2025
@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from eb3ab92 to f6bf697 Compare July 24, 2025 17:34
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 24, 2025
@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from a42b699 to 9cb7645 Compare July 25, 2025 12:19
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 25, 2025
@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from a1df9a4 to 6c18c21 Compare July 25, 2025 19:10
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 25, 2025
@stolostron stolostron deleted a comment from sonarqubecloud Bot Jul 25, 2025
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 25, 2025
@stolostron stolostron deleted a comment from sonarqubecloud Bot Jul 25, 2025
@stolostron stolostron deleted a comment from openshift-ci Bot Jul 29, 2025
@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from 0dbe889 to b8ea1aa Compare July 29, 2025 17:29
@vishsanghishetty
Copy link
Copy Markdown
Contributor Author

/retest

@vishsanghishetty vishsanghishetty force-pushed the ACM-21338-FleetResourceEventStream branch from b8ea1aa to 74ce144 Compare July 30, 2025 22:40
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
vishsanghishetty and others added 19 commits August 1, 2025 10:24
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
…ebSocket improvements

Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: vsanghishetty <vishali.kamenani@ymail.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
@KevinFCormier KevinFCormier force-pushed the ACM-21338-FleetResourceEventStream branch from 1e5a1eb to 6058126 Compare August 1, 2025 16:12
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
@KevinFCormier
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 1, 2025
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Aug 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KevinFCormier, vishsanghishetty

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 [KevinFCormier,vishsanghishetty]

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

@KevinFCormier
Copy link
Copy Markdown
Contributor

/test unit-tests-sonarcloud

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Aug 1, 2025

@openshift-merge-bot openshift-merge-bot Bot merged commit 06af603 into stolostron:main Aug 1, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants