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(experiments): clean query nodes for experiment insights #21128

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Mar 25, 2024

Problem

We're planning to start rolling out HogQL funnel insights today. The new query endpoint is quite strict when validating the Pydantic schema of queries and does not allow additional properties. Since the updateQuerySource action merges the new query with any existing query, this can lead to invalid states e.g. when switching from trends to funnels in a new experiment:

Screenshot 2024-03-25 at 12 54 46

Repro:

  1. go to New experiment
  2. change goal type to Conversion funnel
  3. click Add funnel step

Changes

This PR remove the trendsFilter when changing to a funnels query and vice-versa.

How did you test this code?

Tried switching between trends and funnels for experiment metrics and secondary metrics locally

Copy link
Contributor

Size Change: 0 B

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 824 kB

compressed-size-action

Copy link
Contributor

@jurajmajerik jurajmajerik left a comment

Choose a reason for hiding this comment

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

🙏

@jurajmajerik jurajmajerik merged commit 84becf9 into master Mar 25, 2024
95 of 96 checks passed
@jurajmajerik jurajmajerik deleted the fix-experiments-hogql-funnels branch March 25, 2024 14:06
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