-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(ACI): Add lookup table for data conditions and alert rule triggers #88730
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR has a migration; here is the generated SQL for --
-- Create model DataConditionAlertRuleTrigger
--
CREATE TABLE "workflow_engine_dataconditionalertruletrigger" ("id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "date_updated" timestamp with time zone NOT NULL, "date_added" timestamp with time zone NOT NULL, "alert_rule_trigger_id" bigint NULL, "data_condition_id" bigint NOT NULL, CONSTRAINT "workflow_engine_uniq_datacondition_alertruletrigger" UNIQUE ("alert_rule_trigger_id", "data_condition_id"));
ALTER TABLE "workflow_engine_dataconditionalertruletrigger" ADD CONSTRAINT "workflow_engine_data_data_condition_id_8a5d07b7_fk_workflow_" FOREIGN KEY ("data_condition_id") REFERENCES "workflow_engine_datacondition" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "workflow_engine_dataconditionalertruletrigger" VALIDATE CONSTRAINT "workflow_engine_data_data_condition_id_8a5d07b7_fk_workflow_";
CREATE INDEX CONCURRENTLY "workflow_engine_datacondit_data_condition_id_8a5d07b7" ON "workflow_engine_dataconditionalertruletrigger" ("data_condition_id"); |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #88730 +/- ##
==========================================
- Coverage 87.74% 87.73% -0.01%
==========================================
Files 10055 10060 +5
Lines 568700 569080 +380
Branches 22321 22321
==========================================
+ Hits 498981 499269 +288
- Misses 69340 69432 +92
Partials 379 379 |
wedamija
approved these changes
Apr 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
migration lgtm
andrewshie-sentry
pushed a commit
that referenced
this pull request
Apr 8, 2025
…rs (#88730) Create a lookup table for "detector trigger" data conditions and alert rule triggers so that we have a way to return the alert rule trigger ids in the rule serializers. Backfill migration to follow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Create a lookup table for "detector trigger" data conditions and alert rule triggers so that we have a way to return the alert rule trigger ids in the rule serializers. Backfill migration to follow.