elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.7k stars 8.24k forks source link

[kbn/server-route-repository] Migrate plugins to use the package #198682

Open miltonhultgren opened 1 month ago

miltonhultgren commented 1 month ago

Within the Observability solution we tend to mix between using Core HTTP directly, using @kbn/server-route-repository or a mix (see https://github.com/elastic/kibana/issues/198681).

Once https://github.com/elastic/kibana/issues/198681 is done, we should be at a point where there are only two ways* that HTTP APIs are defined, but our guidelines describe that the recommended way is to use @kbn/server-route-repository, thus we should consider if we should migrate all or some of the existing plugins to use the package.

This may be most relevant for plugins that are still seeing active development.

* In theory, in practice there are differences in the patterns employed before reaching Core's HTTP router

Affected plugins

elasticmachine commented 1 month ago

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

miltonhultgren commented 1 month ago

FYI @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team @elastic/obs-ux-management-team

Can you give me some insight into if any of these plugins are seeing active or future development?

tonyghiani commented 4 weeks ago

@miltonhultgren regarding the APIs owned by the logs team:

miltonhultgren commented 4 weeks ago

Thank you @tonyghiani, that's exactly the kind of context I was looking for 🙌🏼 We won't make any decisions now but based on your feedback I would imagine we leave these APIs as they are.

I will mention one more thing: There is nothing stopping a plugin from using both systems, so it's possible to migrate only the active endpoints for example (if some endpoints are planned for deprecation for example). This means the work doesn't have to be done all at once, the package can be adopted incrementally across multiple PRs.