Skip to content

chore(ACI): Remove support for legacy sentry app data in Actions#107174

Draft
ceorourke wants to merge 6 commits intomasterfrom
ceorourke/remove-support-legacy-action-sentry-app-data
Draft

chore(ACI): Remove support for legacy sentry app data in Actions#107174
ceorourke wants to merge 6 commits intomasterfrom
ceorourke/remove-support-legacy-action-sentry-app-data

Conversation

@ceorourke
Copy link
Member

@ceorourke ceorourke commented Jan 28, 2026

Remove the code that handles both the legacy sentry app installation uuid and the sentry app id as the target identifier. Now that we've migrated the Action data to only ever have the sentry app id, we don't need to expect the installation uuid.

Do not merge until we've verified the migration ran successfully.

As a follow up I don't believe we're using Action.config["sentry_app_identifier"] anymore (since it's always sentry app id) so it might be nice to run a final cleanup migration to remove the field.

@ceorourke ceorourke requested review from a team as code owners January 28, 2026 18:28
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 28, 2026
@mock.patch(
"sentry.rules.actions.sentry_apps.utils.app_service.trigger_sentry_app_action_creators"
)
def test_validate_sentry_app_id(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The basic test_validate covers this case now that the setup data is using sentry app id

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.

installation = self._get_sentry_app_installation(sentry_app_identifier, target_identifier)
installations = app_service.get_many(
filter=dict(app_ids=[int(target_identifier)], organization_id=self.organization.id)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unhandled ValueError when legacy identifier format used

Medium Severity

The clean_data method calls int(target_identifier) without error handling. The config schema in sentry_app_handler.py still includes SENTRY_APP_INSTALLATION_UUID in the sentry_app_identifier enum, allowing requests with UUID-formatted target_identifier values to pass schema validation. When such a request reaches this code, int() raises an unhandled ValueError, resulting in a 500 error instead of a proper validation error response.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is why we don't merge this until the migration has run

@ceorourke ceorourke force-pushed the ceorourke/remove-support-legacy-action-sentry-app-data branch from fc008f5 to 823bc8b Compare February 7, 2026 00:59
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