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

fix(anomaly detection): surface validation error to user on trigger create/update #76643

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

mifu67
Copy link
Contributor

@mifu67 mifu67 commented Aug 27, 2024

Missed a spot. When creating/updating triggers, catch form validation errors and surface them as serializer validation errors.

@mifu67 mifu67 requested a review from a team as a code owner August 27, 2024 23:11
@mifu67 mifu67 requested a review from ceorourke August 27, 2024 23:11
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 27, 2024
Copy link
Contributor

@nhsiehgit nhsiehgit left a comment

Choose a reason for hiding this comment

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

Can we add a test?

@mifu67
Copy link
Contributor Author

mifu67 commented Aug 27, 2024

Can we add a test?

@nhsiehgit there should already be a test but I don't know where it is, so I'm waiting for it to fail (lol). If nothing fails, then I'll write new tests.

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

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

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...sentry/incidents/serializers/alert_rule_trigger.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #76643       +/-   ##
===========================================
+ Coverage   57.86%   78.15%   +20.29%     
===========================================
  Files        6681     6910      +229     
  Lines      294458   307236    +12778     
  Branches    50667    50372      -295     
===========================================
+ Hits       170393   240127    +69734     
+ Misses     119386    60773    -58613     
- Partials     4679     6336     +1657     

@mifu67 mifu67 merged commit 2bb3c05 into master Aug 28, 2024
51 checks passed
@mifu67 mifu67 deleted the mifu67/be/trigger-validation-bug branch August 28, 2024 18:42
ArthurKnaus pushed a commit that referenced this pull request Aug 29, 2024
…reate/update (#76643)

Missed a spot. When creating/updating triggers, catch form validation
errors and surface them as serializer validation errors.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2024
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.

3 participants