Fix that no_more_notifications gets reset when Recovery notifications are filtered away #6757
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello from the OSMC hackathon :)
Description
Combination of notification interval = 0, times.begin = 1h and filtered recovery notificadtions.
The problem arises with the first critical/down notification which delays the notification to 3h hours in the future, and sets
no_more_notifications
totrue
.Once a recovery notification is triggered, this does not reach the point where it actually evaluates users to notify. It also does not reset
no_more_notifications
tofalse
again, allowing our NOTOK-OK-NOTOK state transition logic to kick in.We've analysed the problem with @jschanz and created a possible fix for it. A workaround for the problem is to add the
Recovery
type again to the notification objects and send a dummy OK check results to also reset theno_more_notifications
flag to false again.