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

feat(experiments HogQL rewrite): fetch associated Experiment #24992

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

jurajmajerik
Copy link
Contributor

@jurajmajerik jurajmajerik commented Sep 16, 2024

Part of #24914

Changes

  • pass experiment_id to the experiment query runners
  • retrieve associated Experiment in the query runner
  • retrieve variants from the linked FeatureFlag
  • store HogQL queries for both primary and secondary metrics on the new metrics field on the Experiment - I don't see a reason not to, as we want to treat them in the same way in the UI (possibly subject to change later).

How did you test this code?

Updated existing tests

@jurajmajerik jurajmajerik requested a review from a team September 16, 2024 12:55
Copy link
Contributor

github-actions bot commented Sep 16, 2024

Size Change: 0 B

Total Size: 1.1 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.1 MB

compressed-size-action

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

changes seem fine, just had a question about the reason behind the change

Comment on lines -27 to +31
variants = self.query.variants
variants = self.feature_flag.variants
Copy link
Contributor

Choose a reason for hiding this comment

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

forgive me if I'm out of the loop, but what's the ramifications/rationale behind moving the variants to come from the feature flag instead of the query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way I think about this - the experiment (and its linked flag) is the source of truth for experiment variants. We need to retrieve it in the query runner for other things too, so might as well retrieve the variants from there, no need to pass via the query.

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

changes seem fine, just had a question about the reason behind the change

@jurajmajerik jurajmajerik merged commit 2218393 into master Sep 17, 2024
93 checks passed
@jurajmajerik jurajmajerik deleted the experiment-query-runners-fetch-experiment branch September 17, 2024 16:04
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.

2 participants