ref(grouping): Add check for suppress_unnecessary_secondary_hash flag#64312
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #64312 +/- ##
==========================================
- Coverage 81.27% 81.27% -0.01%
==========================================
Files 5236 5236
Lines 230537 230536 -1
Branches 45229 45229
==========================================
- Hits 187370 187362 -8
- Misses 37323 37330 +7
Partials 5844 5844 |
src/sentry/event_manager.py
Outdated
There was a problem hiding this comment.
I believe this would be more appropriate return type
| def assign_event_to_group(event: Event, job: Job, metric_tags: MutableTags) -> Optional[GroupInfo]: | |
| def assign_event_to_group(event: Event, job: Job, metric_tags: MutableTags) -> GroupInfo | None: |
There was a problem hiding this comment.
You can follow this up on the next PR if you want to merge it now
There was a problem hiding this comment.
Oh, yeah, I guess we can do that now, without even using __future__, huh? Yay for finally being off of Python 3.8!
8d776c4 to
e61e526
Compare
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
|
PR reverted: 1f95319 |
…ag (#64410) NOTE: This is a redo of #64312, which got reverted when it seemed it might be causing an error. Turns out it wasn't to blame, so pushing it through again. --------- This wraps `_save_aggregate` (whose logic is going to be updated in a new version of the function) in a new function, `assign_event_to_group`, which determines whether to run the current version or the new version. Which version to run is controlled both by the `suppress_unnecessary_secondary_hash` flag added in #64128 and by the project's grouping configs - any project using the mobile config as either their primary or secondary config has to use the current logic, since the new logic won't include any of the hierarchical grouping code. Note: For now both branches call the current version of `_save_aggregate`, as the new version has yet to be written. In addition, two bits of logic from `save_error_events`, which set group data on the event and the job, have been moved into the new wrapper.
…ag (#64410) NOTE: This is a redo of #64312, which got reverted when it seemed it might be causing an error. Turns out it wasn't to blame, so pushing it through again. --------- This wraps `_save_aggregate` (whose logic is going to be updated in a new version of the function) in a new function, `assign_event_to_group`, which determines whether to run the current version or the new version. Which version to run is controlled both by the `suppress_unnecessary_secondary_hash` flag added in #64128 and by the project's grouping configs - any project using the mobile config as either their primary or secondary config has to use the current logic, since the new logic won't include any of the hierarchical grouping code. Note: For now both branches call the current version of `_save_aggregate`, as the new version has yet to be written. In addition, two bits of logic from `save_error_events`, which set group data on the event and the job, have been moved into the new wrapper.
This wraps
_save_aggregate(whose logic is going to be updated in a new version of the function) in a new function,assign_event_to_group, which determines whether to run the current version or the new version. Which version to run is controlled both by thesuppress_unnecessary_secondary_hashflag added in #64128 and by the project's grouping configs - any project using the mobile config as either their primary or secondary config has to use the current logic, since the new logic won't include any of the hierarchical grouping code. Note: For now both branches call the current version of_save_aggregate, as the new version has yet to be written.In addition, two bits of logic from
save_error_events, which set group data on the event and the job, have been moved into the new wrapper.