[Maps][Alerting] Migrate to using Saved Object References array to reference index patterns from Rules #107066
Labels
chore
[Deprecated-Use Team:Presentation]Team:Geo
Former Team Label for Geo Team. Now use Team:Presentation
v7.16.0
v8.0.0
Currently, geo containment rules stores two index pattern Saved Object IDs inside the rule params inside
params.indexId
andparams.boundaryIndexId
:Example geo containment rule
In 8.0, index-pattern saved objects will be converted to share-capable (meta issue). This means all index pattern SO IDs will be regenerated and the index pattern SO IDs stored within the geo containment rule params will be outdated.
What does this mean?
Rule Execution
It doesn't look like the SO IDs are actually directly used during geo containment rule execution so rule execution continues to run successfully even if the index pattern IDs are outdated.
Rules UI
Index pattern SO IDs are used to re-populate the UI field when editing the geo containment rule so because the index pattern SO IDs are outdated, the edit form will be cleared out for user who try to edit geo containment rules.
Recommended approach
With this resolution of this issue with this PR, the alerting framework allows rule types to specify extract and inject hooks for pulling out SO references from rule parameters. POC for adding it to the geo containment rule type is available here: https://github.com/elastic/kibana/pull/106733/files. While implementing these hooks will affect rules that are created/updated after implementation, a migration will also need to be added for the geo containment rule to update existing rules.
Alternative approach
Since the
indexId
andboundaryIndexId
SO IDs are only used during rule editing, there is the option to use the client side.resolve
function provided by the saved objects client in order to resolve the outdated index pattern SO ID.When does this need to be done?
These changes should be completed by 7.16 FF as the saved object type conversions will be done in 8.0
The text was updated successfully, but these errors were encountered: