Skip to content
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

ref(workflow_engine): Add legacy_notification_product column to workflow_engine.Action #82117

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

saponifi3d
Copy link
Contributor

Description

While designing the NotificationActionHandler, we've run into a number of methods that are tightly coupled to the legacy product models. This will allow us to easily switch between the two registries and simplify which actions are available in the UI.

Also removes the NOTIFICATION generalized type in favor of specific types. This will allow us to more easily search / sort by these columns.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 14, 2024
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0016_action_model_updates.py ()

--
-- Moved action.required field to pending deletion state
--
-- (no-op)
--
-- Add field legacy_notification_product to action
--
ALTER TABLE "workflow_engine_action" ADD COLUMN "legacy_notification_product" text NULL;

Copy link

codecov bot commented Dec 14, 2024

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   #82117      +/-   ##
==========================================
+ Coverage   80.36%   80.38%   +0.01%     
==========================================
  Files        7276     7277       +1     
  Lines      321475   321259     -216     
  Branches    20966    20966              
==========================================
- Hits       258366   258256     -110     
+ Misses      62701    62595     -106     
  Partials      408      408              

@saponifi3d saponifi3d force-pushed the jcallender/aci/action_model_refactors branch from 6169992 to 2b2c12b Compare December 17, 2024 03:38
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0016_refactor_action_model.py ()

--
-- Add field legacy_notification_type to action
--
ALTER TABLE "workflow_engine_action" ADD COLUMN "legacy_notification_type" text NULL;

@saponifi3d saponifi3d marked this pull request as ready for review December 17, 2024 04:36
@saponifi3d saponifi3d requested review from a team as code owners December 17, 2024 04:36
@saponifi3d saponifi3d requested a review from a team December 17, 2024 04:57
Copy link
Member

@iamrajjoshi iamrajjoshi left a comment

Choose a reason for hiding this comment

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

lgtm, i can add additional action types when i get to this part.

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

schema change looks good to me.

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

Migration lgtm

@saponifi3d saponifi3d merged commit 98aa67b into master Dec 17, 2024
49 checks passed
@saponifi3d saponifi3d deleted the jcallender/aci/action_model_refactors branch December 17, 2024 20:09
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2025
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.

4 participants