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(insights): fix legacy transformation of properties #21165

Merged
merged 16 commits into from
Mar 27, 2024

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Mar 26, 2024

Problem

The HogQL funnels feature flag breaks person modals in experiments. This is because the experiment response returns the insight filters in a way that we haven't encountered before:

  • Global properties can contain "precalculated-" and "static cohorts", which are now just "cohorts"
  • Entity properties can contain a property group filter, whereas only property filters are allowed

Changes

This PR:

  • Converts "precalculated-" and "static cohorts" to "cohorts".
  • Simplifies the property group filter to a list of property filters.

The fix for cohorts had already been implemented backend side and there have also been other deviations. Thus I've refactored the code a bit that both version do roughly the same thing and changes/additions should easy to add to both frontend and backend.

How did you test this code?

Added more tests and verified that the experiment persons modal works now

@thmsobrmlr thmsobrmlr changed the title Clean properties fix(insights): fix legacy transformation of properties Mar 26, 2024
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

84 snapshot changes in total. 0 added, 84 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

github-actions bot commented Mar 27, 2024

Size Change: +54 B (0%)

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 824 kB +54 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@thmsobrmlr thmsobrmlr requested a review from a team March 27, 2024 12:58
@thmsobrmlr thmsobrmlr merged commit 20304fe into master Mar 27, 2024
136 checks passed
@thmsobrmlr thmsobrmlr deleted the clean-properties branch March 27, 2024 17:38
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