-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: warming and filter #25674
fix: warming and filter #25674
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: posthog/caching/warming.py
Did you find this useful? React with a 👍 or 👎 |
dashboard = None | ||
|
||
tag_queries(team_id=insight.team_id, insight_id=insight.pk, trigger="warmingV2") | ||
if dashboard_id: | ||
tag_queries(dashboard_id=dashboard_id) | ||
dashboard = insight.dashboards.get(pk=dashboard_id) | ||
dashboard = insight.dashboards.filter(pk=dashboard_id).first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to change this? Insights can be added to a dashboard multiple times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get throws an exception if it doesn’t exist, but we were expecting a none, which was leading to sentry errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
We can also check this to see if we hit concurrency limit a lot more once this is deployed
Problem
Lots of queries are failing at cache warming because estimates of runtime or actual runtime are too long.
This is causing cache warming to fail a lot for larger users (like us).
Changes
Allow cache warming to take as long as running the query ourselves.
Also add a pretty simple filter to funnels to cut back on the number of events that have to be serialized in certain big funnel queries.
Also fix issues sentry bot pulled in of insight and dashboard throwing errors sometimes.
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Tested the query in metabase