Skip to content

Commit 6ff0fb7

Browse files
authored
ref(seer): Add option to route fixability requests to GPU (#96926)
from reading the getsentry CI, seems like this is a prereq for the change in getsentry: getsentry/getsentry#18068 deployment was added in: getsentry/ops#16645 routes were added in: getsentry/ops#16571
1 parent e22ecb2 commit 6ff0fb7

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/sentry/conf/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3614,6 +3614,8 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
36143614

36153615
SEER_GROUPING_BACKFILL_URL = SEER_DEFAULT_URL
36163616

3617+
SEER_SCORING_URL = SEER_DEFAULT_URL # for local development, these share a URL
3618+
36173619
SEER_ANOMALY_DETECTION_MODEL_VERSION = "v1"
36183620
SEER_ANOMALY_DETECTION_URL = SEER_DEFAULT_URL # for local development, these share a URL
36193621
SEER_ANOMALY_DETECTION_TIMEOUT = 5

src/sentry/options/defaults.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,13 @@
935935
flags=FLAG_AUTOMATOR_MODIFIABLE,
936936
)
937937

938+
register(
939+
"issues.fixability.gpu-rollout-rate",
940+
type=Float,
941+
default=0.0,
942+
flags=FLAG_AUTOMATOR_MODIFIABLE,
943+
)
944+
938945
register(
939946
"issues.priority.projects-allowlist",
940947
type=Sequence,

src/sentry/seer/autofix/issue_summary.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from sentry.models.group import Group
2020
from sentry.models.project import Project
2121
from sentry.net.http import connection_from_url
22+
from sentry.options.rollout import in_random_rollout
2223
from sentry.seer.autofix.autofix import trigger_autofix
2324
from sentry.seer.autofix.constants import (
2425
AutofixAutomationTuningSettings,
@@ -178,6 +179,10 @@ def _call_seer(
178179
settings.SEER_SEVERITY_URL,
179180
timeout=settings.SEER_FIXABILITY_TIMEOUT,
180181
)
182+
fixability_connection_pool_gpu = connection_from_url(
183+
settings.SEER_SCORING_URL,
184+
timeout=settings.SEER_FIXABILITY_TIMEOUT,
185+
)
181186

182187

183188
def _generate_fixability_score(group: Group):
@@ -187,8 +192,14 @@ def _generate_fixability_score(group: Group):
187192
"organization_id": group.organization.id,
188193
"project_id": group.project.id,
189194
}
195+
196+
if in_random_rollout("issues.fixability.gpu-rollout-rate"):
197+
connection_pool = fixability_connection_pool_gpu
198+
else:
199+
connection_pool = fixability_connection_pool
200+
190201
response = make_signed_seer_api_request(
191-
fixability_connection_pool,
202+
connection_pool,
192203
"/v1/automation/summarize/fixability",
193204
body=orjson.dumps(payload, option=orjson.OPT_NON_STR_KEYS),
194205
timeout=settings.SEER_FIXABILITY_TIMEOUT,

0 commit comments

Comments
 (0)