Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/sentry/seer/autofix/autofix.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,10 @@ def trigger_autofix(

group.update(seer_autofix_last_triggered=timezone.now())

# seer runs are free for web vitals issues during testing phase
if group.issue_type != WebVitalsGroup:
# log billing event for seer autofix
quotas.backend.record_seer_run(
group.organization.id, group.project.id, DataCategory.SEER_AUTOFIX
)
# log billing event for seer autofix
quotas.backend.record_seer_run(
group.organization.id, group.project.id, DataCategory.SEER_AUTOFIX
)

return Response(
{
Expand Down
4 changes: 0 additions & 4 deletions src/sentry/seer/autofix/issue_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from sentry.api.serializers import EventSerializer, serialize
from sentry.api.serializers.rest_framework.base import convert_dict_key_case, snake_to_camel_case
from sentry.constants import DataCategory
from sentry.issues.grouptype import WebVitalsGroup
from sentry.locks import locks
from sentry.models.group import Group
from sentry.net.http import connection_from_url
Expand Down Expand Up @@ -420,9 +419,6 @@ def _generate_summary(
def _log_seer_scanner_billing_event(group: Group, source: SeerAutomationSource):
if source == SeerAutomationSource.ISSUE_DETAILS:
return
# seer runs are free for web vitals issues during testing phase
if group.issue_type == WebVitalsGroup:
return

quotas.backend.record_seer_run(
group.organization.id, group.project.id, DataCategory.SEER_SCANNER
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/seer/autofix/test_autofix.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def test_trigger_autofix_with_web_vitals_issue(

response = trigger_autofix(group=group, user=user, instruction="Test instruction")
assert response.status_code == 202
mock_record_seer_run.assert_not_called()
mock_record_seer_run.assert_called_once()


@requires_snuba
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/seer/autofix/test_issue_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def test_get_issue_summary_with_web_vitals_issue(
)

assert status_code == 200
mock_record_seer_run.assert_not_called()
mock_record_seer_run.assert_called_once()
mock_trigger_autofix_task.assert_called_once()

@patch("sentry.seer.autofix.issue_summary.get_seer_org_acknowledgement")
Expand Down
Loading