allowlists: apply items to existing decisions in batch
If the user has a ton of allowlist items (eg, > 10k), one DB request was made per item, which was very slow.
Batch the checks to reduce the amount of requests and load on the DB.
@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
-
/kind feature -
/kind enhancement -
/kind refactoring -
/kind fix -
/kind chore -
/kind dependencies
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
@blotus: There are no area labels on this PR. You can add as many areas as you see fit.
-
/area agent -
/area local-api -
/area cscli -
/area appsec -
/area security -
/area configuration
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
/kind fix /area local-api
Codecov Report
:x: Patch coverage is 54.68750% with 29 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 62.83%. Comparing base (65b7465) to head (7fdee0b).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pkg/database/allowlists.go | 54.68% | 25 Missing and 4 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #4095 +/- ##
==========================================
+ Coverage 62.81% 62.83% +0.01%
==========================================
Files 464 464
Lines 33272 33303 +31
==========================================
+ Hits 20901 20927 +26
+ Misses 10247 10246 -1
- Partials 2124 2130 +6
| Flag | Coverage Δ | |
|---|---|---|
| bats | 46.08% <54.68%> (-0.05%) |
:arrow_down: |
| unit-linux | 35.71% <51.56%> (+0.12%) |
:arrow_up: |
| unit-windows | 25.02% <0.00%> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.