-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Alerting] [Discuss] Modifying alert params within the executor as a migration tool #66608
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Relates to #50216. |
I've seen a few notes about future directions of saved object migrations, we should be sure we're aligned with that. This sort of migrate-when-needed is an interesting approach. Also potentially relevant: #50213 - I think migrate-when-needed would imply we can't have mappings for alert params. But presumably if we did have mappings for alert params, then we'd be doing standard SO migrations at that point (in terms of when and how they happened). |
Closing as duplicate of #50216 and will mention this issue / comments in the other one. |
Alerts are in beta right now, so we might be pushing a large amount of breaking changes to them. Required alert params might change between minor versions, and so alerts created in a previous version would immediately break.
Can we fix this by including a migration assistant service in alert executors? For example:
timeSize
andtimeUnit
) inside each alertcriteria
(an array of alert conditions), but these are supposed to be the same for each of them. It's redundant and error-prone to repeat the same value inside each array member.timeSize
andtimeUnit
outside of thecriteria
array and into the top-level alertparams
.timeSize
andtimeUnit
are inside of thecriteria
. If they are, it will move them into the top level of params and update the SavedObject of the alert to reflect this change. This code can then be deprecated in the next minor version, assuming that all alerts probably migrated before then.Is something like this already possible with the available
savedObjects
service in alerts, or would a new one be needed? Is this even a good idea? I'd like some opinions.The text was updated successfully, but these errors were encountered: