Skip to content

feat(cells): Add option to route org listing through control silo#117115

Merged
lynnagara merged 2 commits into
masterfrom
ui-org-list-featureflag
Jun 8, 2026
Merged

feat(cells): Add option to route org listing through control silo#117115
lynnagara merged 2 commits into
masterfrom
ui-org-list-featureflag

Conversation

@lynnagara

@lynnagara lynnagara commented Jun 8, 2026

Copy link
Copy Markdown
Member

Adds the cells.use-control-org-listing option flag. When enabled, the org listing control feature is exposed to the UI, so it can route requests to the new endpoint.

This PR just registers and wires the option, no traffic is moved yet.

The frontend code that uses this option is in #117116

Adds the `cells.use-control-org-listing` option flag. When enabled,
the org listing control feature is exposed to the UI, so it
can route requests to the new endpoint.

This PR just registers and wires the option, no traffic is moved
yet.
@lynnagara lynnagara requested a review from a team as a code owner June 8, 2026 18:51
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 8, 2026
Comment on lines +230 to 231
yield "organizations:use-control-org-listing"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The feature flag organizations:use-control-org-listing is implemented via options.get(), bypassing the standard features.has() registration pattern, which harms discoverability and maintainability.
Severity: LOW

Suggested Fix

Register organizations:use-control-org-listing as a feature in the feature manager (e.g., src/sentry/features/temporary.py) and use the standard features.has("organizations:use-control-org-listing", ...) check to expose it to the client, aligning it with existing patterns.

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/web/client_config.py#L230-L231

Potential issue: The feature flag `organizations:use-control-org-listing` is implemented
by directly checking an option with `options.get()`. This bypasses the standard pattern
of registering features in the feature manager (e.g., in
`src/sentry/features/temporary.py` or `src/sentry/features/permanent.py`) and checking
them with `features.has()`. This architectural inconsistency makes the feature flag
undiscoverable to developers and automated tooling that rely on the feature manager for
auditing or analytics. While functionally correct, it introduces maintenance overhead
and potential for developer confusion, as it deviates from how other client-side
features are managed.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's ok, this isn't actually an org scoped feature.

@lynnagara lynnagara merged commit 6e178fa into master Jun 8, 2026
117 of 119 checks passed
@lynnagara lynnagara deleted the ui-org-list-featureflag branch June 8, 2026 22:04
lynnagara added a commit that referenced this pull request Jun 9, 2026
…117116)

If `organizations:use-control-org-listing` is enabled,
`fetchOrganizations` makes a single API call to the control silo GET
/organizations/ endpoint, instead of fanning out to all cells and
merging results in the UI.

The option behind this is registered in
#117115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants