-
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
[Meta] Breaking saved object type conversions in 8.0 #100489
Comments
Pinging @elastic/kibana-security (Team:Security) |
Btw, is there an equivalent for |
Good question. There is currently no equivalent for |
Hi all. I'm hoping to learn about the |
@oatkiller the description of the different kibana/src/core/server/saved_objects/types.ts Lines 237 to 249 in 106afd4
|
@paul-tavares @dasansol92 FYI on the above - for |
@jportner In that case, I guess the conversion of the Regarding |
@weltenwort @jasonrhodes I looked at the Metrics UI and the Source configuration and it appears we are ready. The Metrics UI saved objects don't have references. The source configuration does for the Logs UI index patterns and they appear to be using the |
@simianhacker Are the
indeed |
Tag is a bit of a special case. Recently (as of last week) I met with Product stakeholders and we decided to exclude tags from sharing for the time being. The biggest reason for this is that we don't currently have a way to reconcile/merge similar tags (two different tags with the same label). So I think we can safely convert tags to
👍 |
@weltenwort Yes... good catch! (tracking #101966) |
I'm not sure to understand then? What will be the behavior when sharing an object that references tags? What's the point in converting them to |
When sharing an object that references tags: tags will be skipped.
Any object that will be or may be eventually shareable needs to be converted in 8.0. |
@jportner Is there any plan to keep external references to saved objects working? Otherwise, this seems to indicate that any bookmarked URL to a dashboard will just be broken, correct? When a user sets up automated reports, they copy a POST URL and paste it into their own Watcher definition or script that can be run with cron. The POST URL often contains references to objects by their ID. Is there any way to save the user from having to manually fix all of their automated reports? |
Each plugin owner needs to update their server-side code to
There should be no intervention needed for Reporting directly; Dashboard, Discover, etc. need to be updated so that these URLs won't actually break for end-users. This week I'll be working on adding more specific dev guidance in the description of this issue 👍 |
It looks like saved object consumers have accomplished everything we set out to in this issue. Some additional work:
|
@jportner do we have a meta issue listing all these points? |
Since these are quite different individual issues, I've added the |
Overview
In #27004, we implemented a feature to allow users to share saved objects across multiple spaces. As part of that effort, we had to change how saved objects are serialized to raw Elasticsearch documents. We implemented a conversion process to change saved objects to the new format, but this will regenerate IDs of existing saved objects to ensure that they are unique across all spaces.
Regenerating IDs of saved objects is a major breaking change. This will affect objects that reference each other, and it will also affect external references to saved objects (for example, a bookmarked URL to a dashboard). It was decided that the best path forward is to identify all existing "namespace-isolated" object types that need to become shareable, and convert them all at once in the 8.0 release. This process is called making the object types "share-capable".
As such, plugin authors need to take additional steps:
references
field, it will break in 8.0.SavedObjectsClient.resolve
API (instead ofSavedObjectsClient.get
), and handle the new different outcomes (exactMatch
,aliasMatch
,conflict
).Important note: This conversion will not make any object types fully shareable! From an end-user's perspective, these object types will continue to function the same way as they did before, each one will still be isolated to a single space. Plugin authors will also need to plan additional steps in the 8.x timeframe to make their object types fully shareable. This may entail additional UI elements and user flows as necessitated by their individual use cases.
Affected objects
Each of the objects in Kibana below are currently "isolated" (registered w/
namespaceType: 'single'
). Each should be reviewed by plugin authors to determine if they are using references correctly, and if they should be converted to become "share-capable" (registered w/namespaceType: 'multiple-isolated'
) in the 8.0 release.Update: object types are
crossed outif we have deemed they should not be converted.timelion-sheet, visualizationsearch-session,urlconfig, taginfrastructure-ui-source,metrics-explorer-view,inventory-viewsecurity-solution-signals-migration, siem-detection-engine-rule-actions, siem-detection-engine-rule-statusuptime-dynamic-settingsType registration traces -- click to expand
Important considerations
If an object type should be converted, then all object types that it can reference should be converted too. For example, dashboards have references to visualizations, which have references to index-patterns -- all of these object types must be converted to become share-capable.
Developer guide
See the Sharing Saved Objects developer guide for step-by-step instructions on how to prepare your plugin for the 8.0 release. You will need to take 3-5 specific steps (depending on how your plugin uses saved objects).
The text was updated successfully, but these errors were encountered: