Skip to content

Enable customising which events to consider on Paths#5741

Merged
neilkakkar merged 9 commits intomasterfrom
path_exclusions
Aug 26, 2021
Merged

Enable customising which events to consider on Paths#5741
neilkakkar merged 9 commits intomasterfrom
path_exclusions

Conversation

@neilkakkar
Copy link
Copy Markdown
Contributor

Changes

Allows for choosing which events to include and which ones to exclude on Paths

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests
  • Migrations are safe to run at scale (e.g. PostHog Cloud) – present proof if not obvious
  • New/changed UI is decent on smartphones (viewport width around 360px)

@neilkakkar neilkakkar requested review from EDsCODE, liyiy and macobo August 25, 2021 12:47
Comment thread ee/clickhouse/queries/paths/paths.py Outdated
class TargetEventsMixin(BaseParamMixin):
@cached_property
def target_events(self) -> List[str]:
return self._data.get(PATHS_INCLUDE_EVENT_TYPES, [])
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@timgl timgl temporarily deployed to posthog-pr-5741 August 25, 2021 12:49 Inactive
Comment thread posthog/models/filters/mixins/paths.py Outdated
Comment thread ee/clickhouse/queries/test/test_paths.py Outdated
Comment thread ee/clickhouse/queries/paths/path_event_query.py
@timgl timgl temporarily deployed to posthog-pr-5741 August 25, 2021 13:12 Inactive
@timgl timgl temporarily deployed to posthog-pr-5741 August 25, 2021 13:16 Inactive
@timgl timgl temporarily deployed to posthog-pr-5741 August 25, 2021 13:33 Inactive
Copy link
Copy Markdown
Collaborator

@EDsCODE EDsCODE left a comment

Choose a reason for hiding this comment

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

lgtm

@timgl timgl temporarily deployed to posthog-pr-5741 August 26, 2021 09:21 Inactive
@neilkakkar neilkakkar enabled auto-merge (squash) August 26, 2021 09:22
@neilkakkar neilkakkar merged commit 6b916c9 into master Aug 26, 2021
@neilkakkar neilkakkar deleted the path_exclusions branch August 26, 2021 09:34
]
)

_fields = list(filter(None, _fields))
Copy link
Copy Markdown
Contributor

@macobo macobo Aug 26, 2021

Choose a reason for hiding this comment

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

What does this do :O I'd expect filter to accept a lambda. I guess this is a compact-like.

Also nitpick - now the three event query classes have a really different shape. Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removes empty strings from the list so when you join with ,, you don't get , <empty> ,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Explain nitpick? I thought I updated the rest to follow this format?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, trends. Will update, then all 3 will look the same.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@macobo macobo Aug 26, 2021

Choose a reason for hiding this comment

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

Please wait for #5705 - this change already created a bunch of nasty merge conflicts and rebasing seemingly broke everything.

Worth keeping other WIP in mind when multiple people working on similar things.

@EDsCODE EDsCODE mentioned this pull request Sep 6, 2021
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.

4 participants