-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
When I was working on some other issues, I found some code in the implementation for usage alerts that I'm not sure it's correct. In particular:
Apisonator:
/lib/3scale/backend/alerts.rb
- `can_raise_more_alerts?`
- It only checks the highest percent. I'm not sure alerts will work if another lower percent is set for some other kind of alert. - `notified?`
- It's memoized, not sure for how long, probably all process life, doesn't look correct.
Porta:
Product -> Applications -> Settings -> Usage Rules -> Alerts
- When sending it only sends the difference, be POST or DELETE, for each percent. This is not idempotent, when redis is flushed or the backend is out of sync, inconsistencies could happen, for instance, porta thinking a percent is already on the backend and not sending it again, when it really wasn't in backend