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

chore(experiments): Remove old results endpoint #29412

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

danielbachhuber
Copy link
Contributor

Changes

Removes the old experiment results endpoint which isn't in use anymore.

How did you test this code?

Tests should pass. I also verified an existing experiment displayed as expected.

@danielbachhuber danielbachhuber requested a review from a team March 3, 2025 13:31
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR removes the old experiment results endpoint that is no longer in use, along with its supporting functions and related imports.

  • Removed /projects/:id/experiments/:experiment_id/results and /projects/:id/experiments/:experiment_id/secondary_results endpoints from ee/clickhouse/views/experiments.py
  • Removed supporting functions _calculate_experiment_results, _calculate_secondary_experiment_results, and _experiment_results_cached
  • Removed unused imports that were only needed for these functions
  • Maintained all core experiment functionality as verified by existing tests in test_clickhouse_experiments.py

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@andehen andehen left a comment

Choose a reason for hiding this comment

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

Not in use afaik 👍

Out of curiosity: Do we have requests logs easily available where we could confirm this?

@danielbachhuber
Copy link
Contributor Author

danielbachhuber commented Mar 3, 2025

Out of curiosity: Do we have requests logs easily available where we could confirm this?

@andehen Good question! I discovered this:

https://grafana.prod-us.posthog.dev/explore?schemaVersion=1&panes={"bre":{"datasource":"P8E80F9AEF21F6940","queries":[{"refId":"A","expr":"{app%3D\"posthog-web-django\"} |~ `%2Fexperiments%2F[\\d]%2B%2Fresults`","queryType":"range","datasource":{"type":"loki","uid":"P8E80F9AEF21F6940"},"editorMode":"builder"}],"range":{"from":"now-30d","to":"now"}}}&orgId=1

Interestingly, there are some requests with an interesting pattern:

CleanShot 2025-03-03 at 07 30 29@2x

@jurajmajerik Any ideas where they might be coming from?

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