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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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?:

NONE

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

Signed-off-by: Federico Di Pierro <[email protected]>
@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.

Signed-off-by: Federico Di Pierro <[email protected]>
@FedeDP FedeDP force-pushed the new/plugin_api_extract_addOutput branch from e3a4fb4 to 68377c2 Compare October 24, 2024 08:13
@poiana poiana added size/S and removed size/L labels Oct 24, 2024
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

Signed-off-by: Federico Di Pierro <[email protected]>
@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
Signed-off-by: Federico Di Pierro <[email protected]>
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

@poiana
Copy link

poiana commented Nov 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

1 similar comment
@poiana
Copy link

poiana commented Nov 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 added size/L and removed size/M labels Nov 8, 2024
@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

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 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.

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