Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/sentry/integrations/middleware/hybrid_cloud/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,14 @@ def get_responses_from_cell_silos(self, cells: list[Cell]) -> dict[str, CellResu

def get_response_from_webhookpayload(
self,
cells: list[Cell] | None = None, # TODO(cells): make required once getsentry is updated
cells: list[Cell],
identifier: int | str | None = None,
integration_id: int | None = None,
regions: list[Cell] | None = None, # TODO(cells): remove once getsentry is updated
) -> HttpResponseBase:
"""
Used to create webhookpayloads for provided cells to handle the webhooks asynchronously.
Responds to the webhook provider with a 202 Accepted status.
"""
cells = cells or regions or []
if len(cells) < 1:
return HttpResponse(status=status.HTTP_202_ACCEPTED)

Expand Down
4 changes: 0 additions & 4 deletions src/sentry/testutils/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,3 @@ def override_cells(cells: Sequence[Cell], local_cell: Cell | None = None) -> Gen
"""
with get_test_env_directory().swap_state(cells, local_cell=local_cell):
yield


# TODO(cells): Remove alias once no longer used in getsentry
override_regions = override_cells
2 changes: 0 additions & 2 deletions src/sentry/testutils/region.py

This file was deleted.

11 changes: 1 addition & 10 deletions src/sentry/testutils/silo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ def create_test_cells(*names: str, single_tenants: Iterable[str] = ()) -> tuple[
)


# TODO(cells): Remove alias once no longer used in getsentry
Comment thread
cursor[bot] marked this conversation as resolved.
create_test_regions = create_test_cells


def _model_silo_limit(t: type[Model]) -> ModelSiloLimit:
from sentry.db.models.base import ModelSiloLimit

Expand Down Expand Up @@ -173,8 +169,6 @@ def __call__[
self,
*,
cells: Sequence[Cell] = (),
# TODO(cells): Remove alias once no longer used in getsentry
regions: Sequence[Cell] | None = None,
include_monolith_run: bool = False,
) -> Callable[[T], T]: ...

Expand All @@ -183,16 +177,13 @@ def __call__(
decorated_obj: Any = None,
*,
cells: Sequence[Cell] = (),
# TODO(cells): Remove alias once no longer used in getsentry
regions: Sequence[Cell] | None = None,
include_monolith_run: bool = False,
) -> Any:
silo_modes = self.silo_modes
if include_monolith_run:
silo_modes |= frozenset([SiloMode.MONOLITH])

resolved_cells = tuple(cells or regions or ())
mod = _SiloModeTestModification(silo_modes=silo_modes, cells=resolved_cells)
mod = _SiloModeTestModification(silo_modes=silo_modes, cells=cells)
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
return mod.apply if decorated_obj is None else mod.apply(decorated_obj)


Expand Down
Loading