-
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
[Content Management] Standardize on subset of saved object metadata attributes #138343
Comments
Pinging @elastic/kibana-core (Team:Core) |
Just to start the discussions: Looking at the table, I see that some attributes may seems to be already standard (e.g 'attributes.description'), where in fact, technically they're not, at least not in the data storage, as the 'attributes' map is stored in different attributes per type in ES (e.g for a dashboard, 'attributes.description' is stored in the 'dashboard.description' field, and in the 'visualization.description' field for vis). Now, I would like to be also very careful in what we want to standardize. I'll the Now, if the intent is to be able to perform ES queries against these standardized fields, it technically means that all those fields will have to be 'root-level' (not under If that's a direction we'd like to follow, we should probably introduce a new So, my first remark / question would be: at which level these 'SO-type agnostic experiences' will be implemented at? As already asked, is the intent to be able to perform queries against them directly on the SO indices? |
100%, this is my chief concern too. I think we need to have a high bar for what justifies adding a new root-level field to SOs. Some of these proposed fields certainly could meet that bar, but we should take care to avoid adding root-level fields for concepts that can't be considered truly global to all SOs.
I don't want to speak for @alexfrancoeur, but my understanding was that the intent would be to use the SO client to query across SOs of different types, but not necessarily to query the raw underlying ES indices. Plus, the way we store SOs has always been an implementation detail of the SO client, and I wouldn't want to encourage anyone to interact with that data directly. Making the assumption that querying via the SO client is acceptable, that means that we could theoretically have standardized field names for SO attributes across types without needing to worry about the fact that they are stored in a way that's different (unless I'm overlooking something, @pgayvallet and @rudolf keep me honest here). So I guess I see a few paths forward:
(1) Makes a lot of sense to me, as long as we have a way to enforce that folks aren't just putting anything in there... only recognized fields. |
The vision we put forward in the BWCA RFC (purpose built APIs + service layer) basically precludes us from building something like this directly on saved objects. @alexfrancoeur and I had a brief discussion about this after he created this issue. There is a real tension here. Anytime you have a single place where you could implement something that improves the whole product that's a huge benefit. But building a powerful generic tool is incredibly hard and right now saved objects without an intermediate API layer just can't power complex domains like our solutions. So any standardisation needs to happen on the API layer to be useful for the purposes of a shared content table. We've had other requests to document API conventions and I think the best way to support content management would be to document such fields in our API convention. I was curios how we ended up in a situation where one type has two So we would need
Taking one step back I'm really torn about how we go forward here. In terms of the developer experience having the API options to switch and specify for each auto-field whether it's on/off/manual and understanding all the behaviours -- isn't it easier to just say Then there's the benefit of reducing the field count which is useful, but I'd rather spend time on saved object index per type as a more scalable solution to the same problem. So if we're focussing on providing a consistent content management experience I wonder if the most value we could add in the shortest amount of time isn't working on API conventions instead? |
++
Lately I've been thinking of this idea as "ECS for Saved Object attributes." We give folks a detailed schema for special meta attributes, and, similar to ECS, if they simply follow the schema they can benefit from the super-cool-future-content-management-integrations we will be building. This could potentially still be paired with option (2) from my comment above, where we provide helpers to make this the implementation more bulletproof for devs. And importantly, it would not preclude us from eventually "graduating" fields that feel truly global to be root-level fields (though I still suspect there would be relatively few of these). |
We've recently kicked off the first phase of content management with the work outlined in this meta issue: #128006
When complete, we will have an updated reusable table for any saved object to leverage. We'd like to use this component and others to power a variety of SO-type agnostic experiences. In order to create a table that is available that can be used by all SO types, we'll need to either standardize on or create a mapping for a common set of saved object attributes. These attributes include, but aren't limited to: create date, created by, last updated date, last updated by, views, last viewed date, title, version and description.
A screenshot of a limited analysis in 8.2 highlights the differences between how different saved objects persist information.
While we'll eventually provide some more detailed requirements for this work, let's use this issue as a place to discuss the broader concept and suggestions for standardization.
Related issues:
Add date created, date modified, other metadata to Saved Objects · Issue #9202 · elastic/kibana · GitHub
[Visualize] Ability to filter visualisations by metadata (author, created date, modified date etc) · Issue #84227 · elastic/kibana · GitHub
[Saved Objects] Report usage and last used date #125795
Kibana usage information · Issue #81130
Google Analytics on Kibana · Issue #5580
The text was updated successfully, but these errors were encountered: