crowdsecurity / crowdsec

CrowdSec - the open-source and participative security solution offering crowdsourced protection against malicious IPs and access to the most advanced real-world CTI.
https://crowdsec.net
MIT License
8.1k stars 419 forks source link

refactor context (cscli, pkg/database) #3071

Closed mmetc closed 2 weeks ago

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 51.21951% with 20 lines in your changes missing coverage. Please review.

Project coverage is 52.47%. Comparing base (24687e9) to head (805bdf9).

Files Patch % Lines
cmd/crowdsec-cli/papi.go 0.00% 4 Missing and 2 partials :warning:
cmd/crowdsec-cli/alerts.go 0.00% 2 Missing and 1 partial :warning:
cmd/crowdsec-cli/require/require.go 50.00% 2 Missing and 1 partial :warning:
cmd/crowdsec/run_in_svc_windows.go 0.00% 3 Missing :warning:
cmd/crowdsec-cli/bouncers.go 66.66% 1 Missing :warning:
cmd/crowdsec-cli/machines.go 66.66% 1 Missing :warning:
cmd/crowdsec-cli/support.go 50.00% 1 Missing :warning:
cmd/crowdsec/serve.go 66.66% 1 Missing :warning:
pkg/database/database.go 75.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3071 +/- ## =========================================== + Coverage 34.10% 52.47% +18.37% =========================================== Files 280 281 +1 Lines 35420 35435 +15 =========================================== + Hits 12079 18594 +6515 + Misses 22041 15016 -7025 - Partials 1300 1825 +525 ``` | [Flag](https://app.codecov.io/gh/crowdsecurity/crowdsec/pull/3071/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crowdsecurity) | Coverage Δ | | |---|---|---| | [bats](https://app.codecov.io/gh/crowdsecurity/crowdsec/pull/3071/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crowdsecurity) | `40.20% <57.14%> (?)` | | | [unit-linux](https://app.codecov.io/gh/crowdsecurity/crowdsec/pull/3071/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crowdsecurity) | `34.80% <10.00%> (-0.01%)` | :arrow_down: | | [unit-windows](https://app.codecov.io/gh/crowdsecurity/crowdsec/pull/3071/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crowdsecurity) | `30.96% <18.42%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crowdsecurity#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mmetc commented 2 weeks ago

this passes a context only for schema creation, not the actual queries, for now