Skip to content

Commit 1f5062e

Browse files
authored
Merge branch 'master' into scraps/loader
2 parents 2fe1c10 + 36f6e8a commit 1f5062e

File tree

61 files changed

+1695
-490
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

+1695
-490
lines changed

src/sentry/api/bases/organization_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ def get_additional_queries(self, request: Request) -> AdditionalQueries:
831831
span=request.GET.getlist("spanQuery"),
832832
log=request.GET.getlist("logQuery"),
833833
metric=request.GET.getlist("metricQuery"),
834+
occurrences=request.GET.getlist("occurrencesQuery"),
834835
)
835836

836837

src/sentry/api/endpoints/organization_trace_item_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def string_autocomplete_function(self) -> list[TagValue]:
818818

819819
values: Sequence[str] = rpc_response.values
820820
if self.context_definition:
821-
context = self.context_definition.constructor(self.snuba_params)
821+
context = self.context_definition.constructor(self.snuba_params, self.resolver)
822822
values = [context.value_map.get(value, value) for value in values]
823823

824824
return [

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
AUTO_ENABLE_CODE_REVIEW,
3535
AUTO_OPEN_PRS_DEFAULT,
3636
CONSOLE_SDK_INVITE_QUOTA_DEFAULT,
37+
DASHBOARDS_ASYNC_QUEUE_PARALLEL_LIMIT_DEFAULT,
3738
DATA_CONSENT_DEFAULT,
3839
DEBUG_FILES_ROLE_DEFAULT,
3940
DEFAULT_AUTOFIX_AUTOMATION_TUNING_DEFAULT,
@@ -511,6 +512,7 @@ class _DetailedOrganizationSerializerResponseOptional(OrganizationSerializerResp
511512
ingestThroughTrustedRelaysOnly: bool
512513
enabledConsolePlatforms: list[str]
513514
consoleSdkInviteQuota: int
515+
dashboardsAsyncQueueParallelLimit: int
514516

515517

516518
@extend_schema_serializer(exclude_fields=["availableRoles"])
@@ -793,6 +795,11 @@ def serialize( # type: ignore[override]
793795
CONSOLE_SDK_INVITE_QUOTA_DEFAULT,
794796
)
795797

798+
context["dashboardsAsyncQueueParallelLimit"] = obj.get_option(
799+
"sentry:dashboards-async-queue-parallel-limit",
800+
DASHBOARDS_ASYNC_QUEUE_PARALLEL_LIMIT_DEFAULT,
801+
)
802+
796803
if access.role is not None:
797804
context["role"] = access.role # Deprecated
798805
context["orgRole"] = access.role
@@ -824,6 +831,7 @@ def serialize( # type: ignore[override]
824831
"ingestThroughTrustedRelaysOnly",
825832
"enabledConsolePlatforms",
826833
"consoleSdkInviteQuota",
834+
"dashboardsAsyncQueueParallelLimit",
827835
"hasGranularReplayPermissions",
828836
"replayAccessMembers",
829837
]

src/sentry/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ class InsightModules(Enum):
733733
SEER_AUTOMATED_RUN_STOPPING_POINT_DEFAULT = "code_changes"
734734
ENABLED_CONSOLE_PLATFORMS_DEFAULT: list[str] = []
735735
CONSOLE_SDK_INVITE_QUOTA_DEFAULT = 0
736+
DASHBOARDS_ASYNC_QUEUE_PARALLEL_LIMIT_DEFAULT = 20
736737

737738
INGEST_THROUGH_TRUSTED_RELAYS_ONLY_DEFAULT = "disabled"
738739

src/sentry/core/endpoints/organization_details.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
AUTO_ENABLE_CODE_REVIEW,
4747
AUTO_OPEN_PRS_DEFAULT,
4848
CONSOLE_SDK_INVITE_QUOTA_DEFAULT,
49+
DASHBOARDS_ASYNC_QUEUE_PARALLEL_LIMIT_DEFAULT,
4950
DEBUG_FILES_ROLE_DEFAULT,
5051
DEFAULT_AUTOFIX_AUTOMATION_TUNING_DEFAULT,
5152
DEFAULT_CODE_REVIEW_TRIGGERS,
@@ -289,6 +290,12 @@
289290
int,
290291
CONSOLE_SDK_INVITE_QUOTA_DEFAULT,
291292
),
293+
(
294+
"dashboardsAsyncQueueParallelLimit",
295+
"sentry:dashboards-async-queue-parallel-limit",
296+
int,
297+
DASHBOARDS_ASYNC_QUEUE_PARALLEL_LIMIT_DEFAULT,
298+
),
292299
)
293300

294301
DELETION_STATUSES = frozenset(
@@ -361,6 +368,7 @@ class OrganizationSerializer(BaseOrganizationSerializer):
361368
allow_empty=True,
362369
)
363370
consoleSdkInviteQuota = serializers.IntegerField(required=False, min_value=0)
371+
dashboardsAsyncQueueParallelLimit = serializers.IntegerField(required=False, min_value=1)
364372
enableSeerEnhancedAlerts = serializers.BooleanField(required=False)
365373
enableSeerCoding = serializers.BooleanField(required=False)
366374
defaultCodingAgent = serializers.CharField(required=False, allow_null=True)

src/sentry/deletions/models/scheduleddeletion.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BaseScheduledDeletion(Model):
3333
the tasks/deletion/scheduled.py job in the future. They are cancellable, and provide automatic, batched cascade
3434
in an async way for performance reasons.
3535
36-
Note that BOTH region AND control silos need to be able to schedule deletions of different records that will be
36+
Note that BOTH cell AND control silos need to be able to schedule deletions of different records that will be
3737
reconciled in different places. For that reason, the ScheduledDeletion model is split into two identical models
3838
representing this split. Use the corresponding ScheduledDeletion based on the silo of the model being scheduled
3939
for deletion.
@@ -139,9 +139,9 @@ def get_actor(self) -> RpcUser | None:
139139
class ScheduledDeletion(BaseScheduledDeletion):
140140
"""
141141
This model schedules deletions to be processed in control and monolith silo modes. All historic schedule deletions
142-
occur in this table. In the future, when RegionScheduledDeletions have proliferated for the appropriate models,
143-
we will allow any region models scheduled in this table to finish processing before ensuring that all models discretely
144-
process in either this table or the region table.
142+
occur in this table. In the future, when CellScheduledDeletions have proliferated for the appropriate models,
143+
we will allow any cell models scheduled in this table to finish processing before ensuring that all models discretely
144+
process in either this table or the cell table.
145145
"""
146146

147147
class Meta:
@@ -165,7 +165,7 @@ class Meta:
165165
db_table = "sentry_regionscheduleddeletion"
166166

167167

168-
def get_regional_scheduled_deletion(mode: SiloMode) -> type[BaseScheduledDeletion]:
168+
def get_cell_scheduled_deletion(mode: SiloMode) -> type[BaseScheduledDeletion]:
169169
if mode != SiloMode.CONTROL:
170170
return CellScheduledDeletion
171171
return ScheduledDeletion

src/sentry/incidents/endpoints/serializers/workflow_engine_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def get_attrs(
257257
for detector_trigger in detector_trigger_data_conditions
258258
],
259259
condition_group__in=Subquery(workflow_dcg_ids),
260-
)
260+
).select_related("condition_group")
261261

262262
dcgas = DataConditionGroupAction.objects.filter(
263263
condition_group__in=[

src/sentry/integrations/base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
organization_service,
2828
)
2929
from sentry.pipeline.provider import PipelineProvider
30-
from sentry.pipeline.views.base import PipelineView
30+
from sentry.pipeline.views.base import ApiPipelineSteps, PipelineView
3131
from sentry.shared_integrations.constants import (
3232
ERR_INTERNAL,
3333
ERR_UNAUTHORIZED,
@@ -312,6 +312,14 @@ def get_pipeline_views(
312312
"""
313313
raise NotImplementedError
314314

315+
def get_pipeline_api_steps(self) -> ApiPipelineSteps[IntegrationPipeline]:
316+
"""
317+
Return API step objects for this provider's pipeline, or None if API
318+
mode is not supported. Override to enable the pipeline API for this
319+
integration.
320+
"""
321+
return None
322+
315323
def build_integration(self, state: Mapping[str, Any]) -> IntegrationData:
316324
"""
317325
Given state captured during the setup pipeline, return a dictionary

0 commit comments

Comments
 (0)