-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(aci milestone 3): backfill resolution action filters #91402
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
Conversation
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
Codecov ReportAttention: Patch coverage is
|
Files with missing lines | Patch % | Lines |
---|---|---|
...backfill_metric_alert_resolution_action_filters.py | 38.09% | 26 Missing |
...backfill_metric_alert_resolution_action_filters.py | 64.70% | 12 Missing |
Additional details and impacted files
@@ Coverage Diff @@
## master #91402 +/- ##
===========================================
+ Coverage 42.03% 87.68% +45.64%
===========================================
Files 10325 10332 +7
Lines 585571 586721 +1150
Branches 22574 22596 +22
===========================================
+ Hits 246153 514450 +268297
+ Misses 338973 71843 -267130
+ Partials 445 428 -17
The migration tests will pass after #90898 is merged (made a change to the data condition comparison) |
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
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.
looks good, just gotta fix the failing tests and skip the migration tests that are timing out :(
|
||
workflow_ids = AlertRuleWorkflow.objects.filter( | ||
alert_rule_id__in=alert_rule_ids | ||
).values_list("workflow__id", flat=True) |
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.
nit: You can also just use workflow_id
here to avoid the join. Not a huge deal, jfyi
|
||
for workflow_id in workflow_ids: | ||
workflow_dcgs = DataConditionGroup.objects.filter( | ||
workflowdataconditiongroup__workflow__id=workflow_id |
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.
Nit: Can use workflowdataconditiongroup__workflow_id
here too
Backfill migrated metric alerts with resolution action filter data conditions. See #89832 for an explanation of what these are. --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Backfill migrated metric alerts with resolution action filter data conditions. See #89832 for an explanation of what these are.