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

chore: rename rule argument filters to data filters #4073

Merged
merged 4 commits into from
May 28, 2024

Conversation

rscampos
Copy link
Contributor

@rscampos rscampos commented May 22, 2024

1. Explain what the PR does

fix: #4031

2c52874 chore: rename args to data field
2e98d6b chore(tests): rename args to data field and add tests
098dbb4 chore(yaml): rename args to data in the example
61244d8 chore(docs): rename args to data

2c52874 chore: rename args to data field

Refactored the code in order to change the option args to name to be
consistent with the new event structure. Option args is also supported
but will be deprecated in future.

2e98d6b chore(tests): rename args to data field and add tests

Created some tests for args option. The tests need to be deprecated
after removing the args option.

2. Explain how to test it

3. Other comments

pkg/filters/data.go Outdated Show resolved Hide resolved
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

Did a cursory review and put some comments. LGTM overall.


Be aware that this will break other tests. We need to sync before merging. 👍🏼

docs/docs/policies/index.md Outdated Show resolved Hide resolved
docs/docs/policies/rules.md Outdated Show resolved Hide resolved
docs/docs/flags/events.1.md Show resolved Hide resolved
pkg/cmd/flags/policy.go Outdated Show resolved Hide resolved
pkg/cmd/flags/policy_test.go Outdated Show resolved Hide resolved
pkg/cmd/flags/event_test.go Show resolved Hide resolved
pkg/filters/data_test.go Outdated Show resolved Hide resolved
pkg/filters/data_test.go Show resolved Hide resolved
pkg/policy/v1beta1/policy_file_test.go Show resolved Hide resolved
@rscampos rscampos force-pushed the 4031_rename_rule_arg_to_data branch from 300489c to 865f1d6 Compare May 23, 2024 19:11
@rscampos
Copy link
Contributor Author

@geyslan add some tests and accept the suggestions. Also rename some "argument" to "data" in the file data_test.go

@rscampos rscampos requested a review from geyslan May 23, 2024 19:19
@rscampos rscampos marked this pull request as ready for review May 23, 2024 19:19
Created some tests for args option. The tests need to be deprecated
after removing the args option.
Refactored the code in order to change the option args to name to be
consistent with the new event structure. Option args is also supported
but will be deprecated in future.
@rscampos rscampos force-pushed the 4031_rename_rule_arg_to_data branch from 865f1d6 to 2c52874 Compare May 27, 2024 13:50
@rscampos rscampos merged commit f07388c into aquasecurity:main May 28, 2024
32 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.

Rename rule argument filters to data filters
3 participants