Skip to content

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Apr 14, 2025

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This PR is part of a series #2343.
It adds a notify parameter to both sinsp_threadinfo::set_user() and sinsp_threadinfo::set_group(), to allow control over update notification and move inspector references out of sinsp_threadinfo.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

feat(userspace/libsinsp)!: pass `notify` into `set_user` signature
feat(userspace/libsisnp)!: pass `notify` into `set_group` signature

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 78.68852% with 13 lines in your changes missing coverage. Please review.

Project coverage is 77.18%. Comparing base (a358970) to head (5f7c071).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
userspace/libsinsp/thread_manager.cpp 0.00% 5 Missing ⚠️
userspace/libsinsp/sinsp.cpp 63.63% 4 Missing ⚠️
userspace/libsinsp/parsers.cpp 85.71% 2 Missing ⚠️
userspace/libsinsp/user.h 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2347      +/-   ##
==========================================
- Coverage   77.19%   77.18%   -0.01%     
==========================================
  Files         227      227              
  Lines       30206    30231      +25     
  Branches     4619     4618       -1     
==========================================
+ Hits        23318    23335      +17     
- Misses       6888     6896       +8     
Flag Coverage Δ
libsinsp 77.18% <78.68%> (-0.01%) ⬇️

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.

Copy link

github-actions bot commented Apr 14, 2025

Perf diff from master - unit tests

     6.12%     -0.58%  [.] sinsp_parser::reset
     1.19%     -0.39%  [.] sinsp_parser::event_cleanup
     3.52%     +0.30%  [.] next_event_from_file
     1.17%     +0.27%  [.] next
     0.30%     +0.24%  [.] scap_next
     4.37%     -0.22%  [.] sinsp_thread_manager::find_thread
     1.02%     +0.19%  [.] libsinsp::sinsp_suppress::process_event
     0.84%     -0.19%  [.] sinsp_evt::get_ts
     1.46%     +0.18%  [.] sinsp_parser::process_event
     0.38%     +0.16%  [.] sinsp_parser::parse_context_switch

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            -0.0111         -0.0111           150           149           150           149
BM_sinsp_split_median                                          -0.0104         -0.0104           150           149           150           149
BM_sinsp_split_stddev                                          +0.1034         +0.1039             1             1             1             1
BM_sinsp_split_cv                                              +0.1158         +0.1163             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0205         -0.0205            60            59            60            59
BM_sinsp_concatenate_paths_relative_path_median                -0.0052         -0.0052            60            60            60            60
BM_sinsp_concatenate_paths_relative_path_stddev                +1.2370         +1.2342             1             2             1             2
BM_sinsp_concatenate_paths_relative_path_cv                    +1.2838         +1.2810             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0189         -0.0189            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_median                   -0.0188         -0.0188            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.0193         +0.0195             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.0389         +0.0391             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.1430         -0.1431            67            58            67            58
BM_sinsp_concatenate_paths_absolute_path_median                -0.1461         -0.1461            67            57            67            57
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.2816         -0.2816             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.1616         -0.1617             0             0             0             0

@ekoops ekoops force-pushed the ekoops/set-user-group branch from ae509f6 to d2f4fd1 Compare April 14, 2025 14:16
@ekoops ekoops requested a review from gnosek April 14, 2025 17:26
gnosek
gnosek previously approved these changes Apr 15, 2025
@poiana
Copy link
Contributor

poiana commented Apr 15, 2025

LGTM label has been added.

Git tree hash: bd4bfd432dcfcf01b654969deba6977ec56393ca

leogr
leogr previously approved these changes Apr 15, 2025
@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Apr 15, 2025
@FedeDP
Copy link
Contributor

FedeDP commented Apr 15, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone Apr 15, 2025
ekoops added 2 commits April 15, 2025 13:46
Pass `notify` as `sinsp_threadinfo::set_user()` flag to enable
external control over thread user update notification.

BREAKING CHANGE: update `sinsp_threadinfo::set_user()`,
`sinsp_threadinfo::init()` signatures and `user_group_updater`
constructor.

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Pass `notify` as `sinsp_threadinfo::set_group()` flag to enable
external control over thread user update notification.

BREAKING CHANGE: update `sinsp_threadinfo::set_group()`,
`sinsp_threadinfo::init()` signatures and `user_group_updater`
constructor.

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
@ekoops ekoops dismissed stale reviews from leogr and gnosek via 5f7c071 April 15, 2025 11:47
@ekoops ekoops force-pushed the ekoops/set-user-group branch from d2f4fd1 to 5f7c071 Compare April 15, 2025 11:47
@poiana poiana removed the lgtm label Apr 15, 2025
@poiana poiana requested review from gnosek and leogr April 15, 2025 11:47
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Apr 15, 2025

LGTM label has been added.

Git tree hash: fb44c7d1c9ad119297e679e76fdf5a021f76b643

@poiana
Copy link
Contributor

poiana commented Apr 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit f84c994 into falcosecurity:master Apr 15, 2025
47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Apr 15, 2025
@ekoops ekoops deleted the ekoops/set-user-group branch April 15, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants