ref(sentry-apps): Convert installation endpoints to use RPC services#106461
ref(sentry-apps): Convert installation endpoints to use RPC services#106461
Conversation
There was a problem hiding this comment.
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.
src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py
Outdated
Show resolved
Hide resolved
src/sentry/sentry_apps/api/endpoints/installation_external_issues.py
Outdated
Show resolved
Hide resolved
src/sentry/sentry_apps/api/endpoints/installation_external_issues.py
Outdated
Show resolved
Hide resolved
src/sentry/sentry_apps/api/endpoints/installation_external_issues.py
Outdated
Show resolved
Hide resolved
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.
src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py
Show resolved
Hide resolved
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.
src/sentry/sentry_apps/api/endpoints/installation_external_requests.py
Outdated
Show resolved
Hide resolved
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.
src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py
Outdated
Show resolved
Hide resolved
66cd336 to
65c3054
Compare
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.
src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py
Outdated
Show resolved
Hide resolved
src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py
Outdated
Show resolved
Hide resolved
src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py
Outdated
Show resolved
Hide resolved
65c3054 to
b767ecb
Compare
b481ff5 to
984f807
Compare
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.
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>
984f807 to
f766566
Compare
Add __hash__ methods to RpcPlatformExternalIssue and RpcServiceHookProject so they can be used with the serialize() function which uses objects as dict keys.
Convert 6 sentry app installation endpoints from
@region_silo_endpointto@all_silo_endpointby replacing direct database queries with RPC service calls.Depends on: #106526 (must be deployed first)
Endpoints converted:
installation_external_requests.py- usesget_select_optionsRPCinstallation_external_issue_actions.py- usescreate_issue_linkRPCinstallation_external_issues.py- usescreate_external_issueRPCinstallation_external_issue_details.py- usesdelete_external_issueRPCDeferred for a follow upinstallation_service_hook_projects.py- uses service hook RPCssentry_app_interaction.py- uses interaction stats RPCsAlso removes obsolete API gateway proxy code since these endpoints no longer need proxying:
SENTRY_APP_REGION_URL_NAMEStupleproxy_sentryappinstallation_requestandproxy_sentryapp_requestfunctionsThis 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.