wip: bisect the table-cleanup PR#2811
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnosek 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 |
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2811 +/- ##
==========================================
- Coverage 74.53% 74.41% -0.12%
==========================================
Files 292 298 +6
Lines 29987 30476 +489
Branches 4660 4829 +169
==========================================
+ Hits 22350 22679 +329
- Misses 7637 7797 +160
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:
|
976672c to
c75e0b4
Compare
userspace/libsinsp/plugin_tables.cpp
Outdated
| auto container_id_field_ptr = dynamic_cast<libsinsp::state::typed_accessor<std::string>*>( | ||
| container_id_field.release()); | ||
| if(container_id_field_ptr == nullptr) { | ||
| delete container_id_field_ptr; |
There was a problem hiding this comment.
I guess this does nothing because container_id_field_ptr is nullptror ...
...and maybe something along the lines if this was the intention:
auto raw = container_id_field.release();
auto typed = dynamic_cast<libsinsp::state::typed_accessor<std::string>*>(raw);
if(typed == nullptr) {
delete raw; // delete the original pointer, not the cast result
throw ...;
}
m_container_id_field.reset(typed);
This does introduce some code duplication but we'll clean it up later. Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
This does introduce some code duplication but we'll clean it up later. Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
This does introduce some code duplication but we'll clean it up later. Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
5e4ff0e to
9ca1646
Compare
The two obvious implementations are `static_struct` and `dynamic_struct`, but there's another one hiding inside the STL table adapter support code. Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
0bee999 to
8aa0da8
Compare
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
This is a wrapper around both static_struct and dynamic_struct. Its purpose is to make life for types inheriting from both a little bit easier (no need to disambiguate parent method calls). Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
…r class Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
8aa0da8 to
c6289a2
Compare
Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>
What type of PR is this?
/kind cleanup
/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:
This PR serves as a CI runner for issues I can't repro locally. Don't mind me :)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: