Skip to content

Commit 61fcc4b

Browse files
authored
chore(ACI): Remove unused RPC methods (#108256)
Follow up to #108152 to remove the now unused RPC methods to update Actions' status following sentry app installation deletion. Will not merge until the previous PR is deployed.
1 parent 118ba69 commit 61fcc4b

File tree

2 files changed

+0
-98
lines changed

2 files changed

+0
-98
lines changed

src/sentry/workflow_engine/service/action/impl.py

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -47,79 +47,6 @@ def update_action_status_for_sentry_app_installation(
4747
dataconditiongroupaction__condition_group__organization_id=organization_id,
4848
).update(status=status)
4949

50-
def update_action_status_for_sentry_app_via_uuid(
51-
self,
52-
*,
53-
organization_id: int,
54-
status: int,
55-
sentry_app_install_uuid: str | None = None,
56-
sentry_app_id: int | None = None,
57-
) -> None:
58-
sentry_app_id_actions = Action.objects.none()
59-
installation_uuid_actions = Action.objects.none()
60-
61-
if sentry_app_id:
62-
sentry_app_id_actions = Action.objects.filter(
63-
config__sentry_app_identifier=SentryAppIdentifier.SENTRY_APP_ID,
64-
config__target_identifier=str(sentry_app_id),
65-
type=Action.Type.SENTRY_APP,
66-
dataconditiongroupaction__condition_group__organization_id=organization_id,
67-
)
68-
if sentry_app_install_uuid:
69-
installation_uuid_actions = Action.objects.filter(
70-
config__sentry_app_identifier=SentryAppIdentifier.SENTRY_APP_INSTALLATION_UUID,
71-
config__target_identifier=sentry_app_install_uuid,
72-
type=Action.Type.SENTRY_APP,
73-
dataconditiongroupaction__condition_group__organization_id=organization_id,
74-
)
75-
76-
actions = sentry_app_id_actions | installation_uuid_actions
77-
if actions:
78-
actions.update(status=status)
79-
80-
def update_action_status_for_sentry_app_via_uuid__region(
81-
self,
82-
*,
83-
region_name: str,
84-
status: int,
85-
sentry_app_install_uuid: str | None = None,
86-
organization_id: int | None = None,
87-
sentry_app_id: int | None = None,
88-
) -> None:
89-
sentry_app_id_actions = Action.objects.none()
90-
installation_uuid_actions = Action.objects.none()
91-
92-
if not sentry_app_id and not organization_id:
93-
logger.info(
94-
"Expected sentry_app_id and organization_id, but they were not passed",
95-
extra={"sentry_app_id": sentry_app_id, "organization_id": organization_id},
96-
)
97-
98-
if sentry_app_id and organization_id:
99-
sentry_app_id_actions = Action.objects.filter(
100-
config__sentry_app_identifier=SentryAppIdentifier.SENTRY_APP_ID,
101-
config__target_identifier=str(sentry_app_id),
102-
type=Action.Type.SENTRY_APP,
103-
dataconditiongroupaction__condition_group__organization_id=organization_id,
104-
)
105-
if sentry_app_install_uuid and organization_id:
106-
installation_uuid_actions = Action.objects.filter(
107-
config__target_identifier=sentry_app_install_uuid,
108-
type=Action.Type.SENTRY_APP,
109-
config__sentry_app_identifier=SentryAppIdentifier.SENTRY_APP_INSTALLATION_UUID,
110-
dataconditiongroupaction__condition_group__organization_id=organization_id,
111-
)
112-
elif sentry_app_install_uuid:
113-
installation_uuid_actions = Action.objects.filter(
114-
config__target_identifier=sentry_app_install_uuid,
115-
type=Action.Type.SENTRY_APP,
116-
config__sentry_app_identifier=SentryAppIdentifier.SENTRY_APP_INSTALLATION_UUID,
117-
)
118-
119-
actions = sentry_app_id_actions | installation_uuid_actions
120-
if actions:
121-
actions.update(status=status)
122-
12350
def update_action_status_for_sentry_app_via_sentry_app_id(
12451
self,
12552
*,

src/sentry/workflow_engine/service/action/service.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,6 @@ def update_action_status_for_sentry_app_installation(
4646
) -> None:
4747
pass
4848

49-
@regional_rpc_method(resolve=ByOrganizationId())
50-
@abc.abstractmethod
51-
def update_action_status_for_sentry_app_via_uuid(
52-
self,
53-
*,
54-
organization_id: int,
55-
status: int,
56-
sentry_app_install_uuid: str | None = None,
57-
sentry_app_id: int | None = None,
58-
) -> None:
59-
pass
60-
61-
@regional_rpc_method(resolve=ByRegionName())
62-
@abc.abstractmethod
63-
def update_action_status_for_sentry_app_via_uuid__region(
64-
self,
65-
*,
66-
region_name: str,
67-
status: int,
68-
sentry_app_install_uuid: str | None = None,
69-
organization_id: int | None = None,
70-
sentry_app_id: int | None = None,
71-
) -> None:
72-
pass
73-
7449
@regional_rpc_method(resolve=ByRegionName())
7550
@abc.abstractmethod
7651
def update_action_status_for_sentry_app_via_sentry_app_id(

0 commit comments

Comments
 (0)