Skip to content

new(plugin): actually allow listing tables, improve fields/tables ergonomics - #83

Merged
poiana merged 4 commits into
falcosecurity:mainfrom
gnosek:list-tables
May 25, 2026
Merged

new(plugin): actually allow listing tables, improve fields/tables ergonomics#83
poiana merged 4 commits into
falcosecurity:mainfrom
gnosek:list-tables

Conversation

@gnosek

@gnosek gnosek commented May 22, 2026

Copy link
Copy Markdown
Collaborator

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 build

/area automation

/area event

/area event_derive

/area plugin

/area plugin_api

/area plugin_derive

/area plugin_tests

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

list_tables() was impossible to call before 🤦

Does this PR introduce a user-facing change?:

NONE

The code was there but there was no way to obtain a TableFields
object so it was effectively uncallable.

Signed-off-by: Grzegorz Nosek <grzegorz.nosek@sysdig.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Falco plugin SDK’s tables ergonomics by making table/field listing usable and returning safer Rust wrappers instead of raw FFI structs.

Changes:

  • Move/replace TablesInput::list_tables() to return &[TableInfo] (repr-transparent wrapper) instead of raw ss_plugin_table_info.
  • Update imported table field listing to return &[FieldInfo] and simplify the Table::list_fields call signature to take &TablesInput.
  • Add integration tests covering list_tables() and list_fields() behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
falco_plugin/src/tables/vtable/mod.rs Removes the old raw list_tables() impl from the vtable module.
falco_plugin/src/tables/mod.rs Re-exports FieldTypeId publicly to support new wrapper APIs/tests.
falco_plugin/src/tables/import/table/raw.rs Changes field listing to return FieldInfo slice and adds safety comment.
falco_plugin/src/tables/import/table/mod.rs Updates Table::list_fields signature/return type to use TablesInput and FieldInfo.
falco_plugin/src/tables/import/table_input.rs Adds TablesInput::list_tables() returning &[TableInfo].
falco_plugin/src/tables/import/table_info.rs Introduces TableInfo wrapper with name()/key_type() accessors.
falco_plugin/src/tables/import/mod.rs Wires in and re-exports FieldInfo/TableInfo.
falco_plugin/src/tables/import/field_info.rs Introduces FieldInfo wrapper with name()/read_only()/field_type() accessors.
falco_plugin_tests/tests/list_tables.rs Adds an integration test validating table listing and key type.
falco_plugin_tests/tests/list_fields.rs Adds an integration test validating field listing and field metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread falco_plugin/src/tables/import/field_info.rs
Comment thread falco_plugin/src/tables/import/table_info.rs
Comment thread falco_plugin/src/tables/import/table_info.rs Outdated
Comment thread falco_plugin/src/tables/import/table/raw.rs Outdated
Comment thread falco_plugin/src/tables/import/table/mod.rs Outdated
Comment thread falco_plugin_tests/tests/list_fields.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread falco_plugin/src/tables/import/table/raw.rs Outdated
gnosek added 3 commits May 22, 2026 17:47
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread falco_plugin/src/tables/import/table_info.rs
Comment thread falco_plugin/src/tables/import/field_info.rs

@ekoops ekoops left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/approve

@poiana

poiana commented May 25, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 1ffc4541e7a3e8eec1d6f403c3d1d0cc40430469

@poiana

poiana commented May 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details 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 2a5228e into falcosecurity:main May 25, 2026
7 checks passed
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.

4 participants