Skip to content

Commit 1769189

Browse files
authored
ref(cells): Remove unused find_all_multitenant_cell_names function (#117875)
This function is not used. Removing it is a step towards deprecating the Locality.category field.
1 parent cf4f299 commit 1769189

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

src/sentry/types/cell.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,6 @@ def find_all_cell_names() -> Iterable[str]:
497497
return get_global_directory().get_cell_names()
498498

499499

500-
def find_all_multitenant_cell_names() -> list[str]:
501-
"""
502-
Return all visible multi_tenant cells.
503-
"""
504-
cells = get_global_directory().get_cells(RegionCategory.MULTI_TENANT)
505-
return list([c.name for c in cells if c.visible])
506-
507-
508500
def find_all_multitenant_locality_names() -> list[str]:
509501
"""
510502
Return all visible multi-tenant localities.

tests/sentry/types/test_cell.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
Locality,
2222
RegionCategory,
2323
find_all_cell_names,
24-
find_all_multitenant_cell_names,
2524
find_cells_for_sentry_app,
2625
find_cells_for_user,
2726
get_cell_by_name,
@@ -260,32 +259,6 @@ def test_find_all_cell_names(self) -> None:
260259
result = find_all_cell_names()
261260
assert set(result) == {"us", "eu", "acme"}
262261

263-
@override_settings(SILO_MODE=SiloMode.CONTROL)
264-
def test_find_all_multitenant_cell_names(self) -> None:
265-
with override_settings(SENTRY_MONOLITH_REGION="us", SENTRY_FALLBACK_CELL="us"):
266-
directory = load_from_config(self._INPUTS, self._LOCALITY_INPUTS)
267-
with self._in_global_state(directory):
268-
result = find_all_multitenant_cell_names()
269-
assert set(result) == {"us", "eu"}
270-
271-
@override_settings(SILO_MODE=SiloMode.CONTROL)
272-
def test_find_all_multitenant_cell_names_non_visible(self) -> None:
273-
inputs: list[CellConfig] = [
274-
*self._INPUTS,
275-
{
276-
"name": "ja",
277-
"snowflake_id": 4,
278-
"address": "https://ja.testserver",
279-
"visible": False,
280-
},
281-
]
282-
locality_inputs: list[LocalityConfig] = self._LOCALITY_INPUTS
283-
with override_settings(SENTRY_MONOLITH_REGION="us", SENTRY_FALLBACK_CELL="us"):
284-
directory = load_from_config(inputs, locality_inputs)
285-
with self._in_global_state(directory):
286-
result = find_all_multitenant_cell_names()
287-
assert set(result) == {"us", "eu"}
288-
289262
@override_settings(SILO_MODE=SiloMode.CONTROL)
290263
def test_subdomain_is_locality(self) -> None:
291264
cells: list[CellConfig] = [

0 commit comments

Comments
 (0)