Skip to content

🐛 fix(aci): fix sentry app action handling for test notifications and action handling #91306

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

Merged
merged 1 commit into from
May 9, 2025
Merged
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
13 changes: 9 additions & 4 deletions src/sentry/sentry_apps/tasks/sentry_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,16 @@ def notify_sentry_app(event: GroupEvent, futures: Sequence[RuleFuture]):
# If the future comes from a rule with a UI component form in the schema, append the issue alert payload
# TODO(ecosystem): We need to change this payload format after alerts create issues
id = f.rule.id

# if we are using the new workflow engine, we need to use the legacy rule id
if features.has("organizations:workflow-engine-trigger-actions", event.group.organization):
id = get_key_from_rule_data(f.rule, "legacy_rule_id")
elif features.has("organizations:workflow-engine-ui-links", event.group.organization):
id = get_key_from_rule_data(f.rule, "workflow_id")
# Ignore test notifications
if int(id) != -1:
if features.has("organizations:workflow-engine-ui-links", event.group.organization):
Copy link
Member Author

Choose a reason for hiding this comment

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

flipped the order so it actually does what its suppose to

id = get_key_from_rule_data(f.rule, "workflow_id")
elif features.has(
"organizations:workflow-engine-trigger-actions", event.group.organization
):
id = get_key_from_rule_data(f.rule, "legacy_rule_id")

settings = f.kwargs.get("schema_defined_settings")
if settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ class SentryAppFormConfigDataBlob(DataBlob):
@classmethod
def from_dict(cls, data: dict[str, Any]) -> SentryAppFormConfigDataBlob:
if not isinstance(data.get("name"), str) or not isinstance(
data.get("value"), (str, type(None))
data.get("value"), (str, type(None), int)
):
raise ValueError("Sentry app config must contain name and value keys")
return cls(name=data["name"], value=data["value"], label=data.get("label"))
Expand Down
Loading