Detector panel improvements - #175
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
==========================================
+ Coverage 77.87% 83.00% +5.12%
==========================================
Files 33 89 +56
Lines 1939 5724 +3785
==========================================
+ Hits 1510 4751 +3241
- Misses 429 973 +544
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| @@ -536,7 +537,15 @@ def run_detector( | |||
| update_tables(db, updated_cusums, changepoints) | |||
There was a problem hiding this comment.
This update_tables call needs to be removed when running the detector inside of the event detector panel.
Without doing so, if you are running the event detector with a user that has write capabilities on the production database, you will mistakenly override the production cusum state tables. When that happens the state will be that of the reproduced event, instead of being that of the live run, leading to potential inconsistencies.
The longer term correct fix for this, would be to make the whole event detection logic stateless without needing to have these state tables at all.
There was a problem hiding this comment.
This call is not present in the function that runs in the panel, that would be this one:
See:
closes #170