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

Bug with contains filter in array-based attributes #2301

Closed
paolodamico opened this issue Nov 10, 2020 · 7 comments · Fixed by #2711
Closed

Bug with contains filter in array-based attributes #2301

paolodamico opened this issue Nov 10, 2020 · 7 comments · Fixed by #2711
Labels
bug Something isn't working right

Comments

@paolodamico
Copy link
Contributor

Bug description

When filtering insights by active feature flags, and trying to select a single feature flag (by using a contains selector), events are not being correctly filter (i.e. no events are returned). This presumably happens because the active_feature_flags attribute is stored as an array and the operator does not work properly on CH.

Expected behavior

Relevant events should be loaded.

How to reproduce

  1. Create an insights graph, filter by "Active feature flags" using a contain selector.

Alternatively, just open this graph.

Environment

Cloud latest version.

Thank you for your bug report – we love squashing them!

CC @timgl

@EDsCODE
Copy link
Member

EDsCODE commented Nov 30, 2020

Just checked this and it seems the filter does work. If you create the graph linked using pageviews instead, it shows filtered events.

I verified manually too. We handle the contains operator by string matching so it'll work even if the property is an array because we'll just treat the array as a string and match it to the argument as shown below.

I think the issue is with created action action itself probably matching something different when the feature flag is active
Screen Shot 2020-11-30 at 2 32 31 PM

@paolodamico
Copy link
Contributor Author

You're right, it seems like a different problem then, but as created action only matches client-side events, it looks like we do have some bug here (as the active feature flags prop should be present), right?

@EDsCODE
Copy link
Member

EDsCODE commented Dec 1, 2020

@paolodamico i agree. we'll have to look into the action itself and check out why they're not associating with events that have the flags.

tagging @timgl so you know we did some initial digging here. i can pick it back up later in the week when i get #2578 and #2460 merged

@paolodamico
Copy link
Contributor Author

paolodamico commented Dec 1, 2020

I managed to narrow down the problem, the filtering works after removing the regex filter, so the problem is specifically with using these kind of filters. Related to this, I couldn't set the regex filter as matching group, see #2613

image

@EDsCODE
Copy link
Member

EDsCODE commented Dec 8, 2020

I fixed #2613!

Could you send a link for how the regex filter above is failing? I tried the filtering and it seems to work unless i'm looking at it wrong

@paolodamico
Copy link
Contributor Author

Sure thing, here's the relevant action, & the errored insights graph

@paolodamico
Copy link
Contributor Author

Confirmed this is fixed! Thanks @EDsCODE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants