-
Notifications
You must be signed in to change notification settings - Fork 473
feat(dependencies): add GetAllEventDependentsOfProbe #5024
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new method GetAllEventsDependingOnProbe to the dependencies manager that returns all events (both direct and transitive) that depend on a given probe. The implementation uses depth-first traversal with memoization to compute the transitive closure of event dependents.
- Adds
GetAllEventsDependingOnProbemethod to query all events depending on a probe - Implements efficient DFS-based transitive closure computation with deduplication
- Provides comprehensive test coverage with 15 test cases covering error conditions, simple dependencies, transitive dependencies, and complex patterns like diamond dependencies
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/events/dependencies/manager.go | Adds the GetAllEventsDependingOnProbe method and the helper collectAllEventDependents function for computing transitive closure of event dependents |
| pkg/events/dependencies/manager_test.go | Adds comprehensive test suite with 15 test cases covering error scenarios, direct dependents, transitive dependents, and complex dependency patterns |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5024 +/- ##
==========================================
+ Coverage 29.72% 30.19% +0.46%
==========================================
Files 234 232 -2
Lines 26186 25897 -289
==========================================
+ Hits 7785 7820 +35
+ Misses 17864 17537 -327
- Partials 537 540 +3
🚀 New features to boost your workflow:
|
5bc8322 to
eaaf115
Compare
Add a new method to the Manager that retrieves all events depending on a specified probe, including both direct and transitive dependents. This functionality is accompanied by comprehensive unit tests to cover various success and error scenarios. Co-authored-by: Raphael Campos <[email protected]>
eaaf115 to
39cf9dd
Compare
1. Explain what the PR does
39cf9dd feat(dependencies): add GetAllEventDependentsOfProbe
--
2. Explain how to test it
3. Other comments