-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: rolling retention #24926
fix: rolling retention #24926
Conversation
Size Change: 0 B Total Size: 1.1 MB ℹ️ View Unchanged
|
@@ -35,7 +35,7 @@ export function RetentionTable({ inCardView = false }: { inCardView?: boolean }) | |||
|
|||
{showMean && tableRows.length > 0 ? ( | |||
<tr className="border-b" key={-1}> | |||
{range(0, tableRows[0].length).map((columnIndex) => ( | |||
{range(0, tableRows[0].length - 1).map((columnIndex) => ( |
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.
just missing why you're doing -1
here + the check on line 50 if (columnIndex < row.length - 1) {
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.
noticed you increment intervals_from_base
but only happens for cumulative
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.
Good catch - I just blindly reverted the FE changes from #24240 but this seems like it was an unrelated bug fix.
The means seem like they're properly working now.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Problem
Rolling retention wasn't calculated correctly
https://posthoghelp.zendesk.com/agent/tickets/17978
https://posthoghelp.zendesk.com/agent/tickets/18002
Changes
Convert the calculation to the backend and calculate it correctly.
Normal
Rolling
Sep 2 Cohort Breakout
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Wrote a test, manually verified.