-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Update batch exports usage report #37580
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
base: master
Are you sure you want to change the base?
Conversation
* Removed filter for events model so all models are captured. * Excluded HTTP batch exports as we do not have plans to include them in usage calculations.
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.
1 file reviewed, no comments
@@ -940,9 +940,9 @@ def get_teams_with_rows_exported_in_period(begin: datetime, end: datetime) -> li | |||
finished_at__gte=begin, | |||
finished_at__lte=end, | |||
status=BatchExportRun.Status.COMPLETED, | |||
batch_export__model=BatchExport.Model.EVENTS, | |||
batch_export__deleted=False, |
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.
Do you know why this filter is present? Just thinking we could be missing runs executed before a batch export being deleted. Or do you think we don't need to worry about this?
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.
Do you know why this filter is present?
No idea, I asked in slack about this and seemed like removing it was the way to go.
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 thinking we could be missing runs executed before a batch export being deleted. Or do you think we don't need to worry about this?
How could this happen? Also, why would removing a filter cause us to miss runs? If anything we should be capturing more runs than with the filter?
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.
oh sorry, I was referring to the batch_export__deleted=False
filter. Not sure what the typical time period is here but just thinking a customer could run a large backfill then delete their batch export
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.
Oh, no clue about that one, I haven't considered it. I guess we need to chat a bit about it.
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.
ok, might be a bit of an edge case but won't let it block this PR
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, guess we can discuss the other filter later, shouldn't block this PR
Problem
Batch exports usage report is out of date.
Changes
How did you test this code?
👉 Stay up-to-date with PostHog coding conventions for a smoother review.