Skip to content

fix: exclusion steps cannot be selected #9762

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

Merged
merged 6 commits into from
May 13, 2022
Merged

fix: exclusion steps cannot be selected #9762

merged 6 commits into from
May 13, 2022

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented May 12, 2022

Problem

In this community slack message the user reports that when they try to add an exclusion filter to a funnel they get an error.

Confirmed this happens for all users

The error is because on adding the exclusion filter, and before being offered a pop-up to choose the event or action, the UI sends an empty exclusion filter to the API

Fixing the API to ignore those empty values shows that the exclusion filter UI does not allow you to make a selection. So exclusion filters cannot be added.

exclusion filters

Changes

in order to get the feature functionally working again

  • ignore empty exclusion filters in the API
  • allows the default value for the exclusion filter to work
  • allows you to set an exclusion filter even if the from and to step range matches the length of the actions/events in the filter

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

running it locally

@pauldambra pauldambra marked this pull request as draft May 12, 2022 13:34
@neilkakkar
Copy link
Contributor

perhaps makes sense to update the frontend to not send that API request? Since that's atleast one extra query making it to Clickhouse which is worthless.

And on the backend, filtering out empty entities, but not incomplete ones as the current solution does, as that hides better error messages / covers a larger error area than we want

@neilkakkar
Copy link
Contributor

Also, fixes #9537

@pauldambra pauldambra marked this pull request as ready for review May 13, 2022 12:12
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

Generally looks good, although I'm not too familiar with the underlying exclusion logic.

@pauldambra
Copy link
Member Author

I'm not too familiar with the underlying exclusion logic.

@benjackwhite that makes two of us 🤣

the joy of support week fixes is a kind of freedom

@pauldambra pauldambra merged commit 7b0b96c into master May 13, 2022
@pauldambra pauldambra deleted the exclusion_steps branch May 13, 2022 13:58
fuziontech added a commit that referenced this pull request May 13, 2022
* master:
  fix: exclusion steps cannot be selected (#9762)
  feat(lemon-button): Support `status` for `primary` buttons (#9782)
  fix: healthcheck for kafka on plugin server (#9771)
  fix(billing): Update billing success message (#9739)
  fix(plugin-server): Set transpileOnly when importing piscina code in tests (#9777)
  fix(plugin-server): Remove unused kafka reset test code (#9779)
  fix: set kafka_skip_broken_messages on dead letter queue table (#9754)
  fix(plugin-server): remove dead code from worker.test.ts (#9776)
  refactor(plugin-server): Run ingestion only on worker threads (#9738)
  fix: Plugin-server tests with kafka need to have consumer stopped (#9774)
  chore(deps): Update posthog-js to 1.21.1 (#9773)
  chore(dep): upgrading rr-web (#9772)
  fix: ouroboros inputs (#9769)
alexkim205 pushed a commit that referenced this pull request May 23, 2022
* don't error if sent an empty exclusion, just ignore it

* strongly opinionated get it working

* only filter out empty dictionaries
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.

3 participants