Open rudolf opened 1 year ago
Pinging @elastic/kibana-core (Team:Core)
The need for this from the visualization team has been removed for now.
We have decided to save event annotation groups as single saved objects instead of a group object with multiple hidden children. Because of that decision, this task is no longer a blocker.
Deleting a saved object from saved objects management does not enforce referential integrity. That means when there's a parent to child or child to parent references, deleting the parent does not delete it's children.
Sometimes this is the desired behaviour, e.g. deleting a dashboard should not delete all the visualisations in the visualisations library references by this dashboard.
Other times this is undesired, like when a case is deleted we might want to delete all the cases-comments and cases-user-actions so that we don't leave "orphaned" objects which continuously accumalate but have no value.
When there's a parent to child reference, it's possible to delete the child leaving the parent in an inconsistent state. For instance deleting the data view used by a dashboard that effectively breaks the dashboard, although the impact of this change isn't obvious to the user performing the action.
Given that the correct action to take here very much depends on the domain of the plugin, this logic needs to be specified by the plugin.
There are a couple of options here: