Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN-2302]: watch for modified events, do not toast them #2370

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

BenElferink
Copy link
Contributor

@BenElferink BenElferink commented Feb 3, 2025

This pull request introduces several changes to the Kubernetes instrumentation configuration watcher and various frontend components to handle modified events and improve notification handling. The most important changes include adding support for modified events in the watcher, updating notification messages, and enhancing the CRUD operations for destinations and sources.

Kubernetes Instrumentation Configuration Watcher:

  • Added a new event batcher for handling modified instrumentation configurations (frontend/kube/watchers/instrumentation_config_watcher.go). [1] [2]
  • Implemented a function to handle modified instrumentation configurations and integrated it into the event handling logic (frontend/kube/watchers/instrumentation_config_watcher.go). [1] [2]

Notification Messages:

  • Updated notification messages for source and destination updates to include the name of the updated entity (frontend/webapp/cypress/constants/index.ts).
  • Adjusted test cases to reflect the updated notification messages (frontend/webapp/cypress/e2e/03-sources.cy.ts, frontend/webapp/cypress/e2e/04-destinations.cy.ts). [1] [2]

CRUD Operations Enhancements:

  • Added removePendingItems to the useDestinationCRUD hook and updated the onCompleted handler to refetch data and notify the user upon successful updates (frontend/webapp/hooks/destinations/useDestinationCRUD.ts). [1] [2] [3]
  • Updated the useSourceCRUD hook to include the name of the updated source in the success notification (frontend/webapp/hooks/sources/useSourceCRUD.ts).

SSE Handling:

  • Modified the SSE handling logic to exclude "modified" and "connected" events from toast notifications and updated constants for SSE event types (frontend/webapp/hooks/notification/useSSE.ts, frontend/webapp/utils/constants/string.tsx). [1] [2] [3]

@BenElferink BenElferink added enhancement New feature or request frontend labels Feb 3, 2025
Copy link

@BenElferink BenElferink enabled auto-merge (squash) February 3, 2025 15:53
@BenElferink BenElferink merged commit 1f010bb into odigos-io:main Feb 3, 2025
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants