Skip to content

Commit 86e0a24

Browse files
committed
Merge remote-tracking branch 'origin/master' into yuvmen/feat/lightweight-rca-backfill
# Conflicts: # src/sentry/features/temporary.py # src/sentry/options/defaults.py # src/sentry/seer/signed_seer_api.py # src/sentry/seer/supergroups/endpoints/organization_supergroup_details.py # src/sentry/seer/supergroups/endpoints/organization_supergroups_by_group.py # src/sentry/tasks/post_process.py # tests/sentry/seer/supergroups/endpoints/test_organization_supergroup_details.py # tests/sentry/seer/supergroups/endpoints/test_organization_supergroups_by_group.py # tests/sentry/tasks/test_post_process.py
2 parents 694a5f8 + d538b47 commit 86e0a24

File tree

101 files changed

+1656
-643
lines changed

Some content is hidden

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

101 files changed

+1656
-643
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
692692
/static/app/components/events/highlights/ @getsentry/issue-workflow
693693
/static/app/components/issues/ @getsentry/issue-workflow
694694
/static/app/components/stackTrace/ @getsentry/issue-workflow
695-
/static/app/components/stream/supergroupRow.tsx @getsentry/issue-detection-frontend
695+
/static/app/components/stream/supergroups/ @getsentry/issue-detection-frontend
696696
/static/app/views/issueList/ @getsentry/issue-workflow
697697
/static/app/views/issueList/issueListSeerComboBox.tsx @getsentry/issue-workflow @getsentry/machine-learning-ai
698698
/static/app/views/issueList/pages/supergroups.tsx @getsentry/issue-detection-frontend

fixtures/emails/invitation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Your teammates at Example are using Sentry to catch errors, crush latency issues
44

55
Looks like they need your help. You've been invited to join them:
66

7-
http://testserver/accept/1/None/
7+
http://testserver/accept/example/1/None/
88

99
Heads up: this invite link is just for you. Don't share it unless you want random strangers fixing your bugs.
1010

src/sentry/analytics/events/autofix_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class AiAutofixPrCreatedCompletedEvent(AiAutofixPhaseEvent):
7171

7272
@analytics.eventclass("ai.autofix.agent_handoff")
7373
class AiAutofixAgentHandoffEvent(AiAutofixPhaseEvent):
74-
pass
74+
coding_agent: str | None
7575

7676

7777
analytics.register(AiAutofixRootCauseStartedEvent)

src/sentry/api/endpoints/accept_organization_invite.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ def get(
204204
# When SSO is required do *not* set a next_url to return to accept
205205
# invite. The invite will be accepted after SSO is completed.
206206
url = (
207-
reverse("sentry-accept-invite", args=[member_id, token])
207+
reverse(
208+
"sentry-organization-accept-invite",
209+
kwargs={
210+
"organization_slug": invite_context.organization.slug,
211+
"member_id": member_id,
212+
"token": token,
213+
},
214+
)
208215
if not auth_provider
209216
else "/"
210217
)

src/sentry/api/endpoints/user_organizationintegrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ def get(self, request: Request, user) -> Response:
5353
return self.paginate(
5454
request=request,
5555
queryset=queryset,
56-
on_results=lambda x: serialize(x, request.user),
56+
on_results=lambda x: [item for item in serialize(x, request.user) if item is not None],
5757
paginator_cls=OffsetPaginator,
5858
)

src/sentry/dashboards/models/generate_dashboard_artifact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
Intervals = Literal["5m", "15m", "30m", "1h", "4h", "12h", "24h"]
3939

4040
# Blocklist for frequently hallucinated functions or functions we want to avoid using
41-
FUNCTION_BLOCKLIST: set[str] = {"spm", "apdex", "http_error_count"}
41+
FUNCTION_BLOCKLIST: set[str] = {"spm", "apdex", "http_error_count", "http_error_count_percent"}
4242

4343

4444
class GeneratedWidgetQuery(BaseModel):

src/sentry/features/temporary.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
147147
# API-driven integration setup pipeline (per-provider rollout)
148148
manager.add("organizations:integration-api-pipeline-github", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
149149
manager.add("organizations:integration-api-pipeline-gitlab", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
150+
manager.add("organizations:integration-api-pipeline-slack", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
151+
manager.add("organizations:integration-api-pipeline-bitbucket", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
150152
# Project Management Integrations Feature Parity Flags
151153
manager.add("organizations:integrations-github_enterprise-project-management", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
152154
manager.add("organizations:integrations-gitlab-project-management", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
@@ -443,8 +445,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
443445
manager.add("organizations:workflow-engine-action-filters-cache", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
444446
# Enable ingestion through trusted relays only
445447
manager.add("organizations:ingest-through-trusted-relays-only", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
446-
# Enable metric issue UI for issue alerts
447-
manager.add("organizations:workflow-engine-metric-issue-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
448448
# Disable issue stream detector notifications for metric issues
449449
manager.add("organizations:workflow-engine-metric-issue-disable-issue-detector-notifications", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
450450
# Enable new workflow_engine UI (see: alerts create issues)
@@ -571,8 +571,10 @@ def register_temporary_features(manager: FeatureManager) -> None:
571571
manager.add("projects:supergroup-embeddings-explorer", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
572572
# Enable lightweight Explorer RCA runs for supergroup quality evaluation
573573
manager.add("projects:supergroup-lightweight-rca", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
574-
# Use lightweight RCA source for supergroup clustering and queries
575-
manager.add("organizations:supergroups-lightweight-rca-clustering", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
574+
# Enable lightweight RCA clustering write path (generate embeddings on new issues)
575+
manager.add("organizations:supergroups-lightweight-rca-clustering-write", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
576+
# Enable lightweight RCA clustering read path (query lightweight embeddings in supergroup APIs)
577+
manager.add("organizations:supergroups-lightweight-rca-clustering-read", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
576578

577579
manager.add("projects:workflow-engine-performance-detectors", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
578580

src/sentry/incidents/endpoints/organization_alert_rule_index.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,12 +1036,12 @@ def post(self, request: Request, organization: Organization) -> HttpResponseBase
10361036
```
10371037
10381038
### [Transaction Duration](/product/alerts/alert-types/#transaction-duration)
1039-
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`.
1039+
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `events_analytics_platform`.
10401040
- `aggregate`: Valid values are `avg(transaction.duration)`, `p50(transaction.duration)`, `p75(transaction.duration)`, `p95(transaction.duration)`, `p99(transaction.duration)`, `p100(transaction.duration)`, and `percentile(transaction.duration,x)`, where `x` is your custom percentile.
10411041
```json
10421042
{
10431043
"queryType": 1,
1044-
"dataset": "generic_metrics",
1044+
"dataset": "events_analytics_platform",
10451045
"aggregate": "avg(transaction.duration)"
10461046
}
10471047
```
@@ -1066,29 +1066,29 @@ def post(self, request: Request, organization: Organization) -> HttpResponseBase
10661066
```
10671067
10681068
### [Largest Contentful Paint](/product/alerts/alert-types/#largest-contentful-display)
1069-
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`.
1069+
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `events_analytics_platform`.
10701070
- `aggregate`: Valid values are `avg(measurements.lcp)`, `p50(measurements.lcp)`, `p75(measurements.lcp)`, `p95(measurements.lcp)`, `p99(measurements.lcp)`, `p100(measurements.lcp)`, and `percentile(measurements.lcp,x)`, where `x` is your custom percentile.
10711071
```json
10721072
{
10731073
"queryType": 1,
1074-
"dataset": "generic_metrics",
1074+
"dataset": "events_analytics_platform",
10751075
"aggregate": "p50(measurements.lcp)"
10761076
}
10771077
```
10781078
10791079
### [First Input Delay](/product/alerts/alert-types/#first-input-delay)
1080-
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`.
1080+
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `events_analytics_platform`.
10811081
- `aggregate`: Valid values are `avg(measurements.fid)`, `p50(measurements.fid)`, `p75(measurements.fid)`, `p95(measurements.fid)`, `p99(measurements.fid)`, `p100(measurements.fid)`, and `percentile(measurements.fid,x)`, where `x` is your custom percentile.
10821082
```json
10831083
{
10841084
"queryType": 1,
1085-
"dataset": "generic_metrics",
1085+
"dataset": "events_analytics_platform",
10861086
"aggregate": "p100(measurements.fid)"
10871087
}
10881088
```
10891089
10901090
### [Cumulative Layout Shift](/product/alerts/alert-types/#cumulative-layout-shift)
1091-
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`.
1091+
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `events_analytics_platform`.
10921092
- `aggregate`: Valid values are `avg(measurements.cls)`, `p50(measurements.cls)`, `p75(measurements.cls)`, `p95(measurements.cls)`, `p99(measurements.cls)`, `p100(measurements.cls)`, and `percentile(measurements.cls,x)`, where `x` is your custom percentile.
10931093
```json
10941094
{
@@ -1099,7 +1099,7 @@ def post(self, request: Request, organization: Organization) -> HttpResponseBase
10991099
```
11001100
11011101
### [Custom Metric](/product/alerts/alert-types/#custom-metric)
1102-
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`.
1102+
- `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `events_analytics_platform`.
11031103
- `aggregate`: Valid values are:
11041104
- `avg(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`.
11051105
- `p50(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`.
@@ -1114,7 +1114,7 @@ def post(self, request: Request, organization: Organization) -> HttpResponseBase
11141114
```json
11151115
{
11161116
"queryType": 1,
1117-
"dataset": "generic_metrics",
1117+
"dataset": "events_analytics_platform",
11181118
"aggregate": "p75(measurements.ttfb)"
11191119
}
11201120
```

src/sentry/incidents/grouptype.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ class MetricIssue(GroupType):
350350
category_v2 = GroupCategory.METRIC.value
351351
creation_quota = Quota(3600, 60, 100)
352352
default_priority = PriorityLevel.HIGH
353+
released = True
353354
enable_auto_resolve = False
354355
enable_escalation_detection = False
355356
enable_status_change_workflow_notifications = False
@@ -375,18 +376,3 @@ class MetricIssue(GroupType):
375376
},
376377
},
377378
)
378-
379-
@classmethod
380-
def allow_ingest(cls, organization: Organization) -> bool:
381-
return True
382-
383-
@classmethod
384-
def allow_post_process_group(cls, organization: Organization) -> bool:
385-
return True
386-
387-
@classmethod
388-
def build_visible_feature_name(cls) -> list[str]:
389-
return [
390-
"organizations:workflow-engine-ui",
391-
"organizations:workflow-engine-metric-issue-ui",
392-
]

src/sentry/integrations/api/endpoints/organization_integrations_index.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ def get(
125125
def on_results(results: Sequence[OrganizationIntegration]) -> Sequence[Mapping[str, Any]]:
126126
if feature_filters:
127127
results = filter_by_features(results, feature_filters)
128-
return serialize(results, request.user, include_config=include_config)
128+
return [
129+
item
130+
for item in serialize(results, request.user, include_config=include_config)
131+
if item is not None
132+
]
129133

130134
return self.paginate(
131135
queryset=queryset,

0 commit comments

Comments
 (0)