Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact acquisition: build profiles (optionally exclude datasources from final binary) #3217

Merged
merged 12 commits into from
Sep 12, 2024

Conversation

mmetc
Copy link
Contributor

@mmetc mmetc commented Sep 6, 2024

No description provided.

Copy link

github-actions bot commented Sep 6, 2024

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

Copy link

github-actions bot commented Sep 6, 2024

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

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 69.17293% with 41 lines in your changes missing coverage. Please review.

Project coverage is 51.27%. Comparing base (57539f6) to head (79cc22a).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
pkg/acquisition/acquisition.go 78.33% 8 Missing and 5 partials ⚠️
pkg/cwversion/constraint/constraint.go 30.76% 6 Missing and 3 partials ⚠️
pkg/cwversion/version.go 63.15% 6 Missing and 1 partial ⚠️
cmd/crowdsec/appsec.go 40.00% 2 Missing and 1 partial ⚠️
cmd/crowdsec/crowdsec.go 0.00% 1 Missing and 2 partials ⚠️
pkg/acquisition/appsec.go 50.00% 0 Missing and 1 partial ⚠️
pkg/acquisition/k8s.go 50.00% 0 Missing and 1 partial ⚠️
pkg/acquisition/s3.go 50.00% 0 Missing and 1 partial ⚠️
pkg/acquisition/wineventlog.go 50.00% 0 Missing and 1 partial ⚠️
pkg/leakybucket/manager_load.go 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3217      +/-   ##
==========================================
+ Coverage   51.25%   51.27%   +0.01%     
==========================================
  Files         340      355      +15     
  Lines       38771    38823      +52     
==========================================
+ Hits        19873    19905      +32     
- Misses      16942    16953      +11     
- Partials     1956     1965       +9     
Flag Coverage Δ
bats 40.76% <58.18%> (+0.02%) ⬆️
unit-linux 34.69% <71.08%> (+0.04%) ⬆️
unit-windows 28.62% <51.90%> (+0.03%) ⬆️

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.

@mmetc mmetc changed the title Refact acquisition refact acquisition: optionally exclude datasources from final binary Sep 9, 2024
@LaurenceJJones
Copy link
Contributor

LaurenceJJones commented Sep 9, 2024

Just to ask a question instead of determining "minimal" shouldnt we create it so users have to define the build flags by default? yes it will break third partys but they can patch it no? as I see users maybe wanting to create a "docker" acquisition only build or something which they cannot do from this.

Yes, its an edge case which they can patch there own Makefile but 🤷🏻

@mmetc
Copy link
Contributor Author

mmetc commented Sep 9, 2024

Just to ask a question instead of determining "minimal" shouldnt we create it so users have to define the build flags by default? yes it will break third partys but they can patch it no? as I see users maybe wanting to create a "docker" acquisition only build or something which they cannot do from this.

Yes, its an edge case which they can patch there own Makefile but 🤷🏻

I'm rewriting that part.

@mmetc
Copy link
Contributor Author

mmetc commented Sep 9, 2024

@LaurenceJJones better now?

@mmetc mmetc changed the title refact acquisition: optionally exclude datasources from final binary refact acquisition: build profiles (optionally exclude datasources from final binary) Sep 9, 2024
@mmetc mmetc requested a review from blotus September 9, 2024 13:33
@mmetc mmetc marked this pull request as ready for review September 9, 2024 13:34
Copy link
Contributor

@sabban sabban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mmetc
Copy link
Contributor Author

mmetc commented Sep 9, 2024

If we merge this, I'll remove "EXCLUDE_MEDIUM", it was just an example.

@mmetc mmetc force-pushed the refact-acquisition branch 2 times, most recently from bd7cb4f to 8786bc6 Compare September 10, 2024 08:26
@mmetc mmetc marked this pull request as draft September 10, 2024 08:54
@mmetc mmetc force-pushed the refact-acquisition branch 2 times, most recently from f121f8c to 6fa131b Compare September 10, 2024 11:40
@mmetc mmetc marked this pull request as ready for review September 10, 2024 12:15
@mmetc mmetc merged commit cae76ba into master Sep 12, 2024
17 checks passed
@mmetc mmetc deleted the refact-acquisition branch September 12, 2024 15:26
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.

4 participants