-
Notifications
You must be signed in to change notification settings - Fork 73
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
[Change Proposal] Allow for nested category structure #451
Comments
The Maybe an option is to keep categories simple in packages, with the current
Then the UIs can build the tree of categories from that. We'd need to think where to configure these categories. Some of their information is already hard-coded, I guess we can also hard-code the known sub-categories. We could also consider bringing this information to the package-spec and consuming it from there. |
@jlind23 adding it as a new field has some problems in my opinion:
We can also encourage the use of v2 while keeping a single field, if we only add the new categories to latest version. The one point where I see that adding a new field can have an actual advantage is on support of old versions of kibana/fleet. We can add new categories and they can just ignore them, but adding subcategories into the current categories field will make the list of categories longer. This may be not such an issue though, and we could try to mitigate it from the registry by not exposing subcategories on requests for old versions of kibana. |
@jsoriano what's your recommendation? |
Ideally, packages could continue using the categories the way they do now, just defining one or more categories in their manifest. We need to represent the tree structure w/ parent/child nodes elsewhere, and keep packages out of that concern.
Could we create some top-level categories object exported by the package spec that defines the tree structure of categories? Could be a YML file that informs the package registry on how to build the categories API endpoint JSON. |
I would use the current field we have for categories in packages. As Kyle mentions, this will help to keep packages out of this concern. And will allow us to change the level of a category without producing breaking changes, as would happen for example if we move The registry API will need to be extended to include this new relationship between categories as mentioned in #451 (comment). An alternative for the API change could be to reproduce the tree structure. This would prevent old versions of kibana from displaying too many categories when we start adding subcategories, as they would only use the first level. But it could make some categories to disappear if we move them to subcategories. A response implemented this way would look like the following:
Yes, we can explore something like this, having it in a yaml file can help product or design to make changes there.
I would keep it simple and allow only one level of subcategories, or do we expect the necessity of having more levels? |
Good call out - let's plan to only support one level of nesting for now. So a single level of subcategories per category. |
I have started with the definition of the subcategories in elastic/package-registry#914, I have used the list of subcategories prepared by @dborodyansky by now. Please take a look to the comments in the definitions https://github.com/elastic/package-registry/pull/914/files#diff-51ada513c4a7741a37782b2888f80297dd8c8a78377579a7409ff396b33edb4f |
Changes in the registry for nested categories merged. @kpollich should we also update the search API, so when searching for a category, it also returns the packages belonging to its subcategories? That would be that for example, for |
This seems proper, but we don't have a dependency in the integrations UI for this functionality. We load all the categories up front from Maybe we could make this a low priority tech debt task, or if you think it's something that'd be very straightforward to implement quickly we can take care of it sooner. What do you think, @jsoriano? |
I think this would be a quick change, I have opened a draft PR here: elastic/package-registry#921. If kibana is not currently filtering by category I think we can make the change as this won't affect anything now, but can make sense to have in the future if we start filtering by category. |
Yes, package registry 1.16.0 was released yesterday including this change, and epr.elastic.co will hopefuly be updated today. Change in kibana is pending, we can close this issue once there is an issue or PR open for it. |
Closing this as done then and we will follow up with this kibana issue: elastic/kibana#147125 |
We're actively rethinking how we categorize all Elastic Agent integrations. Part of this reimagining includes devising a category + subcategory organization structure for certain integrations (e.g. security) with more nuanced structure than a single category can provide.
We'll need to support integrations defining a top-level category as well as an optional subcategory. This means updating the rules around categories for each package's spec, as well as the logic that drives the https://epr.elastic.co/categories API.
We'll need to add support for the new structure in Kibana, but that will be a separate issue referenced later.
The text was updated successfully, but these errors were encountered: