ROX-30390: Don't queue open enriched-entities forever#16532
Conversation
|
Skipping CI for Draft Pull Request. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
This change is part of the following stack:
Change managed by git-spice. |
|
Images are ready for the commit at 48c3ec7. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #16532 +/- ##
==========================================
- Coverage 48.81% 48.80% -0.01%
==========================================
Files 2679 2680 +1
Lines 200331 200342 +11
==========================================
- Hits 97791 97783 -8
- Misses 94935 94951 +16
- Partials 7605 7608 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
39a7266 to
0d2e13e
Compare
6140a99 to
75a4b41
Compare
0d2e13e to
16f47ce
Compare
cf2fd11 to
f42e378
Compare
16f47ce to
399b027
Compare
dbfcf08 to
3fd11bf
Compare
399b027 to
4b2b0a5
Compare
3fd11bf to
67d9d64
Compare
6f2d24e to
49bdb60
Compare
3b07945 to
4dfb3c0
Compare
49bdb60 to
727558f
Compare
4dfb3c0 to
fd59e5a
Compare
9b9dd17 to
140f9db
Compare
92e8fb4 to
c8fc930
Compare
140f9db to
d9cb951
Compare
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Consider centralizing the UpdateComputer selection based on the
NetworkFlowUseLegacyUpdateComputerflag into a dedicated factory/helper to reduce duplication betweencreateManagerandCreateSensor. - Instead of reading the environment flag directly within manager methods, inject the chosen UpdateComputer via constructor to improve clarity and testability of the enrichment pipeline logic.
- Add targeted unit tests for the new
checkRemoveConditionfunction to validate both legacy and non-legacy removal behaviors and ensure they match the intended logic.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider centralizing the UpdateComputer selection based on the `NetworkFlowUseLegacyUpdateComputer` flag into a dedicated factory/helper to reduce duplication between `createManager` and `CreateSensor`.
- Instead of reading the environment flag directly within manager methods, inject the chosen UpdateComputer via constructor to improve clarity and testability of the enrichment pipeline logic.
- Add targeted unit tests for the new `checkRemoveCondition` function to validate both legacy and non-legacy removal behaviors and ensure they match the intended logic.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
48c3ec7 to
6cb18bf
Compare
Done in 54711e1
Done in 54711e1
Done in 6cb18bf |
6cb18bf to
367cc38
Compare
|
Images are ready for the commit at dd5b1bb. To use with deploy scripts, first |
|
/retest |
|
@vikin91: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/retest |
🐑 Shepherd of this stack is @lvalerom and @rhybrillou (when back)
Description
Here, we change the rule for removing the already enriched enriched-entities (EEs) from the queue:
The rest of the PR is:
Change in
checkRemoveConditionBefore that, we kept the open EEs in
hostConnsfor as long as they were open. After this change, we can treat thehostConnsto be a real enrichment queue, so that it holds only those items that have not been enriched yet or the enrichment must be retried.I did a careful investigation why we were keeping the open connections in
hostConnsforever and it was only for the correct calculation of the updates being sent to Central using thelegacyupdate computer. After switching to thecategorizedimplementation, this change can be introduced without consequences to the feature.User-facing documentation
Testing and quality
Automated testing
How I validated my change