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

fix(sample transform)!: Accept remap conditions #7864

Merged
merged 4 commits into from
Jun 17, 2021
Merged

Conversation

jszwedko
Copy link
Member

The docs for the sample transform were updated to use an example remap
condition but the component itself only accepted check_fields-style
conditions. This updates the component to allow either condition style
(similar to the filter transform).

I updated the tests to just use the new remap style rather than check
both. I think it's fine to rely on the tests in src/condition to cover
the differences between conditions.

Fixes: #7863

Signed-off-by: Jesse Szwedko jesse@szwedko.me

The docs for the `sample` transform were updated to use an example remap
condition but the component itself only accepted `check_fields`-style
conditions. This updates the component to allow either condition style
(similar to the `filter` transform).

I updated the tests to just use the new remap style rather than check
both. I think it's fine to rely on the tests in `src/condition` to cover
the differences between conditions.

Fixes: #7863

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko jszwedko requested review from spencergilbert, a team and StephenWakely and removed request for a team June 15, 2021 17:32
Copy link
Contributor

@spencergilbert spencergilbert left a comment

Choose a reason for hiding this comment

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

It makes sense to me - seems like an appropriate change

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko jszwedko enabled auto-merge (squash) June 16, 2021 16:24
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko jszwedko requested review from a team and bruceg and removed request for a team June 16, 2021 22:12
@jszwedko jszwedko changed the title fix(sample transform): Accept remap conditions fix(sample transform)!: Accept remap conditions Jun 16, 2021
@jszwedko
Copy link
Member Author

I marked this as a breaking change given that it switches the condition default to the remap syntax. exclude.type = "check_fields" can be used to use the old syntax. This brings it in-line with all of the other places conditions are used.

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko jszwedko disabled auto-merge June 17, 2021 20:09
@jszwedko
Copy link
Member Author

The test failure is unrelated.

@jszwedko jszwedko merged commit 74f89f2 into master Jun 17, 2021
@jszwedko jszwedko deleted the fix-sample-conditions branch June 17, 2021 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example sample transform config fails to compile
2 participants