sentry icon indicating copy to clipboard operation
sentry copied to clipboard

ref(rules): Handle improperly formatted rule

Open ceorourke opened this issue 1 year ago • 3 comments

One customer has a couple improperly formatted alert rules that are causing this error: https://sentry.sentry.io/issues/5245475486/. I've already edited the serializer so it's not possible to get into this state again (we don't save data with a value of "") and had support reach out to the customer to address this, but this issue keeps happening so we can just handle the empty string.

ceorourke avatar May 13 '24 19:05 ceorourke

nit: it'd be nice to add a test case for this in the future as well (since we've seen it come up in prod already)

saponifi3d avatar May 13 '24 19:05 saponifi3d

nit: it'd be nice to add a test case for this in the future as well (since we've seen it come up in prod already)

I can add one, but there is no future possibility of this happening for new rules, it's just this one org's 2 rules.

ceorourke avatar May 13 '24 19:05 ceorourke

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.00%. Comparing base (4b1e575) to head (f9e5bb1). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70797      +/-   ##
==========================================
- Coverage   80.00%   80.00%   -0.01%     
==========================================
  Files        6507     6507              
  Lines      290833   290855      +22     
  Branches    50123    50132       +9     
==========================================
+ Hits       232686   232703      +17     
- Misses      57711    57716       +5     
  Partials      436      436              
Files Coverage Δ
src/sentry/rules/conditions/event_frequency.py 92.36% <100.00%> (+0.05%) :arrow_up:

... and 14 files with indirect coverage changes

codecov[bot] avatar May 13 '24 19:05 codecov[bot]

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ IntegrityError: UniqueViolation('duplicate key value violates unique constraint "auth_user_username_key"\nDETAIL:... pytest.runtest.protocol tests/snuba/rules/condi... View Issue

Did you find this useful? React with a 👍 or 👎

sentry[bot] avatar May 26 '24 02:05 sentry[bot]