Skip to content

Conversation

@ceorourke
Copy link
Member

@ceorourke ceorourke commented Dec 9, 2025

Follow up to #104613 to properly read target_type and target_identifier from Action models' config field - we store them in snake case, not camel case. For now we need to support both as we are still processing some rules through the old system.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #104634   +/-   ##
========================================
  Coverage   80.47%    80.47%           
========================================
  Files        9349      9349           
  Lines      401504    401505    +1     
  Branches    25802     25802           
========================================
+ Hits       323129    323130    +1     
  Misses      77933     77933           
  Partials      442       442           

from sentry.models.organizationmemberteam import OrganizationMemberTeam
from sentry.models.projectownership import ProjectOwnership
from sentry.models.rule import Rule
from sentry.notifications.types import ActionTargetType, FallthroughChoiceType
Copy link
Member Author

Choose a reason for hiding this comment

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

This diff is rough - here's what I changed:

  • Prefixed old tests with legacy
  • Used enums instead of hard coding strings
  • Refactored a bit to move reused vars into a setUp method
  • Replicated all the legacy tests with workflow engine equivalents

@ceorourke ceorourke marked this pull request as ready for review December 10, 2025 01:24
@ceorourke ceorourke requested a review from a team as a code owner December 10, 2025 01:24
@ceorourke ceorourke requested a review from a team December 10, 2025 01:24
}
target_type = ActionTargetType(self.data["targetType"])
target_identifier = self.data.get("targetIdentifier", None)
# XXX: temporarily support both types, after ACI GA we should only need to support snake case
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately we'll need to support both until we completely rewrite how we send notifications 🥲 so we don't use Rules anymore

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.

3 participants