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

new: bump plugin API to 3.10.0. #41

Merged
merged 5 commits into from
Jan 8, 2025
Merged

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Oct 24, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area plugin-sdk

What this PR does / why we need it:

Plugin API 3.8.0 introduced support for suggested output formats in extractor plugins; support it.
falcosecurity/libs#2116

Plugin API 3.9.0 introduced support for exposing get_owner_last_error in capture listening capability.
falcosecurity/libs#2147

Plugin API 3.10.0 introduced support for new async capability related dump_state API.
falcosecurity/libs#2152

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

new: bump plugin API to 3.10.0

@FedeDP
Copy link
Contributor Author

FedeDP commented Oct 24, 2024

/hold
because we are relying upon a development libs version that is not supported by latest Falco.

leogr
leogr previously approved these changes Oct 28, 2024
@FedeDP
Copy link
Contributor Author

FedeDP commented Nov 5, 2024

Will need to bump tp 3.9.0 after falcosecurity/libs#2147 is merged

@poiana poiana added size/M and removed size/S labels Nov 5, 2024
@FedeDP FedeDP changed the title new: bump plugin API to 3.8.0. new: bump plugin API to 3.9.0. Nov 5, 2024
leogr
leogr previously approved these changes Nov 5, 2024
@FedeDP
Copy link
Contributor Author

FedeDP commented Nov 7, 2024

Will bump to 3.10.0 once falcosecurity/libs#2152 is merged :D

@FedeDP
Copy link
Contributor Author

FedeDP commented Nov 8, 2024

I pushed a commit without DCO because it relies on falcosecurity/libs#2152 HEAD hash.
Will make sure to amend it once that PR is merged.
I pushed it to give an idea of what the new dump API would look like.

@@ -21,7 +21,7 @@ OUTPUT := lib$(NAME).so

SDK_DIR := ../..
SDK_INCLUDE := $(SDK_DIR)/include/
CXX_FLAGS := -shared -std=c++0x -Wall -fPIC -I$(SDK_INCLUDE)
CXX_FLAGS := -shared -std=c++17 -Wall -fPIC -I$(SDK_INCLUDE)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched plugin build to c++17 by default since this is what we build Falco with.

@@ -112,6 +112,22 @@ class my_plugin
}
}

// (optional)
void dump(std::unique_ptr<falcosecurity::async_event_handler> h)
Copy link
Contributor Author

@FedeDP FedeDP Nov 8, 2024

Choose a reason for hiding this comment

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

This is how the new dump API would look like for end users (plugin writers).

ss_plugin_rc dump(ss_plugin_owner_t* o,
const ss_plugin_async_event_handler_t h)
{
FALCOSECURITY_CATCH_ALL(Base::m_last_err_storage, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just return SS_PLUGIN_FAILURE if any exception was thrown during the dump.

@FedeDP FedeDP changed the title new: bump plugin API to 3.9.0. new: bump plugin API to 3.10.0. Nov 8, 2024
@leogr
Copy link
Member

leogr commented Nov 12, 2024

/check-dco

@leogr
Copy link
Member

leogr commented Nov 12, 2024

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • eb80c81 new: bump plugin API to 3.10.0.

cc @FedeDP

@FedeDP
Copy link
Contributor Author

FedeDP commented Nov 13, 2024

#41 (comment) @leogr

@FedeDP FedeDP force-pushed the new/plugin_api_extract_addOutput branch from eb80c81 to 76eac92 Compare November 29, 2024 14:34
@FedeDP FedeDP force-pushed the new/plugin_api_extract_addOutput branch from 76eac92 to 582d8a1 Compare November 29, 2024 14:35
@FedeDP
Copy link
Contributor Author

FedeDP commented Nov 29, 2024

Since falcosecurity/libs#2152 was merged to libs master, i amended last commit and added DCO.

Support new `addOutput` extractor plugin `field_info` field.

Signed-off-by: Federico Di Pierro <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
Add support for new `dump_state` async capability API.

Signed-off-by: Federico Di Pierro <[email protected]>
@FedeDP FedeDP force-pushed the new/plugin_api_extract_addOutput branch from 582d8a1 to 5e1273e Compare December 20, 2024 07:38
@FedeDP FedeDP added this to the 0.2.0 milestone Jan 8, 2025
@FedeDP
Copy link
Contributor Author

FedeDP commented Jan 8, 2025

Since we just released plugin-sdk-cpp 0.1.0 compatible with latest available Falco (0.39.x), we can now merge this one.
/unhold

@poiana poiana merged commit 930cc8b into master Jan 8, 2025
4 checks passed
@poiana
Copy link

poiana commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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 deleted the new/plugin_api_extract_addOutput branch January 8, 2025 08:54
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.

3 participants