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

Cleanup list fields #1816

Merged
merged 4 commits into from
Dec 23, 2021
Merged

Cleanup list fields #1816

merged 4 commits into from
Dec 23, 2021

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Dec 8, 2021

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

If contributing rules or changes to rules, please make sure to also uncomment one of the following line:

/kind rule-update

/kind rule-create

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area rules

/area tests

/area proposals

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

refactor: clean up --list output with better formatting and no duplicate sections across event sources.

Instead of having a falco-specific function to print field info, use
the built-in filter_fieldclass_info::as_string() instead. This is a
better implementation (displays addl info, has better wrapping, wider
output) and having a single implementation allows for consistent
outputs between falco and other potential programs that could use the libs.

Signed-off-by: Mark Stemm <[email protected]>
With the new implementation of list_fields(), the order of fields
changed slightly. So update the checksum.

Signed-off-by: Mark Stemm <[email protected]>
Update json_event_filter_factory::get_fields() to add the new
info (shortdesc, data_type, tags) to field descriptions.

This allows for richer outputs when printing info on the fields.

Signed-off-by: Mark Stemm <[email protected]>
This has required changes to print info on fields.

Signed-off-by: Mark Stemm <[email protected]>
@leogr
Copy link
Member

leogr commented Dec 23, 2021

/milestone 0.31.0

@poiana poiana added this to the 0.31.0 milestone Dec 23, 2021
Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

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

LGTM

For more context, this is built on top of the changes of falcosecurity/libs#153 and aligns Falco to them.

@poiana
Copy link
Contributor

poiana commented Dec 23, 2021

LGTM label has been added.

Git tree hash: 045b1387804ffac6b3a56bd337982e42204bc43d

@leogr
Copy link
Member

leogr commented Dec 23, 2021

/milestone 0.31.0

Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

/approve

@poiana poiana merged commit 42f8b1c into master Dec 23, 2021
@poiana poiana deleted the cleanup-list-fields branch December 23, 2021 16:05
@poiana
Copy link
Contributor

poiana commented Dec 23, 2021

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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