Skip to content

Conversation

@geyslan
Copy link
Member

@geyslan geyslan commented Nov 7, 2025

1. Explain what the PR does

39cf9dd feat(dependencies): add GetAllEventDependentsOfProbe

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]

--

2. Explain how to test it

3. Other comments

@geyslan geyslan self-assigned this Nov 7, 2025
Copilot AI review requested due to automatic review settings November 7, 2025 16:28
Copy link

Copilot AI left a 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 GetAllEventsDependingOnProbe method 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
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.19%. Comparing base (034cbab) to head (39cf9dd).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
pkg/events/dependencies/manager_events.go 85.71% 4 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unit 30.19% <85.71%> (+0.46%) ⬆️
Files with missing lines Coverage Δ
pkg/events/dependencies/manager_events.go 83.61% <85.71%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@geyslan geyslan changed the title feat(dependencies): add GetAllEventsDependingOnProbe feat(dependencies): add GetAllEventDependentsOfProbe Nov 13, 2025
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]>
@geyslan geyslan merged commit 4627bdb into aquasecurity:main Nov 21, 2025
85 of 87 checks passed
@geyslan geyslan deleted the feat-deps-pkg branch November 21, 2025 18:31
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.

2 participants