Skip to content

chore(aci): migration to fix fallthrough_type on email Actions#106902

Merged
cathteng merged 6 commits intomasterfrom
cathy/aci/fallthrough_type-migration
Feb 2, 2026
Merged

chore(aci): migration to fix fallthrough_type on email Actions#106902
cathteng merged 6 commits intomasterfrom
cathy/aci/fallthrough_type-migration

Conversation

@cathteng
Copy link
Contributor

We started handling fallthroughType correctly in dual writing here #106633

But we need a migration to fix the previously migrated email actions

@cathteng cathteng requested review from a team as code owners January 23, 2026 18:54
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 23, 2026
@cathteng cathteng marked this pull request as draft January 23, 2026 18:59
@cathteng cathteng marked this pull request as ready for review January 23, 2026 19:09
@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0106_fix_email_action_fallthrough_type.py

for 0106_fix_email_action_fallthrough_type in workflow_engine

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0107_fix_email_action_fallthrough_type.py

for 0107_fix_email_action_fallthrough_type in workflow_engine

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

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.

Copy link
Member

@ceorourke ceorourke left a comment

Choose a reason for hiding this comment

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

left some non blocking nits

Comment on lines +52 to +56
if target_type_str in ("Member", "Team"):
target_identifier = rule_action.get("targetIdentifier")
config["target_identifier"] = str(target_identifier) if target_identifier else str(None)
else:
config["target_identifier"] = None
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't you do something like

config["target_identifier"] = str(rule_action.get("targetIdentifier"))

since None is the fallback value and IssueOwners wouldn't have one set?

Comment on lines +62 to +65
fallthrough_type = rule_action.get("fallthrough_type")
if fallthrough_type is None:
fallthrough_type = rule_action.get("fallthroughType", DEFAULT_FALLTHROUGH_TYPE)
data["fallthrough_type"] = str(fallthrough_type)
Copy link
Member

Choose a reason for hiding this comment

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

Same here I think you can simplify a bit

fallthrough_type = rule_action.get("fallthrough_type", "fallthroughType")
data["fallthrough_type"] = str(fallthrough_type) if fallthrough_type else DEFAULT_FALLTHROUGH_TYPE

@cathteng cathteng merged commit 49f9a65 into master Feb 2, 2026
71 checks passed
@cathteng cathteng deleted the cathy/aci/fallthrough_type-migration branch February 2, 2026 21:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants