-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Provide indication to rule executor when rule is disabled/re-enabled #163126
Comments
Pinging @elastic/response-ops (Team:ResponseOps) |
This would have been a behavior change then, when we changed enable/disable to NOT delete it's task document, but mark it as "disabled" instead. The missing behavior is the clearing of rule and instance state. I think we clear instance state, actually (and recover alerts, etc). I thought we had an issue open to add an explicit "clear rule state" action, to account for this. But not seeing one. Anyone else know of one? I think that would be good idea as a general "fix it" tool, but would not be great as a UX, forcing the user to click some button "reset rule state" at times. We have some issues open to coordinate calls to the rule type when lifecycle APIs are called, that seem more relevant:
These all seem so related, we should look at them together when extending to this kind of functionality. |
Here's the issue for clearing task state: #140402 |
Maybe we can set a flag on the rule type to |
Or perhaps The options I mentioned above for "lifecycle hooks for rule types" kinda thing is kinda over-bearing to solve this problem - expect everyone to implement a hook on disable (or enable) to clear task state. And it's not even clear what these "hooks" might allow - I think one issue pointed out a hook should be able to "veto" a creation / update; to "clear state", we'd probably need to provide some special function just for that (like |
Geo containment rule caches containment boundaries between executions. #157934 requests that the boundaries cache be cleared when a rule is disabled/re-enabled. The problem is that the executor is not provided with any state to know when a rule is disabled or re-enabled.
The feature request is to provide the rule executor with state to indicate when a rule has been disabled or re-enabled. One suggested solution is to include
enabledAt
timestamp inrule
state. Another suggestion would be a callback on rule disable. Personally, I like the callback on rule disablement.The text was updated successfully, but these errors were encountered: