-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(user_report): filter out garbage user reports (#69145)
Throughout the development of user feedback project, we noticed a lion's share of user reports are either empty, or are an autogenerated feedback from the unreal engine SDK. this PR will filter these out so that they are not created, and don't clog up our systems. We should follow up with kill switches for organizations that spam feedbacks to us.
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from sentry.feedback.usecases.create_feedback import UNREAL_FEEDBACK_UNATTENDED_MESSAGE | ||
from sentry.ingest.userreport import should_filter_user_report | ||
from sentry.testutils.pytest.fixtures import django_db_all | ||
|
||
|
||
@django_db_all | ||
def test_unreal_unattended_message_with_option(set_sentry_option): | ||
with set_sentry_option("feedback.filter_garbage_messages", True): | ||
assert should_filter_user_report(UNREAL_FEEDBACK_UNATTENDED_MESSAGE) is True | ||
|
||
|
||
@django_db_all | ||
def test_unreal_unattended_message_without_option(set_sentry_option): | ||
with set_sentry_option("feedback.filter_garbage_messages", False): | ||
assert should_filter_user_report(UNREAL_FEEDBACK_UNATTENDED_MESSAGE) is False | ||
|
||
|
||
@django_db_all | ||
def test_empty_message(set_sentry_option): | ||
with set_sentry_option("feedback.filter_garbage_messages", True): | ||
assert should_filter_user_report("") is True |