Skip to content

Commit 0ddf3f6

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 14f3ea2 + f6bc39b commit 0ddf3f6

File tree

61 files changed

+1561
-674
lines changed

Some content is hidden

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

61 files changed

+1561
-674
lines changed

migrations_lockfile.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ releases: 0003_real_delete_dual_written_commit_tables
3131

3232
replays: 0006_add_bulk_delete_job
3333

34-
sentry: 1005_add_groupemailthread_project_date_index
34+
sentry: 1006_drop_legacy_incidentseen_incidentsubscription
3535

3636
social_auth: 0003_social_auth_json_field
3737

3838
tempest: 0003_use_encrypted_char_field
3939

4040
uptime: 0048_delete_uptime_status_columns
4141

42-
workflow_engine: 0100_move_is_single_written_to_pending
42+
workflow_engine: 0101_remove_is_single_written_field

src/sentry/api/endpoints/organization_events_timeseries.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,14 @@ def get_rpc_config():
252252

253253
if top_events > 0:
254254
raw_groupby = self.get_field_list(organization, request, param_name="groupBy")
255+
raw_orderby = self.get_orderby(request)
255256
if len(raw_groupby) == 0:
256257
raise ParseError("groupBy is a required parameter when doing topEvents")
257258
if "timestamp" in raw_groupby:
258259
raise ParseError("Cannot group by timestamp")
260+
if raw_orderby:
261+
if "timestamp" in [col.strip("-") for col in raw_orderby]:
262+
raise ParseError("Cannot order by timestamp")
259263
if dataset in RPC_DATASETS:
260264
return dataset.run_top_events_timeseries_query(
261265
params=snuba_params,

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ class DetailedOrganizationSerializerResponse(_DetailedOrganizationSerializerResp
542542
githubPRBot: bool
543543
githubNudgeInvite: bool
544544
gitlabPRBot: bool
545-
gitlabOpenPRBot: bool
546545
aggregatedDataConsent: bool
547546
genAIConsent: bool
548547
isDynamicallySampled: bool
@@ -665,9 +664,6 @@ def serialize( # type: ignore[override]
665664
obj.get_option("sentry:github_nudge_invite", GITHUB_COMMENT_BOT_DEFAULT)
666665
),
667666
"gitlabPRBot": bool(obj.get_option("sentry:gitlab_pr_bot", GITLAB_COMMENT_BOT_DEFAULT)),
668-
"gitlabOpenPRBot": bool(
669-
obj.get_option("sentry:gitlab_open_pr_bot", GITLAB_COMMENT_BOT_DEFAULT)
670-
),
671667
"genAIConsent": bool(
672668
obj.get_option("sentry:gen_ai_consent_v2024_11_14", DATA_CONSENT_DEFAULT)
673669
),

src/sentry/apidocs/examples/organization_examples.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,9 @@ class OrganizationExamples:
290290
"relayPiiConfig": None,
291291
"codecovAccess": False,
292292
"hideAiFeatures": False,
293-
"githubPRBot": True,
293+
"githubPRBot": False,
294294
"githubNudgeInvite": True,
295-
"gitlabPRBot": True,
296-
"gitlabOpenPRBot": True,
295+
"gitlabPRBot": False,
297296
"aggregatedDataConsent": False,
298297
"defaultAutofixAutomationTuning": AutofixAutomationTuningSettings.OFF,
299298
"defaultSeerScannerAutomation": True,

src/sentry/constants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def get_all_languages() -> list[str]:
122122
"corp",
123123
"customers",
124124
"de",
125+
"de2",
125126
"debug",
126127
"devinfra",
127128
"docs",
@@ -213,6 +214,7 @@ def get_all_languages() -> list[str]:
213214
"themonitor",
214215
"trust",
215216
"us",
217+
"us2",
216218
"vs",
217219
"welcome",
218220
"www",
@@ -704,8 +706,8 @@ class InsightModules(Enum):
704706
SCRAPE_JAVASCRIPT_DEFAULT = True
705707
JOIN_REQUESTS_DEFAULT = True
706708
HIDE_AI_FEATURES_DEFAULT = False
707-
GITHUB_COMMENT_BOT_DEFAULT = True
708-
GITLAB_COMMENT_BOT_DEFAULT = True
709+
GITHUB_COMMENT_BOT_DEFAULT = False
710+
GITLAB_COMMENT_BOT_DEFAULT = False
709711
ISSUE_ALERTS_THREAD_DEFAULT = True
710712
METRIC_ALERTS_THREAD_DEFAULT = True
711713
DATA_CONSENT_DEFAULT = False

src/sentry/core/endpoints/organization_details.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@
194194
bool,
195195
GITLAB_COMMENT_BOT_DEFAULT,
196196
),
197-
(
198-
"gitlabOpenPRBot",
199-
"sentry:gitlab_open_pr_bot",
200-
bool,
201-
GITLAB_COMMENT_BOT_DEFAULT,
202-
),
203197
(
204198
"issueAlertsThreadFlag",
205199
"sentry:issue_alerts_thread_flag",
@@ -307,7 +301,6 @@ class OrganizationSerializer(BaseOrganizationSerializer):
307301
githubNudgeInvite = serializers.BooleanField(required=False)
308302
githubPRBot = serializers.BooleanField(required=False)
309303
gitlabPRBot = serializers.BooleanField(required=False)
310-
gitlabOpenPRBot = serializers.BooleanField(required=False)
311304
issueAlertsThreadFlag = serializers.BooleanField(required=False)
312305
metricAlertsThreadFlag = serializers.BooleanField(required=False)
313306
require2FA = serializers.BooleanField(required=False)
@@ -894,10 +887,6 @@ class OrganizationDetailsPutSerializer(serializers.Serializer):
894887
help_text="Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitLab integration.",
895888
required=False,
896889
)
897-
gitlabOpenPRBot = serializers.BooleanField(
898-
help_text="Specify `true` to allow Sentry to comment on open pull requests to show recent error issues for the code being changed. Requires a GitLab integration.",
899-
required=False,
900-
)
901890

902891
# slack features
903892
issueAlertsThreadFlag = serializers.BooleanField(

src/sentry/db/router.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class SiloRouter:
7070
"authprovider_duplicate": SiloMode.CONTROL,
7171
"sentry_actor": SiloMode.REGION,
7272
"sentry_alertruleactivations": SiloMode.REGION,
73+
"sentry_incidentseen": SiloMode.REGION,
74+
"sentry_incidentsubscription": SiloMode.REGION,
7375
"sentry_monitorlocation": SiloMode.REGION,
7476
"sentry_notificationsetting": SiloMode.CONTROL,
7577
"sentry_pagerdutyservice": SiloMode.REGION,

src/sentry/deletions/tasks/nodestore.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -215,38 +215,33 @@ def delete_events_from_eap(
215215
group_ids: Sequence[int],
216216
dataset: Dataset,
217217
) -> None:
218-
eap_deletion_allowlist = options.get("eventstream.eap.deletion_enabled.organization_allowlist")
219-
if organization_id not in eap_deletion_allowlist:
218+
if not options.get("eventstream.eap.deletion-enabled"):
220219
return
221220

222221
try:
223-
response = delete_groups_from_eap_rpc(
222+
delete_groups_from_eap_rpc(
224223
organization_id=organization_id,
225224
project_id=project_id,
226225
group_ids=group_ids,
227226
referrer="deletions.group.eap",
228227
)
229-
logger.info(
230-
"eap.delete_groups.completed",
231-
extra={
232-
"organization_id": organization_id,
233-
"project_id": project_id,
234-
"group_count": len(group_ids),
235-
"matching_items_count": response.matching_items_count,
236-
},
228+
metrics.incr(
229+
"deletions.group.eap.success",
230+
tags={"dataset": dataset.value},
231+
sample_rate=1.0,
237232
)
238-
except Exception as e:
233+
except Exception:
239234
logger.exception(
240-
"eap.delete_groups.failed",
235+
"Failed to delete groups from EAP",
241236
extra={
242237
"organization_id": organization_id,
243238
"project_id": project_id,
244239
"group_ids": group_ids[:10],
245-
"error": str(e),
240+
"dataset": dataset.value,
246241
},
247242
)
248243
metrics.incr(
249-
"deletions.eap.failed",
244+
"deletions.group.eap.failure",
250245
tags={"dataset": dataset.value},
251246
sample_rate=1.0,
252247
)

src/sentry/features/temporary.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
5050
manager.add("organizations:ai-insights-generations-page", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
5151
# Enables alert creation on indexed events in UI (use for PoC/testing only)
5252
manager.add("organizations:alert-allow-indexed", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
53+
# Enables flag for org specific runs on alerts comparison script for spans migration
54+
manager.add("organizations:alerts-timeseries-comparison", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
5355
# Enable anomaly detection feature for EAP spans
5456
manager.add("organizations:anomaly-detection-eap", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
5557
# Enable anr frame analysis

0 commit comments

Comments
 (0)