Skip to content

feat(ACI): Handle anomaly detection data condition in validator #93886

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ceorourke
Copy link
Member

Update the metric issue validator to handle anomaly detection data condition input - the main difference with these is that comparison is a dictionary rather than a number.

@ceorourke ceorourke requested review from a team as code owners June 18, 2025 23:09
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 18, 2025
Comment on lines +46 to +47
if isinstance(self.initial_data, list) and self.initial_data:
return self.initial_data[0].get("type")
Copy link
Member Author

Choose a reason for hiding this comment

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

self.initial_data is a list of conditions in some cases (e.g. the case where we're subclassing it for the MetricIssueComparisonConditionValidator)

Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/incidents/metric_issue_detector.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93886       +/-   ##
===========================================
+ Coverage   76.56%   88.04%   +11.47%     
===========================================
  Files       10338    10337        -1     
  Lines      597261   597030      -231     
  Branches    23193    23193               
===========================================
+ Hits       457316   525634    +68318     
+ Misses     139484    70935    -68549     
  Partials      461      461               

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.

1 participant