-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(hc): Silo fixes for OrganizationAlertRuleAvailableActionIndexEndpoint #57949
fix(hc): Silo fixes for OrganizationAlertRuleAvailableActionIndexEndpoint #57949
Conversation
…oint Adapt OrganizationAlertRuleAvailableActionIndexEndpoint and get_available_action_integrations_for_org to run in the region silo. Introduce a prepare_sentry_app_components method to AppService. Remove the method of the same name from the SentryAppInstallation model. (It previously dispatched to the same module-level function that AppService now calls. The model method was called nowhere else.) Mark OrganizationAlertRuleAvailableActionIndexEndpointTest as stable. Change setup to pass RPC models as needed.
from sentry.models.integrations.sentry_app_installation import prepare_sentry_app_components | ||
|
||
installation = SentryAppInstallation.objects.get(id=installation_id) | ||
values = json.loads(values_json) if values_json else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we handle json parsing failures here? We are getting a JSON blob off the wire.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea, and one that we should probably generalize to other RPC methods. (Grep for data_json
to see those cases.)
However, considering that it's not used by the one call site and may remain unused indefinitely, I'll just remove it. We can always add it later (with good validation) when we need to.
revert failed (conflict? already reverted?) -- check the logs |
#58091) Rolling back #57949 to address SENTRY-16NH (https://sentry.sentry.io/issues/4544284664/) The original fix should be mostly okay but `RpcSentryAppComponent` should not have `Mapping[str, Any]` as a field, which seems to be the root of the problem.
Restore #57949, which was reverted by #58091. Fix SENTRY-16NH (https://sentry.sentry.io/issues/4544284664/). Adapt OrganizationAlertRuleAvailableActionIndexEndpoint and get_available_action_integrations_for_org to run in the region silo. Introduce a prepare_sentry_app_components method to AppService. Remove the method of the same name from the SentryAppInstallation model. (It previously dispatched to the same module-level function that AppService now calls. The model method was called nowhere else.) Mark OrganizationAlertRuleAvailableActionIndexEndpointTest as stable. Change setup to pass RPC models as needed.
Adapt OrganizationAlertRuleAvailableActionIndexEndpoint and get_available_action_integrations_for_org to run in the region silo.
Introduce a prepare_sentry_app_components method to AppService. Remove the method of the same name from the SentryAppInstallation model. (It previously dispatched to the same module-level function that AppService now calls. The model method was called nowhere else.)
Mark OrganizationAlertRuleAvailableActionIndexEndpointTest as stable. Change setup to pass RPC models as needed.