ref(weekly reports): Rearrange files & functions to be reused#65559
ref(weekly reports): Rearrange files & functions to be reused#65559
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #65559 +/- ##
=======================================
Coverage 84.16% 84.17%
=======================================
Files 5267 5268 +1
Lines 235578 235569 -9
Branches 40778 40769 -9
=======================================
- Hits 198285 198282 -3
+ Misses 37074 37068 -6
Partials 219 219
|
|
Opened https://github.com/getsentry/getsentry/pull/13021 to address the getsentry failures |
There was a problem hiding this comment.
I don't think this can pass in getsentry. You might need some temporary code in place to handle the refactor as part of https://github.com/getsentry/getsentry/pull/13021/files
Something like
try:
from sentry.tasks.summaries.weekly_reports import prepare_organization_report
except ImportError:
# import old path
bc23277 to
5cd1361
Compare
nhsiehgit
left a comment
There was a problem hiding this comment.
nice!
Ok - so mostly moving things around, except for project_key_errors and project_key_performance_issues which now return values rather than modifying in place.
added a quick comment, but can we also do that for project_key_transactions?
| "project_key_errors.results", | ||
| extra={"project_id": project.id, "num_key_errors": len(key_errors)}, | ||
| ) | ||
| project_key_transactions(ctx, project) |
There was a problem hiding this comment.
Is this one still modifying in place?
can we update to return also?
There was a problem hiding this comment.
It is - I didn't update it because I don't have plans to use this function again, but I can for consistency.
There was a problem hiding this comment.
Updated - I had to break it out into 2 functions FYI
nhsiehgit
left a comment
There was a problem hiding this comment.
nice 🎉
mmm...
Maybe in the future i would also break this into separate PRs too
one purely a move things around (since there's a lot of line changes)
and another to actually modify the behavior
Offshoot of #65501 that moves `weekly_reports.py` into a `summaries` directory and puts classes and functions to be reused by the daily summary into a utils file.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
2nd chunk of #65501 now that the files have been rearranged in #65559 This PR reuses a lot of the weekly report functions to get per project data on the current day's event count vs. 14 day average (I have ideas for optimizing this, but for the internal MVP it isn't necessary), the day's top 3 error and performance issues (by event count), issues that escalated or regressed that day, and today's releases and new issues in those releases. A future PR will use this data and build a Slack notification.
Offshoot of #65501 that moves
weekly_reports.pyinto asummariesdirectory and puts classes and functions to be reused by the daily summary into a utils file.