Skip to content

refact cmd/crowdsec: encapsulate cache into alertBuffer#4300

Merged
mmetc merged 2 commits intomasterfrom
cmd-crowdsec-cache
Feb 20, 2026
Merged

refact cmd/crowdsec: encapsulate cache into alertBuffer#4300
mmetc merged 2 commits intomasterfrom
cmd-crowdsec-cache

Conversation

@mmetc
Copy link
Contributor

@mmetc mmetc commented Feb 11, 2026

simplify loop and reduce risk of races (we didn't lock before reading len)

@mmetc mmetc added this to the 1.7.7 milestone Feb 11, 2026
@github-actions
Copy link

@mmetc: 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.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 69.04762% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.26%. Comparing base (a3dbe7f) to head (a46687c).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
cmd/crowdsec/output.go 62.06% 9 Missing and 2 partials ⚠️
cmd/crowdsec/serve.go 0.00% 0 Missing and 1 partial ⚠️
cmd/crowdsec/win_service.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4300      +/-   ##
==========================================
- Coverage   63.28%   63.26%   -0.03%     
==========================================
  Files         472      472              
  Lines       33382    33384       +2     
==========================================
- Hits        21126    21120       -6     
- Misses      10142    10151       +9     
+ Partials     2114     2113       -1     
Flag Coverage Δ
bats 46.71% <70.73%> (+0.01%) ⬆️
unit-linux 36.13% <0.00%> (+0.07%) ⬆️
unit-windows 24.46% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@mmetc mmetc changed the title refact cmd/crowdsec: encapsulate alertBuffer refact cmd/crowdsec: encapsulate cache into alertBuffer Feb 11, 2026
@mmetc mmetc requested a review from blotus February 17, 2026 15:36
simplify loop and reduce risk of races (we didn't lock before reading len)
@mmetc mmetc force-pushed the cmd-crowdsec-cache branch from e01dcd1 to 128796b Compare February 17, 2026 15:39
@mmetc mmetc merged commit cba68bc into master Feb 20, 2026
20 of 21 checks passed
@mmetc mmetc deleted the cmd-crowdsec-cache branch February 20, 2026 15:44
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