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(environments): Update filtering of product analytics resources #26675

Merged
merged 6 commits into from
Dec 9, 2024

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Dec 5, 2024

Problem

Product analytics resources insights, dashboards, notebooks, actions, cohorts, and comments are project-level – filtered on project_id= – but in many places we were still filtering on team_id=.

Changes

Used this regex to find every instance of those resources being queried on team_id:

(Insight|Dashboard|Notebook|Action|Cohort|Comment).+.(filter|get)\((.*\n){0,3}?.*team(_id)?=

Replaced team=/team_id= with team__project_id= in every instance.

How did you test this code?

Added a couple of tests for HogQL and trends.

@Twixes Twixes force-pushed the project-id-filtering-analytics branch from 8720947 to 3a18f77 Compare December 5, 2024 13:28
@Twixes Twixes marked this pull request as ready for review December 6, 2024 21:42
@Twixes Twixes requested a review from a team December 6, 2024 21:42
@Twixes Twixes merged commit 188fc25 into master Dec 9, 2024
91 checks passed
@Twixes Twixes deleted the project-id-filtering-analytics branch December 9, 2024 17:42
Copy link

sentry-io bot commented Dec 9, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OperationalError: consuming input failed: query_wait_timeout /api/projects/{parent_lookup_project_id}/activi... View Issue
  • ‼️ OperationalError: consuming input failed: query_wait_timeout posthog.models.product_intent.product_intent.ca... View Issue
  • ‼️ ValueError: Field 'id' expected a number but got 'VIESXj1f'. /api/projects/{parent_lookup_team_id}/insights/... View Issue
  • ‼️ Cohort.DoesNotExist: Cohort matching query does not exist. posthog.tasks.tasks.process_query_task View Issue

Did you find this useful? React with a 👍 or 👎

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