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: fix bug in evaluation of filters with filtersLogicalOperator=or #2374

Conversation

jsvk
Copy link
Contributor

@jsvk jsvk commented Dec 21, 2022

Checklist:

This PR fixes a bug where when specifying only a subset of filters, in our case an expr filter and data filter, the filter would always evaluate to a 'pass'ing condition.

This happens because the code doesn't check that we specified a filter before attempting to evaluate it, at which point it will default to true.

The PR changes that behavior to check if the filter was nil before looking at what it evaluates to.

@jsvk jsvk force-pushed the fix-filterlogicaloperator-or-with-subset-of-filters branch from ba7cee5 to 12b246a Compare December 21, 2022 22:59
@jsvk jsvk force-pushed the fix-filterlogicaloperator-or-with-subset-of-filters branch from 12b246a to 4cc7f1d Compare December 21, 2022 22:59
@jsvk jsvk marked this pull request as ready for review December 28, 2022 14:01
Copy link
Member

@whynowy whynowy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing it!

@whynowy whynowy merged commit 9a0759d into argoproj:master Jan 3, 2023
bilalba pushed a commit to intuit-data-os/argo-events that referenced this pull request Jan 9, 2023
jwillker pushed a commit to jwillker/argo-events that referenced this pull request Mar 29, 2023
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.

2 participants