Skip to content

Commit

Permalink
ref(feedback): release replay and feedback group types (getsentry#79790)
Browse files Browse the repository at this point in the history
These products/features have been GA'd for a while, this saves us and SH
users from having to worry about the issue platform generated FFs.

This lets us remove -ingest, -post-process-group, -visible flags
  • Loading branch information
aliu39 authored Oct 28, 2024
1 parent 47ce733 commit d0d86bb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 48 deletions.
3 changes: 3 additions & 0 deletions src/sentry/issues/grouptype.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ class ReplayRageClickType(ReplayGroupTypeDefaults, GroupType):
category = GroupCategory.REPLAY.value
default_priority = PriorityLevel.MEDIUM
notification_config = NotificationConfig()
released = True


@dataclass(frozen=True)
Expand All @@ -580,6 +581,7 @@ class ReplayHydrationErrorType(ReplayGroupTypeDefaults, GroupType):
category = GroupCategory.REPLAY.value
default_priority = PriorityLevel.MEDIUM
notification_config = NotificationConfig()
released = True


@dataclass(frozen=True)
Expand All @@ -591,6 +593,7 @@ class FeedbackGroup(GroupType):
creation_quota = Quota(3600, 60, 1000) # 1000 per hour, sliding window of 60 seconds
default_priority = PriorityLevel.MEDIUM
notification_config = NotificationConfig(context=[])
released = True
in_default_search = False # hide from issues stream


Expand Down
2 changes: 1 addition & 1 deletion src/sentry/utils/mockdata/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ def create_mock_user_feedback(project, has_attachment=True):
"event_id": str(uuid.uuid4()).replace("-", ""),
"timestamp": time.time(),
"received": "2024-4-27T22:23:29.574000+00:00",
"environment": "prod",
"environment": next(ENVIRONMENTS),
"release": "frontend@daf1316f209d961443664cd6eb4231ca154db502",
"user": {
"ip_address": "72.164.175.154",
Expand Down
2 changes: 0 additions & 2 deletions tests/sentry/feedback/usecases/test_create_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@ def test_create_feedback_spam_detection_set_status_ignored(
{
"organizations:user-feedback-spam-filter-actions": True,
"organizations:user-feedback-spam-filter-ingest": True,
"organizations:feedback-ingest": True,
}
):
event = {
Expand Down Expand Up @@ -798,7 +797,6 @@ def test_create_feedback_large_message_skips_spam_detection(
{
"organizations:user-feedback-spam-filter-actions": True,
"organizations:user-feedback-spam-filter-ingest": True,
"organizations:feedback-ingest": True,
}
),
set_sentry_option("feedback.message.max-size", 4096),
Expand Down
75 changes: 30 additions & 45 deletions tests/sentry/replays/unit/test_issue_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,16 @@ def test_report_rage_click_issue_with_replay_event(mock_new_issue_occurrence, de
def test_report_rage_click_long_url(default_project):
replay_id = "b58a67446c914f44a4e329763420047b"
seq1_timestamp = datetime.now() - timedelta(minutes=10, seconds=52)
with Feature(
{
"organizations:replay-click-rage-ingest": True,
}
):
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url=f"https://www.sentry.io{'a' * 300}",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(),
)
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url=f"https://www.sentry.io{'a' * 300}",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(),
)

# test that the Issue gets created with the truncated url
assert Group.objects.get(message__contains="div.xyz > a")
Expand All @@ -195,21 +190,16 @@ def test_report_rage_click_no_environment(default_project):
seq1_timestamp = datetime.now() - timedelta(minutes=10, seconds=52)
replay_event = mock_replay_event()
del replay_event["environment"]
with Feature(
{
"organizations:replay-click-rage-ingest": True,
}
):
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url="https://www.sentry.io",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(),
)
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url="https://www.sentry.io",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(),
)

assert Group.objects.get(message__contains="div.xyz > a")

Expand All @@ -219,21 +209,16 @@ def test_report_rage_click_no_environment(default_project):
def test_report_rage_click_no_trace(default_project):
replay_id = "b58a67446c914f44a4e329763420047b"
seq1_timestamp = datetime.now() - timedelta(minutes=10, seconds=52)
with Feature(
{
"organizations:replay-click-rage-ingest": True,
}
):
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url="https://www.sentry.io",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(trace_ids=[]),
)
report_rage_click_issue_with_replay_event(
project_id=default_project.id,
replay_id=replay_id,
selector="div.xyz > a",
timestamp=seq1_timestamp.timestamp(),
url="https://www.sentry.io",
node={"tagName": "a"},
component_name="SmartSearchBar",
replay_event=mock_replay_event(trace_ids=[]),
)

# test that the Issue gets created
assert Group.objects.get(message__contains="div.xyz > a")
Expand Down

0 comments on commit d0d86bb

Please sign in to comment.