Skip to content

fix(cells) Add rollout option and support for apigateway deployments#118098

Open
markstory wants to merge 1 commit into
masterfrom
chore-apigw-rollout
Open

fix(cells) Add rollout option and support for apigateway deployments#118098
markstory wants to merge 1 commit into
masterfrom
chore-apigw-rollout

Conversation

@markstory

Copy link
Copy Markdown
Member

Add a new rollout option and logic to use the api_gateway deployments in all cells. I've defaulted the US to 1.0 as that region has already had a rollout done for api_gateway deployments.

Refs INC-2198

Add a new rollout option and logic to use the api_gateway deployments in
all cells. I've defaulted the US to 1.0 as that region has already had
a rollout done for api_gateway deployments.

Refs INC-2198
@markstory markstory requested a review from a team as a code owner June 19, 2026 16:45
@linear-code

linear-code Bot commented Jun 19, 2026

Copy link
Copy Markdown

INC-2198

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 19, 2026

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c22f330. Configure here.

register(
"hybridcloud.rpc.use_pooling_rate",
type=Float,
default=1.0,

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.

RPC pooling option accidentally deleted

High Severity

Replacing apigateway.proxy.use_gateway_address removed the register call for hybridcloud.rpc.use_pooling_rate, but _get_connection in hybridcloud/rpc/service.py still calls in_random_rollout for that key. options.get then raises UnknownOption on cross-silo RPC traffic.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c22f330. Configure here.

Comment on lines 204 to 214
register(
"apigateway.proxy.use_gateway_address",
type=Float,
default=0.0,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)
register(
"hybridcloud.rpc.use_pooling_rate",
type=Float,
default=1.0,
"apigateway.proxy.cell-rollout",
type=Dict,
default={
"us": 1.0,
"de": 0.0,
"us2": 0.0,
"s4s2": 0.0,
},
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

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 removed option hybridcloud.rpc.use_pooling_rate is still in use, causing in_random_rollout to raise an unhandled UnknownOption error on every RPC call.
Severity: CRITICAL

Suggested Fix

Re-add the registration for the hybridcloud.rpc.use_pooling_rate option in src/sentry/hybridcloud/options.py. If this option is no longer needed, remove the corresponding call to in_random_rollout("hybridcloud.rpc.use_pooling_rate") from src/sentry/hybridcloud/rpc/service.py.

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/hybridcloud/options.py#L202-L214

Potential issue: The option `hybridcloud.rpc.use_pooling_rate` was removed from the
options registry in `src/sentry/hybridcloud/options.py`, but it is still referenced in
`src/sentry/hybridcloud/rpc/service.py` through a call to `in_random_rollout`. This
function internally calls `options.get()` without a `silent` parameter, which raises an
`UnknownOption` exception for unregistered options. Because this exception is not
handled in the call stack, every remote RPC call will crash, causing a major failure in
inter-silo communication.

Also affects:

  • src/sentry/hybridcloud/rpc/service.py:527

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

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.

1 participant