Skip to content

Commit e02a015

Browse files
authored
Merge branch 'master' into server-py
2 parents 9e88ad7 + cd16069 commit e02a015

File tree

135 files changed

+4777
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+4777
-1472
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ pnpm-lock.yaml @getsentry/owners-js-de
248248
/src/sentry/snuba/subscriptions.py @getsentry/alerts-notifications
249249
/src/sentry/snuba/tasks.py @getsentry/alerts-notifications
250250
/tests/snuba/incidents/ @getsentry/alerts-notifications
251+
/src/sentry/rules/ @getsentry/alerts-notifications
251252
/tests/sentry/rules/ @getsentry/alerts-notifications
252253
/tests/sentry/snuba/test_query_subscription_consumer.py @getsentry/alerts-notifications
253254
/tests/sentry/snuba/test_subscriptions.py @getsentry/alerts-notifications
@@ -462,11 +463,11 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
462463
/src/sentry/identity/ @getsentry/enterprise
463464

464465
/src/sentry/integrations/ @getsentry/product-owners-settings-integrations @getsentry/ecosystem
465-
/src/sentry/integrations/api/endpoints/organization_code_mapping*.py @getsentry/issue-detection-backend
466+
/src/sentry/integrations/api/endpoints/organization_code_mapping*.py @getsentry/coding-workflows-sentry-backend
466467
/src/sentry/integrations/api/endpoints/organization_coding_agents.py @getsentry/machine-learning-ai
467468
/src/sentry/integrations/coding_agent/ @getsentry/machine-learning-ai
468469
/src/sentry/integrations/utils/codecov.py @getsentry/codecov
469-
/src/sentry/integrations/utils/stacktrace_link.py @getsentry/issue-detection-backend
470+
/src/sentry/integrations/utils/stacktrace_link.py @getsentry/coding-workflows-sentry-backend
470471

471472
/src/sentry/mail/ @getsentry/alerts-notifications
472473
/src/sentry/notifications/ @getsentry/alerts-notifications @getsentry/ecosystem
@@ -609,6 +610,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
609610
/static/app/gettingStartedDocs/ @getsentry/value-discovery
610611
/static/app/types/project.tsx @getsentry/value-discovery
611612
/static/app/views/onboarding/ @getsentry/value-discovery
613+
/tests/acceptance/test_scm_onboarding.py @getsentry/value-discovery
612614
/tests/js/fixtures/detectedPlatform.ts @getsentry/value-discovery
613615
/static/app/views/projectInstall/ @getsentry/value-discovery
614616
/src/sentry/onboarding_tasks/ @getsentry/value-discovery
@@ -643,15 +645,14 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
643645
/src/sentry/api/helpers/group_index/ @getsentry/issue-workflow
644646
/src/sentry/api/helpers/source_map_helper.py @getsentry/issue-workflow
645647
/src/sentry/api/endpoints/ @getsentry/issue-workflow
646-
/src/sentry/rules/ @getsentry/issue-detection-backend
647648
/src/sentry/processing_errors/ @getsentry/issue-detection-backend
648649
/src/sentry/api/helpers/group_index/delete.py @getsentry/issue-detection-backend
649650
/src/sentry/deletions/defaults/group.py @getsentry/issue-detection-backend
650651
/src/sentry/deletions/tasks/groups.py @getsentry/issue-detection-backend
651652
/src/sentry/event_manager.py @getsentry/issue-detection-backend
652653
/src/sentry/eventstore/models.py @getsentry/issue-detection-backend
653654
/src/sentry/grouping/ @getsentry/issue-detection-backend
654-
/src/sentry/issues/auto_source_code_config/ @getsentry/issue-detection-backend
655+
/src/sentry/issues/auto_source_code_config/ @getsentry/coding-workflows-sentry-backend
655656
/src/sentry/issues/endpoints/related_issues.py @getsentry/issue-detection-backend
656657
/src/sentry/issues/ingest.py @getsentry/issue-detection-backend
657658
/src/sentry/issues/issue_occurrence.py @getsentry/issue-detection-backend
@@ -671,16 +672,16 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
671672
/src/sentry/tasks/auto_ongoing_issues.py @getsentry/issue-detection-backend
672673
/src/sentry/tasks/auto_remove_inbox.py @getsentry/issue-detection-backend
673674
/src/sentry/tasks/auto_resolve_issues.py @getsentry/issue-detection-backend
674-
/src/sentry/tasks/auto_source_code_config.py @getsentry/issue-detection-backend
675+
/src/sentry/tasks/auto_source_code_config.py @getsentry/coding-workflows-sentry-backend
675676
/src/sentry/tasks/check_new_issue_threshold_met.py @getsentry/issue-detection-backend
676677
/src/sentry/tasks/clear_expired_resolutions.py @getsentry/issue-detection-backend
677678
/src/sentry/tasks/clear_expired_rulesnoozes.py @getsentry/issue-detection-backend
678679
/src/sentry/tasks/clear_expired_snoozes.py @getsentry/issue-detection-backend
679-
/src/sentry/tasks/codeowners/ @getsentry/issue-detection-backend
680-
/src/sentry/tasks/commit_context.py @getsentry/issue-detection-backend
680+
/src/sentry/tasks/codeowners/ @getsentry/coding-workflows-sentry-backend
681+
/src/sentry/tasks/commit_context.py @getsentry/coding-workflows-sentry-backend
681682
/src/sentry/tasks/seer/delete_seer_grouping_records.py @getsentry/issue-detection-backend
682683
/src/sentry/tasks/embeddings_grouping/ @getsentry/issue-detection-backend
683-
/src/sentry/tasks/groupowner.py @getsentry/issue-detection-backend
684+
/src/sentry/tasks/groupowner.py @getsentry/coding-workflows-sentry-backend
684685
/src/sentry/tasks/merge.py @getsentry/issue-detection-backend
685686
/src/sentry/tasks/unmerge.py @getsentry/issue-detection-backend
686687
/src/sentry/tasks/weekly_escalating_forecast.py @getsentry/issue-detection-backend
@@ -703,7 +704,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
703704
/tests/sentry/deletions/test_group.py @getsentry/issue-detection-backend
704705
/tests/sentry/event_manager/ @getsentry/issue-detection-backend
705706
/tests/sentry/grouping/ @getsentry/issue-detection-backend
706-
/tests/sentry/issues/auto_source_code_config/ @getsentry/issue-detection-backend
707+
/tests/sentry/issues/auto_source_code_config/ @getsentry/coding-workflows-sentry-backend
707708
/tests/sentry/issues/endpoints/ @getsentry/issue-workflow
708709
/tests/sentry/issues/endpoints/test_related_issues.py @getsentry/issue-detection-backend
709710
/tests/sentry/issues/test_ingest.py @getsentry/issue-detection-backend
@@ -726,9 +727,9 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
726727
/tests/sentry/tasks/test_clear_expired_resolutions.py @getsentry/issue-detection-backend
727728
/tests/sentry/tasks/test_clear_expired_rulesnoozes.py @getsentry/issue-detection-backend
728729
/tests/sentry/tasks/test_clear_expired_snoozes.py @getsentry/issue-detection-backend
729-
/tests/sentry/tasks/test_code_owners.py @getsentry/issue-detection-backend
730-
/tests/sentry/tasks/test_commit_context.py @getsentry/issue-detection-backend
731-
/tests/sentry/tasks/test_groupowner.py @getsentry/issue-detection-backend
730+
/tests/sentry/tasks/test_code_owners.py @getsentry/coding-workflows-sentry-backend
731+
/tests/sentry/tasks/test_commit_context.py @getsentry/coding-workflows-sentry-backend
732+
/tests/sentry/tasks/test_groupowner.py @getsentry/coding-workflows-sentry-backend
732733
/tests/sentry/tasks/test_merge.py @getsentry/issue-detection-backend
733734
/tests/sentry/tasks/test_post_process.py @getsentry/issue-detection-backend
734735
/tests/sentry/tasks/test_weekly_escalating_forecast.py @getsentry/issue-detection-backend

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@emotion/is-prop-valid": "^1.3.0",
6767
"@emotion/react": "^11.14.0",
6868
"@emotion/styled": "^11.14.0",
69+
"@intercom/messenger-js-sdk": "^0.0.18",
6970
"@mdx-js/loader": "^3.1.0",
7071
"@popperjs/core": "^2.11.5",
7172
"@r4ai/remark-callout": "^0.6.2",
@@ -170,7 +171,7 @@
170171
"echarts-for-react": "3.0.6",
171172
"esbuild": "0.25.10",
172173
"focus-trap": "7.6.5",
173-
"framer-motion": "12.23.12",
174+
"framer-motion": "12.38.0",
174175
"fuse.js": "^6.6.2",
175176
"gettext-parser": "7.0.1",
176177
"gl-matrix": "3.4.4",

pnpm-lock.yaml

Lines changed: 22 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ dependencies = [
8787
"sentry-forked-email-reply-parser>=0.5.12.post1",
8888
"sentry-kafka-schemas>=2.1.27",
8989
"sentry-ophio>=1.1.3",
90-
"sentry-protos>=0.8.8",
90+
"sentry-protos>=0.8.10",
9191
"sentry-redis-tools>=0.5.0",
9292
"sentry-relay>=0.9.25",
9393
"sentry-sdk[http2]>=2.47.0",
@@ -683,6 +683,7 @@ module = [
683683
"sentry.tasks.codeowners.*",
684684
"sentry.tasks.commit_context",
685685
"sentry.tasks.on_demand_metrics",
686+
"sentry.tasks.post_process",
686687
"sentry.tasks.reprocessing2",
687688
"sentry.tasks.seer.delete_seer_grouping_records",
688689
"sentry.tasks.store",

src/sentry/api/serializers/models/organization.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,3 @@ def serialize( # type: ignore[override]
920920
)
921921

922922
return context
923-
924-
925-
# Backwards-compatible aliases for getsentry
926-
DetailedOrganizationSerializer = OrganizationSerializer
927-
DetailedOrganizationSerializerWithProjectsAndTeams = OrganizationWithProjectsAndTeamsSerializer
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
from __future__ import annotations
2+
3+
from sentry_protos.billing.v1.data_category_pb2 import DataCategory as ProtoDataCategory
4+
5+
from sentry.constants import DataCategory
6+
from sentry.utils import metrics
7+
8+
SENTRY_TO_PROTO_CATEGORY: dict[int, int] = {
9+
int(DataCategory.ERROR): ProtoDataCategory.DATA_CATEGORY_ERROR,
10+
int(DataCategory.TRANSACTION): ProtoDataCategory.DATA_CATEGORY_TRANSACTION,
11+
int(DataCategory.ATTACHMENT): ProtoDataCategory.DATA_CATEGORY_ATTACHMENT,
12+
int(DataCategory.PROFILE): ProtoDataCategory.DATA_CATEGORY_PROFILE,
13+
int(DataCategory.REPLAY): ProtoDataCategory.DATA_CATEGORY_REPLAY,
14+
int(DataCategory.MONITOR): ProtoDataCategory.DATA_CATEGORY_MONITOR,
15+
int(DataCategory.SPAN): ProtoDataCategory.DATA_CATEGORY_SPAN,
16+
int(DataCategory.USER_REPORT_V2): ProtoDataCategory.DATA_CATEGORY_USER_REPORT_V2,
17+
int(DataCategory.PROFILE_DURATION): ProtoDataCategory.DATA_CATEGORY_PROFILE_DURATION,
18+
int(DataCategory.LOG_BYTE): ProtoDataCategory.DATA_CATEGORY_LOG_BYTE,
19+
int(DataCategory.PROFILE_DURATION_UI): ProtoDataCategory.DATA_CATEGORY_PROFILE_DURATION_UI,
20+
int(DataCategory.SEER_AUTOFIX): ProtoDataCategory.DATA_CATEGORY_SEER_AUTOFIX,
21+
int(DataCategory.SEER_SCANNER): ProtoDataCategory.DATA_CATEGORY_SEER_SCANNER,
22+
int(DataCategory.SIZE_ANALYSIS): ProtoDataCategory.DATA_CATEGORY_SIZE_ANALYSIS,
23+
int(DataCategory.INSTALLABLE_BUILD): ProtoDataCategory.DATA_CATEGORY_INSTALLABLE_BUILD,
24+
int(DataCategory.TRACE_METRIC): ProtoDataCategory.DATA_CATEGORY_TRACE_METRIC,
25+
int(DataCategory.DEFAULT): ProtoDataCategory.DATA_CATEGORY_DEFAULT,
26+
int(DataCategory.SECURITY): ProtoDataCategory.DATA_CATEGORY_SECURITY,
27+
int(DataCategory.PROFILE_CHUNK): ProtoDataCategory.DATA_CATEGORY_PROFILE_CHUNK,
28+
int(DataCategory.PROFILE_CHUNK_UI): ProtoDataCategory.DATA_CATEGORY_PROFILE_CHUNK_UI,
29+
}
30+
31+
32+
PROTO_TO_SENTRY_CATEGORY: dict[int, int] = {v: k for k, v in SENTRY_TO_PROTO_CATEGORY.items()}
33+
34+
35+
def proto_to_sentry_category(proto_category: int) -> int:
36+
"""Convert a proto DataCategory to its Sentry equivalent.
37+
38+
For categories with a known mapping, returns the sentry int value.
39+
For unmapped categories, passes through the original int value and
40+
emits a metric so we can track how often this happens.
41+
"""
42+
result = PROTO_TO_SENTRY_CATEGORY.get(proto_category)
43+
if result is None:
44+
metrics.incr(
45+
"billing.proto_category_mapping.unmapped_reverse",
46+
tags={"proto_category": str(proto_category)},
47+
)
48+
return proto_category
49+
return result
50+
51+
52+
def sentry_to_proto_category(category: int | DataCategory) -> ProtoDataCategory.ValueType:
53+
"""Convert a Sentry DataCategory to its proto equivalent.
54+
55+
For categories with a known mapping, returns the proto enum value.
56+
For unmapped categories, passes through the original int value and
57+
emits a metric so we can track how often this happens.
58+
"""
59+
cat_int = int(category)
60+
result = SENTRY_TO_PROTO_CATEGORY.get(cat_int)
61+
if result is None:
62+
metrics.incr(
63+
"billing.proto_category_mapping.unmapped",
64+
tags={"sentry_category": str(cat_int)},
65+
)
66+
return ProtoDataCategory.ValueType(cat_int)
67+
return ProtoDataCategory.ValueType(result)

src/sentry/billing/platform/services/usage/_category_mapping.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)