ref: Begin deprecating category from localities - #123250
Conversation
No longer required, visibility is controlled via `visible` and `signup_visible` parameters
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 61ca126. Configure here.
| """ | ||
| return [ | ||
| loc.name | ||
| for loc in get_global_directory().localities | ||
| if loc.category == RegionCategory.MULTI_TENANT and loc.visible | ||
| ] | ||
| return [loc.name for loc in get_global_directory().localities if loc.visible] |
There was a problem hiding this comment.
Bug: Removing the category check in find_all_multitenant_locality_names may incorrectly expose single-tenant localities in the UI if they are configured with visible=True.
Severity: HIGH
Suggested Fix
Verify that all production configurations for single-tenant localities have been updated to set visible=False. To mitigate risk, consider adding logging to detect and alert on any single-tenant localities with visible=True during a transition period. Ensure the breaking nature of this change is clearly communicated.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/sentry/types/cell.py#L498-L499
Potential issue: The function `find_all_multitenant_locality_names` was changed to
filter localities solely based on the `visible` flag, removing the previous check for
`category == RegionCategory.MULTI_TENANT`. This change assumes that all single-tenant
localities in production configurations have been updated to `visible=False`. If any
single-tenant locality is configured with `visible=True`, it will now be incorrectly
exposed in the frontend UI and included in DNS prefetching. This represents a breaking
change and a migration risk, as the required configuration updates are not mentioned or
enforced, potentially leading to unintended exposure of single-tenant environments.
Also affects:
src/sentry/web/client_config.py:367~372

No longer required, visibility is controlled via
visibleandsignup_visibleparameters