-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref: fix typing for sentry.digests.notifications #72367
ref: fix typing for sentry.digests.notifications #72367
Conversation
35e25e1
to
cadc564
Compare
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 21749 tests with View the full list of failed testsacceptance
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
cadc564
to
73ab1b2
Compare
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
73ab1b2
to
3250bd3
Compare
3250bd3
to
d51a50f
Compare
d51a50f
to
a490c07
Compare
a490c07
to
8b9a437
Compare
8b9a437
to
b632a3e
Compare
3b4108f
to
b920c32
Compare
b920c32
to
f535e97
Compare
f535e97
to
a4166e5
Compare
a4166e5
to
ad5eee0
Compare
# sans-io implementation details | ||
bound_records = _bind_records(records, groups, rules) | ||
grouped = _group_records(bound_records, groups, rules) | ||
return _sort_digest(grouped, event_counts=event_counts, user_counts=user_counts) |
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.
👨🍳 💋
so this ended up being a pretty big change -- even with splitting out most of the smaller digestible parts
the main problem preventing this from being typesafe was the original code stuffed
user_count
/event_count
attributes intoGroup
instancesrefactoring that out required breaking the FP structure of digests.notifications (though an argument can be made that it wasn't FP at all since it mutated the inputs (!))
this actually ended up simplifying the digest grouping significantly, and made it a lot easier to follow what was happening
I was able to preserve the tests for the most part as well!
I did have to adjust the digest-text template since it was relying on the attribute stuffing -- I also needed to adjust the debug mail view since the way it was faking organizations was relying on the previous attribute stuffing