-
Notifications
You must be signed in to change notification settings - Fork 174
feat(userspace/libsinsp)!: remove sinsp::get_thread_ref()
#2402
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
feat(userspace/libsinsp)!: remove sinsp::get_thread_ref()
#2402
Conversation
As the end goal is to remove unneeded duties from `sinsp`, remove `sinsp::get_thread_ref()` API and let users directly call the corresponding thread manager API. BREAKING CHANGE: remove `sinsp::get_thread_ref()` Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2402 +/- ##
==========================================
+ Coverage 77.26% 77.28% +0.01%
==========================================
Files 227 227
Lines 30323 30348 +25
Branches 4644 4644
==========================================
+ Hits 23429 23453 +24
- Misses 6894 6895 +1
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:
|
/milestone 0.22.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: 3c19a7b1de3ea86def623aab1de1bef54e5d1a05
|
@throws a sinsp_exception containing the error string is thrown in case | ||
of failure. | ||
*/ | ||
inline const threadinfo_map_t::ptr_t& get_thread_ref(int64_t tid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit out of the loop, so I might be missing some context, but do we have an alternative for people using the inspector to reach in and get a thread_info? Because I don't see one being added in this PR and I also don't see a way to get access to the thread_manager either...
I know the main use for Falco is to get events, but we actually do use this method in StackRox and this would break our use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is available publicly. The goal here is to remove the big amount of APIs provided by sinsp as a mirror of internal components APIs. We are doing this is order to make sinsp more maintanable and reduce the mental burden while making changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"reduce the mental burden while making changes" +1 and much appreciated @ekoops ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops, FedeDP, incertum 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 |
/unhold |
What type of PR is this?
/kind cleanup
/kind design
/kind feature
Any specific area of the project related to this PR?
/area libscap
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This PR is part of a series #2343.
It removes
sinsp::get_thread_ref()
. As the end goal is to remove unneeded duties fromsinsp
, it removes this API and lets users directly call the corresponding thread manager API.BREAKING CHANGE: remove
sinsp::get_thread_ref()
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: