Skip to content

ref(sentry-apps): Convert installation endpoints to use RPC services#106461

Merged
leeandher merged 10 commits intomasterfrom
leander/sai-region-service-8-convert-endpoints
Jan 19, 2026
Merged

ref(sentry-apps): Convert installation endpoints to use RPC services#106461
leeandher merged 10 commits intomasterfrom
leander/sai-region-service-8-convert-endpoints

Conversation

@leeandher
Copy link
Member

@leeandher leeandher commented Jan 16, 2026

Convert 6 sentry app installation endpoints from @region_silo_endpoint to @all_silo_endpoint by replacing direct database queries with RPC service calls.

Depends on: #106526 (must be deployed first)

Endpoints converted:

  • installation_external_requests.py - uses get_select_options RPC
  • installation_external_issue_actions.py - uses create_issue_link RPC
  • installation_external_issues.py - uses create_external_issue RPC
  • installation_external_issue_details.py - uses delete_external_issue RPC
  • installation_service_hook_projects.py - uses service hook RPCs Deferred for a follow up
  • sentry_app_interaction.py - uses interaction stats RPCs

Also removes obsolete API gateway proxy code since these endpoints no longer need proxying:

  • Emptied SENTRY_APP_REGION_URL_NAMES tuple
  • Removed proxy_sentryappinstallation_request and proxy_sentryapp_request functions
  • Removed related proxy tests

This enables these endpoints to be called from both control and region silos, which is required for the hybrid cloud migration.

Continues the work from #106424.

@leeandher leeandher requested review from a team as code owners January 16, 2026 19:42
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 16, 2026
Copy link
Contributor

@cursor cursor bot left a comment

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 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@leeandher leeandher marked this pull request as draft January 19, 2026 19:34
@leeandher leeandher force-pushed the leander/sai-region-service-8-convert-endpoints branch from 65c3054 to b767ecb Compare January 19, 2026 19:55
@leeandher leeandher force-pushed the leander/sai-region-service-8-convert-endpoints branch 2 times, most recently from b481ff5 to 984f807 Compare January 19, 2026 20:01
Change from region_silo_endpoint to all_silo_endpoint using the
get_select_options RPC method.
Change from region_silo_endpoint to all_silo_endpoint using the
create_issue_link RPC method.
Change from region_silo_endpoint to all_silo_endpoint using the
create_external_issue RPC method.
Change from region_silo_endpoint to all_silo_endpoint using the
delete_external_issue RPC method.
Change from region_silo_endpoint to all_silo_endpoint using the
get_interaction_stats and record_interaction RPC methods.
leeandher and others added 4 commits January 19, 2026 15:03
Change from region_silo_endpoint to all_silo_endpoint using the
get_service_hook_projects, set_service_hook_projects, and
delete_service_hook_projects RPC methods.
Ensure group_id is converted to int before passing to RPC calls and
remove unused organization_id parameter from record_interaction.
Remove proxy functions and URL names for sentry app installation
endpoints that were converted to @all_silo_endpoint using RPC.

Co-Authored-By: Claude <noreply@anthropic.com>
Revert conversion of installation_service_hook_projects.py to use RPC.
This endpoint will be converted in a separate PR after the TOCTOU fix
is deployed.

Co-Authored-By: Claude <noreply@anthropic.com>
@leeandher leeandher force-pushed the leander/sai-region-service-8-convert-endpoints branch from 984f807 to f766566 Compare January 19, 2026 20:03
@leeandher leeandher marked this pull request as ready for review January 19, 2026 20:04
@leeandher leeandher requested a review from markstory January 19, 2026 20:04
Add __hash__ methods to RpcPlatformExternalIssue and RpcServiceHookProject
so they can be used with the serialize() function which uses objects as
dict keys.
@leeandher leeandher merged commit f8b9813 into master Jan 19, 2026
66 checks passed
@leeandher leeandher deleted the leander/sai-region-service-8-convert-endpoints branch January 19, 2026 20:34
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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