Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions static/app/types/workflowEngine/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface ActionConfig {
targetDisplay: string | null;
targetIdentifier: string | null;
targetType: ActionTarget | null;
sentryAppIdentifier?: SentryAppIdentifier;
}

export enum ActionTarget {
Expand Down Expand Up @@ -57,11 +56,6 @@ export enum ActionGroup {
OTHER = 'other',
}

export enum SentryAppIdentifier {
SENTRY_APP_INSTALLATION_UUID = 'sentry_app_installation_uuid',
SENTRY_APP_ID = 'sentry_app_id',
}

export interface ActionHandler {
configSchema: Record<string, any>;
dataSchema: Record<string, any>;
Expand Down
11 changes: 2 additions & 9 deletions static/app/views/automations/components/actionNodeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {t} from 'sentry/locale';
import {
ActionGroup,
ActionType,
SentryAppIdentifier,
type Action,
type ActionHandler,
} from 'sentry/types/workflowEngine/actions';
Expand Down Expand Up @@ -46,16 +45,10 @@ function getActionHandler(
if (handler.type !== ActionType.SENTRY_APP) {
return false;
}
const {sentryAppIdentifier, targetIdentifier} = action.config;
const {targetIdentifier} = action.config;
const sentryApp = handler.sentryApp;

const isMatchingAppId =
sentryAppIdentifier === SentryAppIdentifier.SENTRY_APP_ID &&
targetIdentifier === sentryApp?.id;
const isMatchingInstallationUuid =
sentryAppIdentifier === SentryAppIdentifier.SENTRY_APP_INSTALLATION_UUID &&
targetIdentifier === sentryApp?.installationUuid;
return isMatchingAppId || isMatchingInstallationUuid;
return targetIdentifier === sentryApp?.id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Creating new Sentry App actions will fail because the frontend no longer sends the required sentry_app_identifier field, which the backend still expects for validation.
Severity: HIGH

Suggested Fix

Update the getDefaultConfig() function in automationBuilderContext.tsx to include the sentryAppIdentifier field in the returned configuration object for new Sentry App actions. This will align the frontend payload with the backend's required schema and allow new actions to be saved successfully.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/app/views/automations/components/actionNodeList.tsx#L51

Potential issue: When creating a new Sentry App action, the frontend configuration
generated by `getDefaultConfig()` in `automationBuilderContext.tsx` no longer includes
the `sentryAppIdentifier` field. However, the backend schema defined in
`sentry_app_handler.py` still lists `sentry_app_identifier` as a required field.
Consequently, any attempt to save a new Sentry App action from the user interface will
result in a backend validation error, preventing users from successfully creating these
automations.

Copy link
Member Author

@ceorourke ceorourke Feb 9, 2026

Choose a reason for hiding this comment

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

This will not be merged until #107174 is merged first.

});
}
return availableActions.find(handler => handler.type === action.type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ import type {
ActionConfig,
ActionHandler,
} from 'sentry/types/workflowEngine/actions';
import {
ActionGroup,
ActionTarget,
ActionType,
SentryAppIdentifier,
} from 'sentry/types/workflowEngine/actions';
import {ActionGroup, ActionTarget, ActionType} from 'sentry/types/workflowEngine/actions';
import {
DataConditionGroupLogicType,
DataConditionType,
Expand Down Expand Up @@ -512,9 +507,6 @@ function getDefaultConfig(actionHandler: ActionHandler): ActionConfig {
targetType,
targetIdentifier,
targetDisplay,
...(actionHandler.sentryApp?.id && {
sentryAppIdentifier: SentryAppIdentifier.SENTRY_APP_ID,
}),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {IconWarning} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import {
ActionType,
SentryAppIdentifier,
type Action,
type ActionHandler,
} from 'sentry/types/workflowEngine/actions';
Expand Down Expand Up @@ -70,13 +69,8 @@ function findActionHandler(
availableActions: ActionHandler[]
): ActionHandler | undefined {
if (action.type === ActionType.SENTRY_APP) {
if (action.config.sentryAppIdentifier === SentryAppIdentifier.SENTRY_APP_ID) {
return availableActions.find(
handler => handler.sentryApp?.id === action.config.targetIdentifier
);
}
return availableActions.find(
handler => handler.sentryApp?.installationUuid === action.config.targetIdentifier
handler => handler.sentryApp?.id === action.config.targetIdentifier
);
}
return availableActions.find(handler => handler.type === action.type);
Expand Down
1 change: 0 additions & 1 deletion static/app/views/automations/new.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ describe('AutomationNewSettings', () => {
targetType: 'sentry_app',
targetIdentifier: 'sentry-app-1',
targetDisplay: 'My Sentry App',
sentryAppIdentifier: 'sentry_app_id',
},
},
github: {
Expand Down
Loading