feat(libsinsp): add multivalue transformer support#2776
feat(libsinsp): add multivalue transformer support#2776poiana merged 8 commits intofalcosecurity:masterfrom
Conversation
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
1b38b80 to
0f77b85
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2776 +/- ##
==========================================
- Coverage 74.53% 74.52% -0.01%
==========================================
Files 292 294 +2
Lines 29987 30541 +554
Branches 4660 4757 +97
==========================================
+ Hits 22350 22762 +412
- Misses 7637 7779 +142
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:
|
0323726 to
7c68537
Compare
|
LGTM label has been added. DetailsGit tree hash: 02ddb028b028fba91545cd8982af7adecb01e972 |
userspace/libsinsp/sinsp_filtercheck_multivalue_transformer.cpp
Outdated
Show resolved
Hide resolved
442d99a to
c17e840
Compare
|
LGTM label has been added. DetailsGit tree hash: 9f4a35ae055a555a436a16741f3bccef02f7f5b0 |
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com> Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
…former Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
c17e840 to
44dc78c
Compare
|
LGTM label has been added. DetailsGit tree hash: c235f5e8c38a5514a36bbf1e83587ac595a15e01 |
|
cc @falcosecurity/libs-maintainers |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops, irozzo-1A, leogr, therealbobo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Refactor filter transformers to use interfaces
transformer(arg1, arg2, ...)transformer_list_exprAST node for tuple/list arguments like(fd.name, fd.directory)field_transformer_exprto hold a vector of values instead of a single valueAdd multivalue transformer support
sinsp_filter_multivalue_transformer: Base class for multivalue transformersargument_types()for compile-time type validationresult_type()to describe output typemultivalue_transformer_filter_check: Wrapper that makes multivalue transformers usable as regular filter checkssinsp_filter_multivalue_transformer_join: First multivalue transformer implementation (joins a list with a separator)rawstring_check: Filter check that returns a raw string literalrawnum_check: Filter check that returns a numeric literal (delegates to appropriate type-specific filter check)list_check: Filter check that returns a list of string literalssinsp_extractor_compiler: New compiler for compiling field/transformer expressions (not full filters)transformer_list_exprnodes into multivalue transformersformatter_visitorto properly handle transformer expressions in format stringssinsp_extractor_compilerfor compiling field expressionsWhich issue(s) this PR fixes:
Fixes #1925
Special notes for your reviewer:
Does this PR introduce a user-facing change?: